diff options
author | Filippos Karapetis | 2009-02-12 15:13:52 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-02-12 15:13:52 +0000 |
commit | 0015657caad6d4824a3b146fb34c4255aeeff72b (patch) | |
tree | d5d1b0da7d3799f43a67464c2d6c4c258b90b1cb /engines/agi/op_cmd.cpp | |
parent | 521cc089110501c456844a4bc5963bd6d8e4df5c (diff) | |
download | scummvm-rg350-0015657caad6d4824a3b146fb34c4255aeeff72b.tar.gz scummvm-rg350-0015657caad6d4824a3b146fb34c4255aeeff72b.tar.bz2 scummvm-rg350-0015657caad6d4824a3b146fb34c4255aeeff72b.zip |
Fix for bug #2541237 - "AGI: Restart quits ScummVM"
svn-id: r36279
Diffstat (limited to 'engines/agi/op_cmd.cpp')
-rw-r--r-- | engines/agi/op_cmd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index 32a8f62a58..1ac8ec5ce3 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -1231,7 +1231,7 @@ cmd(restart_game) { g_agi->selectionBox(" Restart game, or continue? \n\n\n", buttons); if (sel == 0) { - g_agi->quitGame(); + g_agi->restartGame = true; g_agi->setflag(fRestartGame, true); g_agi->_menu->enableAll(); } @@ -1331,7 +1331,7 @@ cmd(get_string) { do { g_agi->mainCycle(); - } while (game.inputMode == INPUT_GETSTRING && !g_agi->shouldQuit()); + } while (game.inputMode == INPUT_GETSTRING && !(g_agi->shouldQuit() || g_agi->restartGame)); } cmd(get_num) { @@ -1349,7 +1349,7 @@ cmd(get_num) { do { g_agi->mainCycle(); - } while (game.inputMode == INPUT_GETSTRING && !g_agi->shouldQuit()); + } while (game.inputMode == INPUT_GETSTRING && !(g_agi->shouldQuit() || g_agi->restartGame)); _v[p1] = atoi(game.strings[MAX_STRINGS]); debugC(4, kDebugLevelScripts, "[%s] -> %d", game.strings[MAX_STRINGS], _v[p1]); @@ -1745,7 +1745,7 @@ int AgiEngine::runLogic(int n) { curLogic->cIP = curLogic->sIP; timerHack = 0; - while (ip < _game.logics[n].size && !shouldQuit()) { + while (ip < _game.logics[n].size && !(shouldQuit() || restartGame)) { if (_debug.enabled) { if (_debug.steps > 0) { if (_debug.logic0 || n) { |