| 218 | //============================================================================= |
| 219 | |
| 220 | static 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 | // |
no test coverage detected