aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sci.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-07-26 13:40:07 +0000
committerFilippos Karapetis2010-07-26 13:40:07 +0000
commit284377fc247aa876e6f342250e66bf8a8bbd800c (patch)
tree5aa540c6cbaee89d11de1697bae8853495fc1254 /engines/sci/sci.cpp
parentc0d915b616b7f50e9feec2afb2969f23c79a9ffb (diff)
downloadscummvm-rg350-284377fc247aa876e6f342250e66bf8a8bbd800c.tar.gz
scummvm-rg350-284377fc247aa876e6f342250e66bf8a8bbd800c.tar.bz2
scummvm-rg350-284377fc247aa876e6f342250e66bf8a8bbd800c.zip
SCI: Fixed menu reset in SCI0/SCI01 games when restarting
svn-id: r51309
Diffstat (limited to 'engines/sci/sci.cpp')
-rw-r--r--engines/sci/sci.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 5d67e5c5d7..d58cdd5986 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -277,10 +277,6 @@ bool SciEngine::initGame() {
}
_gamestate->initGlobals();
-
- if (_gamestate->abortScriptProcessing == kAbortRestartGame && _gfxMenu)
- _gfxMenu->reset();
-
_gamestate->_segMan->initSysStrings();
_gamestate->r_acc = _gamestate->r_prev = NULL_REG;
@@ -415,16 +411,19 @@ void SciEngine::runGame() {
exitGame();
if (_gamestate->abortScriptProcessing == kAbortRestartGame) {
- _gamestate->abortScriptProcessing = kAbortNone;
_gamestate->_segMan->resetSegMan();
initGame();
initStackBaseWithSelector(SELECTOR(play));
_gamestate->gameWasRestarted = true;
+ if (_gfxMenu)
+ _gfxMenu->reset();
+ _gamestate->abortScriptProcessing = kAbortNone;
} else if (_gamestate->abortScriptProcessing == kAbortLoadGame) {
_gamestate->abortScriptProcessing = kAbortNone;
_gamestate->_executionStack.clear();
initStackBaseWithSelector(SELECTOR(replay));
_gamestate->shrinkStackToBase();
+ _gamestate->abortScriptProcessing = kAbortNone;
} else {
break; // exit loop
}