[Scummvm-cvs-logs] CVS: scummvm vars.cpp,1.10,1.11 scummvm.cpp,1.174,1.175

James Brown ender at users.sourceforge.net
Sat Jul 13 20:02:02 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv32025

Modified Files:
	vars.cpp scummvm.cpp 
Log Message:
Reapply the Zak cashcard var exclusions... two of them somehow vanished
out of the code during rewrites.



Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/vars.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- vars.cpp	24 Apr 2002 04:26:09 -0000	1.10
+++ vars.cpp	14 Jul 2002 03:01:36 -0000	1.11
@@ -88,10 +88,10 @@
 	VAR_SOUNDPARAM3 = 66;
 	VAR_MOUSEPRESENT = 67;
 	VAR_PERFORMANCE_1 = 68;
-	VAR_PERFORMANCE_2 = 69;
-	VAR_ROOM_FLAG = 70;
-	VAR_GAME_LOADED = 71;
-	VAR_NEW_ROOM = 72;
+	VAR_PERFORMANCE_2 = 69;	// Zak256 Note: Cashcard for Zak
+	VAR_ROOM_FLAG = 70;	// Zak256 Note: Cashcard for Annie
+	VAR_GAME_LOADED = 71;	// Zak256 Note: Cashcard for Melissa
+	VAR_NEW_ROOM = 72;	// Zak256 Note: Cashcard for Leslie
 	VAR_VERSION = 75;
 
 	VAR_V5_DRAWFLAGS = 9;

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -d -r1.174 -r1.175
--- scummvm.cpp	13 Jul 2002 22:41:28 -0000	1.174
+++ scummvm.cpp	14 Jul 2002 03:01:36 -0000	1.175
@@ -276,13 +276,16 @@
 	if (_saveLoadFlag) {
 		if (_saveLoadFlag == 1) {
 			saveState(_saveLoadSlot, _saveLoadCompatible);
-			if (_saveLoadCompatible)
+			// Ender: Disabled for small_header games, as
+			// can overwrite game variables (eg, Zak256 cashcards)
+			if (_saveLoadCompatible && !(features & GF_SMALL_HEADER)
 				_vars[VAR_GAME_LOADED] = 201;
 		} else {
 			loadState(_saveLoadSlot, _saveLoadCompatible);
-			if (_saveLoadCompatible) {
+			// Ender: Disabled for small_header games, as
+			// can overwrite game variables (eg, Zak256 cashcards)
+ 			if (_saveLoadCompatible && !(features & GF_SMALL_HEADER))
 				_vars[VAR_GAME_LOADED] = 203;
-			}
 		}
 		_saveLoadFlag = 0;
 	}
@@ -404,7 +407,9 @@
 		}
 	}
 
-	_vars[VAR_NEW_ROOM] = room;
+	if (!(features & GF_SMALL_HEADER))  // Disable for SH games. Overwrites
+		_vars[VAR_NEW_ROOM] = room; // gamevars, eg Zak cashcards
+
 	runExitScript();
 	killScriptsAndResources();
 	clearEnqueue();





More information about the Scummvm-git-logs mailing list