MCPcopy Create free account
hub / github.com/ZDoom/gzdoom / RunFunction

Method RunFunction

src/scriptutil.cpp:67–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void ScriptUtil::RunFunction(FName functionname, unsigned paramstart, VMReturn &returns)
68{
69 VMFunction *func = nullptr;
70 auto check = functions.CheckKey(functionname);
71 if (!check)
72 {
73 func = PClass::FindFunction(NAME_ScriptUtil, functionname);
74 if (func == nullptr)
75 {
76 I_Error("Call to undefined function ScriptUtil.%s", functionname.GetChars());
77 }
78 functions.Insert(functionname, func);
79 }
80 else func = *check;
81
82 VMCall(func, &parameters[paramstart], parameters.Size() - paramstart, &returns, 1);
83}
84
85int ScriptUtil::Exec(FName functionname, ...)
86{

Callers

nothing calls this directly

Calls 7

FindFunctionFunction · 0.85
I_ErrorFunction · 0.85
VMCallFunction · 0.85
CheckKeyMethod · 0.45
GetCharsMethod · 0.45
InsertMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected