diff options
author | Travis Howell | 2007-05-22 11:22:59 +0000 |
---|---|---|
committer | Travis Howell | 2007-05-22 11:22:59 +0000 |
commit | ca0a75a9d0f205c93b0510218a7713ea997dccc0 (patch) | |
tree | a377ec763c8c56c7fee651fea0594715e34b592d | |
parent | 49336a857e58181e69ff33e1327d839177614e84 (diff) | |
download | scummvm-rg350-ca0a75a9d0f205c93b0510218a7713ea997dccc0.tar.gz scummvm-rg350-ca0a75a9d0f205c93b0510218a7713ea997dccc0.tar.bz2 scummvm-rg350-ca0a75a9d0f205c93b0510218a7713ea997dccc0.zip |
Add support for the saved game overwrite check script in Waxworks.
svn-id: r26911
-rw-r--r-- | engines/agos/saveload.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index 9d8737f23e..bd9efcc81c 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -215,12 +215,13 @@ void AGOSEngine::listSaveGames(char *dst) { window->textColumn = 0; window->textColumnOffset = 4; window->textLength = 0; + + _saveGameNameLen = 0; } void AGOSEngine::userGame(bool load) { time_t saveTime; int i, numSaveGames; - WindowBlock *window; char *name; bool b; char buf[200]; @@ -229,7 +230,8 @@ void AGOSEngine::userGame(bool load) { saveTime = time(NULL); - haltAnimation(); + if (getGameType() == GType_ELVIRA2) + haltAnimation(); numSaveGames = countSaveGames(); _numSaveGameRows = numSaveGames; @@ -240,12 +242,11 @@ void AGOSEngine::userGame(bool load) { listSaveGames(buf); - name = buf + 192; - _saveGameNameLen = 0; - if (!load) { + WindowBlock *window = _windowArray[num]; + name = buf + 192; + for (;;) { - window = _windowArray[num]; windowPutChar(window, 127); _saveLoadEdit = true; @@ -253,7 +254,17 @@ void AGOSEngine::userGame(bool load) { i = userGameGetKey(&b, buf, 128); if (b) { if (i <= 223) { - // TODO; Run the overwrite check script in Waxworks + if (getGameType() == GType_WW) { + Subroutine *sub = getSubroutineByID(80); + if (sub != NULL) + startSubroutineEx(sub); + + if (_variableArray[253] != 0) { + listSaveGames(buf); + continue; + } + } + if (!saveGame(_saveLoadRowCurPos + i, buf + i * 8)) fileError(_windowArray[num], true); } @@ -292,7 +303,8 @@ get_out:; _gameStoppedClock = time(NULL) - saveTime + _gameStoppedClock; - restartAnimation(); + if (getGameType() == GType_ELVIRA2) + restartAnimation(); } int AGOSEngine::userGameGetKey(bool *b, char *buf, uint maxChar) { |