[Scummvm-cvs-logs] SF.net SVN: scummvm: [26911] scummvm/trunk/engines/agos/saveload.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Tue May 22 13:22:59 CEST 2007
Revision: 26911
http://scummvm.svn.sourceforge.net/scummvm/?rev=26911&view=rev
Author: kirben
Date: 2007-05-22 04:22:59 -0700 (Tue, 22 May 2007)
Log Message:
-----------
Add support for the saved game overwrite check script in Waxworks.
Modified Paths:
--------------
scummvm/trunk/engines/agos/saveload.cpp
Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp 2007-05-22 10:51:24 UTC (rev 26910)
+++ scummvm/trunk/engines/agos/saveload.cpp 2007-05-22 11:22:59 UTC (rev 26911)
@@ -215,12 +215,13 @@
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 @@
saveTime = time(NULL);
- haltAnimation();
+ if (getGameType() == GType_ELVIRA2)
+ haltAnimation();
numSaveGames = countSaveGames();
_numSaveGameRows = numSaveGames;
@@ -240,12 +242,11 @@
listSaveGames(buf);
- name = buf + 192;
- _saveGameNameLen = 0;
+ if (!load) {
+ WindowBlock *window = _windowArray[num];
+ name = buf + 192;
- if (!load) {
for (;;) {
- window = _windowArray[num];
windowPutChar(window, 127);
_saveLoadEdit = true;
@@ -253,7 +254,17 @@
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 @@
_gameStoppedClock = time(NULL) - saveTime + _gameStoppedClock;
- restartAnimation();
+ if (getGameType() == GType_ELVIRA2)
+ restartAnimation();
}
int AGOSEngine::userGameGetKey(bool *b, char *buf, uint maxChar) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list