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

Function CallCreateMapFunction

src/g_level.cpp:220–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218//=============================================================================
219
220static void CallCreateMapFunction(const char* qname, DObject* runner, level_info_t* map)
221{
222 auto func = LookupFunction(qname);
223 if (func->Proto->ArgumentTypes.Size() == 1) return CallCreateFunction(qname, runner); // accept functions without map parameter as well here.
224 if (func->Proto->ArgumentTypes.Size() != 2) I_Error("Bad map-cutscene function %s. Must receive precisely two arguments.", qname);
225 if (func->Proto->ArgumentTypes[0] != cutscene.runnerclasstype && func->Proto->ArgumentTypes[1] != maprecordtype)
226 I_Error("Bad cutscene function %s. Must receive ScreenJobRunner and LevelInfo reference.", qname);
227 VMValue val[2] = { runner, map };
228 VMCall(func, val, 2, nullptr, 0);
229}
230
231//=============================================================================
232//

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