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

Function CallCreateSummaryFunction

source/core/screenjob.cpp:102–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100//=============================================================================
101
102void CallCreateSummaryFunction(const char* qname, DObject* runner, MapRecord* map, SummaryInfo* info, MapRecord* map2)
103{
104 if (qname == nullptr || *qname == 0) return; // no level summary defined.
105 auto func = LookupFunction(qname);
106 auto s = func->Proto->ArgumentTypes.Size();
107 auto at = func->Proto->ArgumentTypes.Data();
108 if (s != 3 && s != 4) I_Error("Bad map-cutscene function %s. Must receive precisely three or four arguments.", qname);
109 if (at[0] != cutscene.runnerclasstype && at[1] != maprecordtype && at[2] != summaryinfotype && (s == 3 || at[3] == maprecordtype))
110 I_Error("Bad cutscene function %s. Must receive ScreenJobRunner, MapRecord and SummaryInfo reference,", qname);
111 if (info) summaryinfo = *info; // must be copied to a persistent location.
112 else summaryinfo = {};
113 VMValue val[] = { runner, map, &summaryinfo, map2 };
114 VMCall(func, val, s, nullptr, 0);
115}
116
117//=============================================================================
118//

Callers 1

ShowIntermissionFunction · 0.85

Calls 5

LookupFunctionFunction · 0.85
I_ErrorFunction · 0.85
VMCallFunction · 0.85
SizeMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected