Add some functions for use with DECORATE return
- Since DECORATE's return statement can only return the results of
function calls (I do not want to spend the time necessary to make it
return arbitrary expressions), here are three functions to get around
this limitation:
* A_State - Returns the state passed to it. You can simulate A_Jump
functions with this.
* A_Int - Returns the int passed to it.
* A_Bool - Returns the bool passed to it.
- e.g. If you want to return the number 3, you use this:
return A_Int(3);
If you want to jump to a different state, you use this:
return A_State("SomeState");
This commit is contained in:
parent
fbbaae781b
commit
eace79ccad
3 changed files with 53 additions and 0 deletions
|
|
@ -494,6 +494,10 @@ static void ParseNativeFunction(FScanner &sc, PClassActor *cls)
|
|||
rets.Push(TypeFixed);
|
||||
break;
|
||||
|
||||
case TK_State:
|
||||
rets.Push(TypeState);
|
||||
break;
|
||||
|
||||
case TK_Identifier:
|
||||
rets.Push(NewPointer(RUNTIME_CLASS(DObject)));
|
||||
// Todo: Object type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue