MCPcopy Create free account
hub / github.com/ZDoom/Raze / CallCreateMapFunction

Function CallCreateMapFunction

source/core/screenjob.cpp:85–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83//=============================================================================
84
85static void CallCreateMapFunction(const char* qname, DObject* runner, MapRecord* map)
86{
87 auto func = LookupFunction(qname);
88 if (func->Proto->ArgumentTypes.Size() == 1) return CallCreateFunction(qname, runner); // accept functions without map parameter as well here.
89 if (func->Proto->ArgumentTypes.Size() != 2) I_Error("Bad map-cutscene function %s. Must receive precisely two arguments.", qname);
90 if (func->Proto->ArgumentTypes[0] != cutscene.runnerclasstype && func->Proto->ArgumentTypes[1] != maprecordtype)
91 I_Error("Bad cutscene function %s. Must receive ScreenJobRunner and MapRecord reference.", qname);
92 VMValue val[2] = { runner, map };
93 VMCall(func, val, 2, nullptr, 0);
94}
95
96//=============================================================================
97//

Callers 1

CreateCutsceneFunction · 0.85

Calls 5

LookupFunctionFunction · 0.85
CallCreateFunctionFunction · 0.85
I_ErrorFunction · 0.85
VMCallFunction · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected