- Converted all action functions be directly callable by the VM (though they are not yet

usable).

SVN r2154 (scripting)
This commit is contained in:
Randy Heit 2010-02-12 06:04:57 +00:00
commit 739e684549
108 changed files with 2827 additions and 1295 deletions

View file

@ -302,9 +302,13 @@ static void FinishThingdef()
p->Emit(&buildit);
delete p;
}
// FIXME: Call a real function
buildit.Emit(OP_CALL_K, buildit.GetConstantAddress(NULL, ATAG_OBJECT), j, 0);
VMScriptFunction *func = buildit.MakeFunction();
func->NumArgs = tcall->Parameters.Size();
for (int k = 0; k < tcall->NumStates; ++k)
{
tcall->ActorInfo->OwnedStates[tcall->FirstState + k].SetAction(func);
}
#if 1
const char *marks = "=======================================================";
char label[64];
@ -318,10 +322,8 @@ static void FinishThingdef()
fprintf(dump, "\nDisassembly:\n");
VMDisasm(dump, func->Code, func->CodeSize, func);
#endif
//if(i==6) I_Error("Poop");
}
fclose(dump);
I_Error("Poop");
for (i = 0; i < PClass::m_Types.Size(); i++)
{