[Scummvm-cvs-logs] CVS: scummvm/scumm script_v8.cpp,2.90,2.91 scummvm.cpp,2.29,2.30 vars.cpp,1.31,1.32
James Brown
ender at users.sourceforge.net
Thu Jan 2 00:40:21 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv6144/scumm
Modified Files:
script_v8.cpp scummvm.cpp vars.cpp
Log Message:
implement temporary state saving for CMI
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.90
retrieving revision 2.91
diff -u -d -r2.90 -r2.91
--- script_v8.cpp 1 Jan 2003 17:57:13 -0000 2.90
+++ script_v8.cpp 2 Jan 2003 08:39:33 -0000 2.91
@@ -930,10 +930,14 @@
setPalette(pop()); // fixme: i think this is right
break;
case 0x5D: // SO_ROOM_SAVE_GAME Save game
- warning("V8 Save game opcode not implemented");
+ _saveLoadCompatible = true;
+ _saveLoadSlot = 1;
+ _saveLoadFlag = 1;
break;
case 0x5E: // SO_ROOM_LOAD_GAME Load game
- warning("V8 Load game opcode not implemented");
+ _saveLoadCompatible = true;
+ _saveLoadSlot = 1;
+ _saveLoadFlag = 2;
break;
case 0x5F: // SO_ROOM_SATURATION Set saturation of room colors
e = pop();
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.29
retrieving revision 2.30
diff -u -d -r2.29 -r2.30
--- scummvm.cpp 1 Jan 2003 07:12:57 -0000 2.29
+++ scummvm.cpp 2 Jan 2003 08:39:33 -0000 2.30
@@ -445,6 +445,7 @@
_saveLoadCompatible = false;
}
+ _vars[VAR_GAME_LOADED] = 0;
if (_saveLoadFlag) {
bool success;
const char *errMsg = "Succesfully saved game state to file:\n\n%s";
@@ -454,16 +455,19 @@
success = saveState(_saveLoadSlot, _saveLoadCompatible);
if (!success)
errMsg = "Failed to save game state to file:\n\n%s";
- // Ender: Disabled for small_header games, as
- // can overwrite game variables (eg, Zak256 cashcards)
- if (success && _saveLoadCompatible && !(_features & GF_SMALL_HEADER))
+
+ // Ender: Disabled for small_header games, as can overwrite game
+ // variables (eg, Zak256 cashcard values). Temp disabled for V8
+ // because of odd timing issue with scripts and the variable reset
+ if (success && _saveLoadCompatible && !(_features & GF_SMALL_HEADER) && !(_features & GF_AFTER_V8))
_vars[VAR_GAME_LOADED] = 201;
} else {
success = loadState(_saveLoadSlot, _saveLoadCompatible);
if (!success)
errMsg = "Failed to load game state from file:\n\n%s";
- // Ender: Disabled for small_header games, as
- // can overwrite game variables (eg, Zak256 cashcards)
+
+ // Ender: Disabled for small_header games, as can overwrite game
+ // variables (eg, Zak256 cashcard values).
if (success && _saveLoadCompatible && !(_features & GF_SMALL_HEADER))
_vars[VAR_GAME_LOADED] = 203;
}
@@ -1569,7 +1573,6 @@
int new_time;
for(;;) {
-
updatePalette();
_system->update_screen();
Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- vars.cpp 1 Jan 2003 21:51:12 -0000 1.31
+++ vars.cpp 2 Jan 2003 08:39:33 -0000 1.32
@@ -239,6 +239,7 @@
VAR_ROOM = 31;
//VAR_VOICE_MODE = 39; // 0 is voice, 1 is voice+text, 2 is text only
+ VAR_GAME_LOADED = 40;
VAR_CURRENTDISK = 42;
VAR_SCROLL_SCRIPT = 50; // FIXME - guess based on where this is in V7
More information about the Scummvm-git-logs
mailing list