diff options
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/detection.cpp | 1 | ||||
-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 | ||||
-rw-r--r-- | engines/sci/graphics/portrait.cpp | 2 | ||||
-rw-r--r-- | engines/sci/sci.cpp | 2 |
9 files changed, 5 insertions, 15 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 13b3326c08..272e3320b4 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -853,7 +853,6 @@ void SciMetaEngine::removeSaveState(const char *target, int slot) const { Common::Error SciEngine::loadGameState(int slot) { _gamestate->_delayedRestoreGameId = slot; - _gamestate->_delayedRestoreGame = true; return Common::kNoError; } 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 diff --git a/engines/sci/graphics/portrait.cpp b/engines/sci/graphics/portrait.cpp index 675883e6d3..6b66ac50e4 100644 --- a/engines/sci/graphics/portrait.cpp +++ b/engines/sci/graphics/portrait.cpp @@ -306,7 +306,7 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint if (curEvent.type == SCI_EVENT_MOUSE_PRESS || (curEvent.type == SCI_EVENT_KEYBOARD && curEvent.character == SCI_KEY_ESC) || g_sci->getEngineState()->abortScriptProcessing == kAbortQuitGame || - g_sci->getEngineState()->_delayedRestoreGame) + g_sci->getEngineState()->_delayedRestoreGameId != -1) userAbort = true; curPosition = _audio->getAudioPosition(); } while ((curPosition != -1) && (curPosition < timerPosition) && (!userAbort)); diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 0797fd8cba..a2ace9a4cb 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -342,9 +342,7 @@ Common::Error SciEngine::run() { // Check whether loading a savestate was requested int directSaveSlotLoading = ConfMan.getInt("save_slot"); if (directSaveSlotLoading >= 0) { - _gamestate->_delayedRestoreGame = true; _gamestate->_delayedRestoreGameId = directSaveSlotLoading; - _gamestate->_delayedRestoreFromLauncher = true; // Jones only initializes its menus when restarting/restoring, thus set // the gameIsRestarting flag here before initializing. Fixes bug #6536. |