[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.419,2.420 saveload.cpp,1.198,1.199 saveload.h,1.50,1.51

Eugene Sandulenko sev at users.sourceforge.net
Fri Mar 25 14:11:44 CET 2005


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

Modified Files:
	gfx.cpp saveload.cpp saveload.h 
Log Message:
MM NES fixes:
  o Fixed crash when in-game GUI was displayed
  o Support for save/load
  o Savegame version bumped


Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.419
retrieving revision 2.420
diff -u -d -r2.419 -r2.420
--- gfx.cpp	25 Mar 2005 01:59:47 -0000	2.419
+++ gfx.cpp	25 Mar 2005 22:11:07 -0000	2.420
@@ -272,7 +272,7 @@
 		}
 	}
 
-	if (_features & GF_NES) {
+	if ((_features & GF_NES) && (h != _screenHeight)) {
 		adj = 16;
 		initVirtScreen(kUnkVirtScreen, 0, 0, _screenWidth, adj, false, false);
 	}

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -d -r1.198 -r1.199
--- saveload.cpp	25 Mar 2005 01:52:20 -0000	1.198
+++ saveload.cpp	25 Mar 2005 22:11:07 -0000	1.199
@@ -248,7 +248,10 @@
 	// ever add options for using different 16-colour palettes.
 	if (_version == 1) {
 		if (_gameId == GID_MANIAC)
-			setupV1ManiacPalette();
+			if (_features & GF_NES)
+				setupNESPalette();
+			else
+				setupV1ManiacPalette();
 		else
 			setupV1ZakPalette();
 	} else if (_features & GF_16COLOR) {
@@ -296,6 +299,7 @@
 
 	// Restore the virtual screens and force a fade to black.
 	initScreens(kMainVirtScreen, _screenHeight);
+
 	VirtScreen *vs = &virtscr[kMainVirtScreen];
 	memset(vs->getPixels(0, 0), 0, vs->pitch * vs->h);
 	vs->setDirtyRange(0, vs->h);
@@ -594,6 +598,8 @@
 		MKLINE(ScummEngine, _screenB, sleUint16, VER(8)),
 		MKLINE(ScummEngine, _screenH, sleUint16, VER(8)),
 
+		MKLINE(ScummEngine, _NESCostumeSet, sleUint16, VER(47)),
+
 		MK_OBSOLETE(ScummEngine, _cd_track, sleInt16, VER(9), VER(9)),
 		MK_OBSOLETE(ScummEngine, _cd_loops, sleInt16, VER(9), VER(9)),
 		MK_OBSOLETE(ScummEngine, _cd_frame, sleInt16, VER(9), VER(9)),
@@ -746,6 +752,12 @@
 		}
 	}
 
+	if (_features & GF_NES)
+		if (savegameVersion < VER(47))
+			NES_loadCostumeSet(_NESCostumeSet = 0);
+		else
+			NES_loadCostumeSet(_NESCostumeSet);
+
 	if (_heversion >= 71) {
 		Wiz *wiz = &((ScummEngine_v70he *)this)->_wiz;
 		s->saveLoadArrayOf(wiz->_polygons, ARRAYSIZE(wiz->_polygons), sizeof(wiz->_polygons[0]), polygonEntries);

Index: saveload.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- saveload.h	28 Feb 2005 13:23:10 -0000	1.50
+++ saveload.h	25 Mar 2005 22:11:08 -0000	1.51
@@ -32,7 +32,7 @@
 // Can be useful for other ports too :)
 
 #define VER(x) x
-#define CURRENT_VER 46
+#define CURRENT_VER 47
 
 // To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types,
 // we use a small trick: instead of 0 we use 42. Why? Well, it seems newer GCC





More information about the Scummvm-git-logs mailing list