diff options
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kevent.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kvideo.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/savegame.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/state.cpp | 5 | ||||
-rw-r--r-- | engines/sci/engine/state.h | 2 |
6 files changed, 4 insertions, 11 deletions
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp index a00630622e..e290878b71 100644 --- a/engines/sci/engine/kevent.cpp +++ b/engines/sci/engine/kevent.cpp @@ -76,7 +76,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) { curEvent = g_sci->getEventManager()->getSciEvent(mask); - if (s->_delayedRestoreGame) { + if (s->_delayedRestoreGameId != -1) { // delayed restore game from ScummVM menu got triggered gamestate_delayedrestore(s); return NULL_REG; diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 07a1c47547..a025a8869d 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -397,7 +397,7 @@ reg_t kWait(EngineState *s, int argc, reg_t *argv) { s->wait(sleep_time); - if (s->_delayedRestoreGame) { + if (s->_delayedRestoreGameId != -1) { // delayed restore game from ScummVM menu got triggered gamestate_delayedrestore(s); return NULL_REG; diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index e4f2ff7a6d..6f93b041b5 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -110,7 +110,7 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP) skipVideo = true; } - if (g_sci->getEngineState()->_delayedRestoreGame) + if (g_sci->getEngineState()->_delayedRestoreGameId != -1) skipVideo = true; g_system->delayMillis(10); diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 5a60a6090f..d7fe009c9a 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -1276,8 +1276,6 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { // signal restored game to game scripts s->gameIsRestarting = GAMEISRESTARTING_RESTORE; - - s->_delayedRestoreFromLauncher = false; } bool get_savegame_metadata(Common::SeekableReadStream *stream, SavegameMetadata *meta) { diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index 6e2229727f..44aecdf0ff 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -86,10 +86,7 @@ void EngineState::reset(bool isRestoring) { g_sci->_guestAdditions->reset(); } - // reset delayed restore game functionality - _delayedRestoreGame = false; - _delayedRestoreGameId = 0; - _delayedRestoreFromLauncher = false; + _delayedRestoreGameId = -1; executionStackBase = 0; _executionStackPosChanged = false; diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index dd6b728716..c41f86c781 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -143,9 +143,7 @@ public: int16 _lastSaveNewId; // last newly created filename-id by kSaveGame // see detection.cpp / SciEngine::loadGameState() - bool _delayedRestoreGame; // boolean, that triggers delayed restore (triggered by ScummVM menu) int _delayedRestoreGameId; // the saved game id, that it supposed to get restored (triggered by ScummVM menu) - bool _delayedRestoreFromLauncher; // is set, when the the delayed restore game was triggered from launcher uint _chosenQfGImportItem; // Remembers the item selected in QfG import rooms |