mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-22 00:41:05 +00:00
- implement the VM call's return value
This commit is contained in:
parent
fb79228600
commit
64d012b073
2 changed files with 5 additions and 4 deletions
|
@ -1106,12 +1106,14 @@ void DSWActor::callStateAction()
|
|||
|
||||
int DSWActor::callFunction(VMFunction* func)
|
||||
{
|
||||
int ret = 0;
|
||||
if (func)
|
||||
{
|
||||
VMValue param[] = { this };
|
||||
VMCall(func, param, 1, nullptr, 0);
|
||||
VMReturn r(&ret);
|
||||
VMCall(func, param, 1, &r, 1);
|
||||
}
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
END_SW_NS
|
||||
|
|
|
@ -350,8 +350,7 @@ typedef void (*soANIMATORp) (SECTOR_OBJECT*);
|
|||
DEFINE_ACTION_FUNCTION_NATIVE(DSWActor, func, func) \
|
||||
{ \
|
||||
auto self = (DSWActor *)(param[0].a); \
|
||||
func(self); \
|
||||
return 0; \
|
||||
ACTION_RETURN_INT(func(self)); \
|
||||
}
|
||||
#define AF(func) &DSWActor_##func##_VMPtr
|
||||
|
||||
|
|
Loading…
Reference in a new issue