| 83 | //============================================================================= |
| 84 | |
| 85 | static 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 | // |
no test coverage detected