SCI: Fixed menu reset in SCI0/SCI01 games when restarting
svn-id: r51309
This commit is contained in:
parent
c0d915b616
commit
284377fc24
1 changed files with 4 additions and 5 deletions
|
@ -277,10 +277,6 @@ bool SciEngine::initGame() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_gamestate->initGlobals();
|
_gamestate->initGlobals();
|
||||||
|
|
||||||
if (_gamestate->abortScriptProcessing == kAbortRestartGame && _gfxMenu)
|
|
||||||
_gfxMenu->reset();
|
|
||||||
|
|
||||||
_gamestate->_segMan->initSysStrings();
|
_gamestate->_segMan->initSysStrings();
|
||||||
|
|
||||||
_gamestate->r_acc = _gamestate->r_prev = NULL_REG;
|
_gamestate->r_acc = _gamestate->r_prev = NULL_REG;
|
||||||
|
@ -415,16 +411,19 @@ void SciEngine::runGame() {
|
||||||
exitGame();
|
exitGame();
|
||||||
|
|
||||||
if (_gamestate->abortScriptProcessing == kAbortRestartGame) {
|
if (_gamestate->abortScriptProcessing == kAbortRestartGame) {
|
||||||
_gamestate->abortScriptProcessing = kAbortNone;
|
|
||||||
_gamestate->_segMan->resetSegMan();
|
_gamestate->_segMan->resetSegMan();
|
||||||
initGame();
|
initGame();
|
||||||
initStackBaseWithSelector(SELECTOR(play));
|
initStackBaseWithSelector(SELECTOR(play));
|
||||||
_gamestate->gameWasRestarted = true;
|
_gamestate->gameWasRestarted = true;
|
||||||
|
if (_gfxMenu)
|
||||||
|
_gfxMenu->reset();
|
||||||
|
_gamestate->abortScriptProcessing = kAbortNone;
|
||||||
} else if (_gamestate->abortScriptProcessing == kAbortLoadGame) {
|
} else if (_gamestate->abortScriptProcessing == kAbortLoadGame) {
|
||||||
_gamestate->abortScriptProcessing = kAbortNone;
|
_gamestate->abortScriptProcessing = kAbortNone;
|
||||||
_gamestate->_executionStack.clear();
|
_gamestate->_executionStack.clear();
|
||||||
initStackBaseWithSelector(SELECTOR(replay));
|
initStackBaseWithSelector(SELECTOR(replay));
|
||||||
_gamestate->shrinkStackToBase();
|
_gamestate->shrinkStackToBase();
|
||||||
|
_gamestate->abortScriptProcessing = kAbortNone;
|
||||||
} else {
|
} else {
|
||||||
break; // exit loop
|
break; // exit loop
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue