diff options
Diffstat (limited to 'engines/agi/cycle.cpp')
-rw-r--r-- | engines/agi/cycle.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index e0babdf926..3d29f45ea5 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -24,7 +24,6 @@ */ - #include "agi/agi.h" #include "agi/sprite.h" #include "agi/graphics.h" @@ -116,7 +115,7 @@ void AgiEngine::interpretCycle() { oldSound = getflag(fSoundOn); _game.exitAllLogics = false; - while (runLogic(0) == 0 && !_game.quitProgNow) { + while (runLogic(0) == 0 && !quit()) { _game.vars[vWordNotFound] = 0; _game.vars[vBorderTouchObj] = 0; _game.vars[vBorderCode] = 0; @@ -314,7 +313,6 @@ int AgiEngine::playGame() { setvar(vTimeDelay, 2); /* "normal" speed */ _game.gfxMode = true; - _game.quitProgNow = false; _game.clockEnabled = true; _game.lineUserInput = 22; @@ -354,10 +352,16 @@ int AgiEngine::playGame() { _game.vars[vKey] = 0; } - if (_game.quitProgNow == 0xff) - ec = errRestartGame; + // FIXME: This has been broken with the merge of the RTL GSoC project. quit() returns a boolean, and we're trying to + // check it against 0xff, which is never going to be true + //if (quit() == 0xff) + // ec = errRestartGame; + + if (shouldPerformAutoSave(_lastSaveTime)) { + saveGame(getSavegameFilename(0), "Autosave"); + } - } while (_game.quitProgNow == 0); + } while (quit() == 0); _sound->stopSound(); |