aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/cycle.cpp
diff options
context:
space:
mode:
authorMax Horn2008-09-01 17:46:05 +0000
committerMax Horn2008-09-01 17:46:05 +0000
commit42a5aa567b7bf0e8d834dff9d5313fd1e49e3c74 (patch)
treec2b928cdd59ea7eb7e6231a09b95e0700825a45e /engines/agi/cycle.cpp
parent027ae0a6f6bd7e7dfbfe6f7df0824596894f51ae (diff)
parent852bc9dbb750b9995d31e70f4158c97d3758c46f (diff)
downloadscummvm-rg350-42a5aa567b7bf0e8d834dff9d5313fd1e49e3c74.tar.gz
scummvm-rg350-42a5aa567b7bf0e8d834dff9d5313fd1e49e3c74.tar.bz2
scummvm-rg350-42a5aa567b7bf0e8d834dff9d5313fd1e49e3c74.zip
Merging more of the GSoC 2008 RTL branch: AGI
svn-id: r34242
Diffstat (limited to 'engines/agi/cycle.cpp')
-rw-r--r--engines/agi/cycle.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index e0babdf926..52c2ed8a78 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,14 @@ int AgiEngine::playGame() {
_game.vars[vKey] = 0;
}
- if (_game.quitProgNow == 0xff)
+ if (quit() == 0xff)
ec = errRestartGame;
- } while (_game.quitProgNow == 0);
+ if (shouldPerformAutoSave(_lastSaveTime)) {
+ saveGame(getSavegameFilename(0), "Autosave");
+ }
+
+ } while (quit() == 0);
_sound->stopSound();