From 2761ced670007ee7425b41a2a17559dcfecc77f9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 13 Apr 2021 18:16:34 +0200 Subject: [PATCH] - handle 2 dead .def commands. --- source/build/src/defs.cpp | 27 ++++++--------------------- source/core/parsefuncs.h | 2 +- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/source/build/src/defs.cpp b/source/build/src/defs.cpp index e5f380338..582458de2 100644 --- a/source/build/src/defs.cpp +++ b/source/build/src/defs.cpp @@ -337,6 +337,12 @@ static int32_t defsparser(scriptfile *script) case T_2DCOL: parseSkip<4>(*script, pos); break; + case T_CUTSCENE: + case T_ANIMSOUNDS: + case T_NEWGAMECHOICES: // stub + parseEmptyBlock(*script, pos); + break; + case T_DEFINE: parseDefine(*script, pos); break; @@ -1508,23 +1514,6 @@ static int32_t defsparser(scriptfile *script) } break; - case T_CUTSCENE: - case T_ANIMSOUNDS: - { - FScanner::SavedPos dummy; - - static const tokenlist dummytokens[] = { { "id", T_ID }, }; - - if (scriptfile_getstring(script, nullptr)) break; - if (scriptfile_getbraces(script,&dummy)) break; - while (!scriptfile_endofblock(script, dummy)) - { - // XXX? - getatoken(script,dummytokens,sizeof(dummytokens)/sizeof(dummytokens)); - } - } - break; - case T_TEXHITSCANRANGE: parseTexHitscanRange(*script, pos); break; @@ -2292,10 +2281,6 @@ static int32_t defsparser(scriptfile *script) } } break; - case T_NEWGAMECHOICES: // stub - parseNewGameChoices(*script, pos); - break; - case T_RFFDEFINEID: parseRffDefineId(*script, pos); break; diff --git a/source/core/parsefuncs.h b/source/core/parsefuncs.h index 0c6e42ab9..9251ddcbc 100644 --- a/source/core/parsefuncs.h +++ b/source/core/parsefuncs.h @@ -670,7 +670,7 @@ void parseRffDefineId(FScanner& sc, FScriptPosition& pos) // //=========================================================================== -void parseNewGameChoices(FScanner& sc, FScriptPosition& pos) +void parseEmptyBlock(FScanner& sc, FScriptPosition& pos) { FScanner::SavedPos blockend;