uncompleted parameter
i was playing with some code and needed to use wsprintf function , found it commented in
user32.zir file header , declared like this
function wsprintfA(pointer output; pointer format): int32; cdecl;
then i want to call it with more than 2 parameters , ziron did not allow that, so i made this
macro to call it with any numbers of arguments
inline function wsprintf(;)
{
$i = $argc;
$to = $argc - 2;
$repeat $to:
push $arg[$i];
$i--;
$end;
wsprintfA($arg[0], $arg[1]);
// Correct the stack 'cdecl'
$arg = $to * 4;
Esp += $arg;
$return eax;
}
so it would be better if ziron allow uncompleted parameters.
another workaround is telling zrion to did not check for the amount of parameters just
push all arguments and call the function.
http://www.freewebs.com/ogremagic/index.htm