[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.162,1.163 resource.cpp,1.229,1.230

Travis Howell kirben at users.sourceforge.net
Sun Jul 25 21:04:09 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21497/scumm

Modified Files:
	saveload.cpp resource.cpp 
Log Message:

VAR_ROOM_FLAG should always be set after load of saved game.
Other VAR_ROOM_FLAG setting in scumm5 specific.


Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -d -r1.162 -r1.163
--- saveload.cpp	25 Jul 2004 11:29:38 -0000	1.162
+++ saveload.cpp	26 Jul 2004 04:03:11 -0000	1.163
@@ -228,9 +228,14 @@
 		_scummVars[VAR_CAMERA_ACCEL_Y] = _scummVars[110];
 	}
 
-	// Sync with current config setting
-	if (_version >= 7)
-		VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles");
+	// With version 22, we replaced the scale items with scale slots. So when
+	// loading such an old save game, try to upgrade the old to new format.
+	if (hdr.ver < VER(22)) {
+		// Convert all rtScaleTable resources to matching scale items
+		for (i = 1; i < res.num[rtScaleTable]; i++) {
+			convertScaleTableToScaleSlot(i);
+		}
+	}
 
 	// We could simply dirty colours 0-15 for 16-colour games -- nowadays
 	// they handle their palette pretty much like the more recent games
@@ -290,15 +295,6 @@
 	// Reset charset mask
 	_charset->_hasMask = false;
 
-	// With version 22, we replaced the scale items with scale slots. So when
-	// loading such an old save game, try to upgrade the old to new format.
-	if (hdr.ver < VER(22)) {
-		// Convert all rtScaleTable resources to matching scale items
-		for (i = 1; i < res.num[rtScaleTable]; i++) {
-			convertScaleTableToScaleSlot(i);
-		}
-	}
-
 	_lastCodePtr = NULL;
 	_drawObjectQueNr = 0;
 	_verbMouseOver = 0;
@@ -307,6 +303,13 @@
 
 	initBGBuffers(_roomHeight);
 
+	if (VAR_ROOM_FLAG != 0xFF)
+		VAR(VAR_ROOM_FLAG) = 1;
+
+	// Sync with current config setting
+	if (_version >= 7)
+		VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles");
+
 	CHECK_HEAP
 	debug(1, "State loaded from '%s'", filename);
 

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.229
retrieving revision 1.230
diff -u -d -r1.229 -r1.230
--- resource.cpp	17 Jul 2004 10:25:22 -0000	1.229
+++ resource.cpp	26 Jul 2004 04:03:11 -0000	1.230
@@ -625,7 +625,7 @@
 
 	loadResource(type, i);
 
-	if (VAR_ROOM_FLAG != 0xFF)
+	if (_version == 5)
 		if (type == rtRoom && i == _roomResource)
 			VAR(VAR_ROOM_FLAG) = 1;
 }





More information about the Scummvm-git-logs mailing list