- 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:
parent
ed12bdc0f4
commit
7dc4be302f
4 changed files with 123 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue