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

Function ShowScoreboard

source/core/screenjob.cpp:169–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167//---------------------------------------------------------------------------
168
169void ShowScoreboard(int numplayers, const CompletionFunc& completion_)
170{
171 cutscene.completion = completion_;
172 cutscene.runner = CreateRunner();
173 Printf("Created runner at %p\n", cutscene.runner);
174 GC::WriteBarrier(cutscene.runner);
175
176 const char* qname = globalCutscenes.MPSummaryScreen.GetChars();
177 auto func = LookupFunction(qname);
178 if (func->Proto->ArgumentTypes.Size() != 2) I_Error("Bad map-cutscene function %s. Must receive precisely two arguments.", qname);
179 if (func->Proto->ArgumentTypes[0] != cutscene.runnerclasstype && func->Proto->ArgumentTypes[1] != TypeSInt32)
180 I_Error("Bad cutscene function %s. Must receive ScreenJobRunner reference and integer.", qname);
181 VMValue val[2] = { cutscene.runner, numplayers };
182 VMCall(func, val, 2, nullptr, 0);
183 if (!ScreenJobValidate())
184 {
185 cutscene.runner->Destroy();
186 cutscene.runner = nullptr;
187 if (cutscene.completion) cutscene.completion(false);
188 cutscene.completion = nullptr;
189 return;
190 }
191 gameaction = ga_intermission;
192}
193
194//---------------------------------------------------------------------------
195//

Callers 2

exitlevelFunction · 0.85
ExitFromMenuMethod · 0.85

Calls 9

CreateRunnerFunction · 0.85
PrintfFunction · 0.85
LookupFunctionFunction · 0.85
I_ErrorFunction · 0.85
VMCallFunction · 0.85
ScreenJobValidateFunction · 0.85
GetCharsMethod · 0.45
SizeMethod · 0.45
DestroyMethod · 0.45

Tested by

no test coverage detected