diff options
author | Filippos Karapetis | 2016-02-08 00:16:38 +0200 |
---|---|---|
committer | Filippos Karapetis | 2016-02-08 00:19:05 +0200 |
commit | eb97c05cccc78f0dc314034ee813c06f5fa3ea74 (patch) | |
tree | f00e4f641a7c4b6f6ecdfbc6862310d3185e7399 /engines/lab | |
parent | 5e67457553788e7accff6cfbc9e41fe5c8040017 (diff) | |
download | scummvm-rg350-eb97c05cccc78f0dc314034ee813c06f5fa3ea74.tar.gz scummvm-rg350-eb97c05cccc78f0dc314034ee813c06f5fa3ea74.tar.bz2 scummvm-rg350-eb97c05cccc78f0dc314034ee813c06f5fa3ea74.zip |
LAB: Merge all the different scene restoring code after saving/loading
Diffstat (limited to 'engines/lab')
-rw-r--r-- | engines/lab/lab.cpp | 6 | ||||
-rw-r--r-- | engines/lab/savegame.cpp | 21 |
2 files changed, 16 insertions, 11 deletions
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp index 0a4cf4ec50..45b895d358 100644 --- a/engines/lab/lab.cpp +++ b/engines/lab/lab.cpp @@ -214,12 +214,6 @@ void LabEngine::updateEvents() { Common::Error LabEngine::loadGameState(int slot) { bool result = loadGame(slot); - _curFileName = " "; - _closeDataPtr = nullptr; - _mainDisplay = true; - _followingCrumbs = false; - _event->simulateEvent(); - _graphics->_longWinInFront = false; return (result) ? Common::kNoError : Common::kUserCanceled; } diff --git a/engines/lab/savegame.cpp b/engines/lab/savegame.cpp index 16c4044839..656595e3e5 100644 --- a/engines/lab/savegame.cpp +++ b/engines/lab/savegame.cpp @@ -157,6 +157,11 @@ bool LabEngine::saveGame(int slot, const Common::String desc) { file->finalize(); delete file; + _mainDisplay = true; + _alternate = false; + _event->simulateEvent(); + _graphics->screenUpdate(); + return true; } @@ -202,6 +207,17 @@ bool LabEngine::loadGame(int slot) { delete file; + _curFileName = " "; + _closeDataPtr = nullptr; + _followingCrumbs = false; + _graphics->_longWinInFront = false; + _event->initMouse(); + + _mainDisplay = true; + _alternate = false; + _event->simulateEvent(); + _graphics->screenUpdate(); + return true; } @@ -238,11 +254,6 @@ bool LabEngine::saveRestoreGame() { delete dialog; } - _alternate = false; - _mainDisplay = true; - _event->initMouse(); - _graphics->screenUpdate(); - return isOK; } |