diff options
-rw-r--r-- | scumm/scumm.cpp | 5 | ||||
-rw-r--r-- | scumm/scumm.h | 1 | ||||
-rw-r--r-- | scumm/vars.cpp | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 77fd9d6b9b..7a95b2307d 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1360,6 +1360,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS VAR_SOUNDCODE_TMR = 0xFF; VAR_DEFAULT_SOUND_CHANNEL = 0xFF; + VAR_MAIN_SCRIPT = 0xFF; VAR_NUM_SCRIPT_CYCLES = 0xFF; VAR_SCRIPT_CYCLE = 0xFF; @@ -2577,6 +2578,10 @@ load_game: clearClickedStatus(); } + if (VAR_MAIN_SCRIPT != 0xFF && VAR(VAR_MAIN_SCRIPT) != 0) { + runScript(VAR(VAR_MAIN_SCRIPT), 0, 0, 0); + } + // Handle mouse over effects (for verbs). handleMouseOver(oldEgo != VAR(VAR_EGO)); diff --git a/scumm/scumm.h b/scumm/scumm.h index ca370a5b3c..f604699904 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1336,6 +1336,7 @@ public: byte VAR_SOUNDCODE_TMR; byte VAR_DEFAULT_SOUND_CHANNEL; + byte VAR_MAIN_SCRIPT; byte VAR_SCRIPT_CYCLE; byte VAR_NUM_SCRIPT_CYCLES; diff --git a/scumm/vars.cpp b/scumm/vars.cpp index e390c095a8..51ef325c4b 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -317,6 +317,7 @@ void ScummEngine_v72he::setupScummVars() { VAR_SKIP_RESET_TALK_ACTOR = 125; } if (_heversion >= 99) { + VAR_MAIN_SCRIPT = 127; VAR_NUM_PALETTES = 130; VAR_NUM_UNK = 131; } |