diff options
Diffstat (limited to 'engines/agi/cycle.cpp')
-rw-r--r-- | engines/agi/cycle.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 52c2ed8a78..e0babdf926 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -24,6 +24,7 @@ */ + #include "agi/agi.h" #include "agi/sprite.h" #include "agi/graphics.h" @@ -115,7 +116,7 @@ void AgiEngine::interpretCycle() { oldSound = getflag(fSoundOn); _game.exitAllLogics = false; - while (runLogic(0) == 0 && !quit()) { + while (runLogic(0) == 0 && !_game.quitProgNow) { _game.vars[vWordNotFound] = 0; _game.vars[vBorderTouchObj] = 0; _game.vars[vBorderCode] = 0; @@ -313,6 +314,7 @@ int AgiEngine::playGame() { setvar(vTimeDelay, 2); /* "normal" speed */ _game.gfxMode = true; + _game.quitProgNow = false; _game.clockEnabled = true; _game.lineUserInput = 22; @@ -352,14 +354,10 @@ int AgiEngine::playGame() { _game.vars[vKey] = 0; } - if (quit() == 0xff) + if (_game.quitProgNow == 0xff) ec = errRestartGame; - if (shouldPerformAutoSave(_lastSaveTime)) { - saveGame(getSavegameFilename(0), "Autosave"); - } - - } while (quit() == 0); + } while (_game.quitProgNow == 0); _sound->stopSound(); |