- Added action special support to the thingdef expression evaluator. Now you

can use them like normal functions, which is probably most useful for
  ACS_ExecuteWithResult.


SVN r294 (trunk)
This commit is contained in:
Randy Heit 2006-08-16 20:56:06 +00:00
commit 7dc4be302f
4 changed files with 123 additions and 14 deletions

View file

@ -1306,6 +1306,29 @@ int FindLineSpecial(const char * string)
return 0;
}
//==========================================================================
//
// FindLineSpecialEx
//
// Like FindLineSpecial, but also returns the min and max argument count.
//
//==========================================================================
int FindLineSpecialEx (const char *string, int *min_args, int *max_args)
{
const ACSspecials *spec;
spec = is_special(string, (unsigned int)strlen(string));
if (spec != NULL)
{
*min_args = spec->MinArgs;
*max_args = MAX(spec->MinArgs, spec->MaxArgs);
return spec->Special;
}
*min_args = *max_args = 0;
return 0;
}
//==========================================================================
//
// DoSpecialFunctions