aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/saveload.cpp
diff options
context:
space:
mode:
authorChristopher Page2008-08-10 22:53:43 +0000
committerChristopher Page2008-08-10 22:53:43 +0000
commitc9e0422722eadeabdd0fd0dfe8591f90a3f00e89 (patch)
tree9adb237ac2912c3048272678e406c2f96f7c02f8 /engines/agi/saveload.cpp
parentfcc00f20b93d719c9f7bce848ed7c3600be982b9 (diff)
downloadscummvm-rg350-c9e0422722eadeabdd0fd0dfe8591f90a3f00e89.tar.gz
scummvm-rg350-c9e0422722eadeabdd0fd0dfe8591f90a3f00e89.tar.bz2
scummvm-rg350-c9e0422722eadeabdd0fd0dfe8591f90a3f00e89.zip
Added Autosave support for AGI
svn-id: r33772
Diffstat (limited to 'engines/agi/saveload.cpp')
-rw-r--r--engines/agi/saveload.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 1589611c01..0b308bb37b 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -214,6 +214,9 @@ int AgiEngine::saveGame(const char *fileName, const char *description) {
delete out;
debugC(3, kDebugLevelMain | kDebugLevelSavegame, "Closed %s", fileName);
+
+ _lastSaveTime = _system->getMillis();
+
return result;
}
@@ -699,13 +702,18 @@ int AgiEngine::saveGameDialog() {
sprintf(fileName, "%s", getSavegameFilename(slot));
- drawWindow(hp, vp, GFX_WIDTH - hp, GFX_HEIGHT - vp);
- printText("Select a slot in which you wish to\nsave the game:",
- 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOUR);
- slot = selectSlot();
- if (slot < 0)
- return errOK;
+ do {
+ drawWindow(hp, vp, GFX_WIDTH - hp, GFX_HEIGHT - vp);
+ printText("Select a slot in which you wish to\nsave the game:",
+ 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOUR);
+ slot = selectSlot();
+ if (slot == 0)
+ messageBox("That slot is for Autosave only.");
+ else if (slot < 0)
+ return errOK;
+ }
+ while (slot == 0);
drawWindow(hp, vp + 5 * CHAR_LINES, GFX_WIDTH - hp,
GFX_HEIGHT - vp - 9 * CHAR_LINES);