[Scummvm-cvs-logs] CVS: scummvm/scumm palette.cpp,2.39,2.40 room.cpp,1.9,1.10

Max Horn fingolfin at users.sourceforge.net
Tue Apr 26 07:27:27 CEST 2005


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

Modified Files:
	palette.cpp room.cpp 
Log Message:
Since we don't store _CLUT_offs anymore, we can clean up the code related to it now

Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/palette.cpp,v
retrieving revision 2.39
retrieving revision 2.40
diff -u -d -r2.39 -r2.40
--- palette.cpp	19 Apr 2005 20:18:28 -0000	2.39
+++ palette.cpp	26 Apr 2005 14:24:29 -0000	2.40
@@ -211,7 +211,6 @@
 
 	if (numcolor < 0) {
 		if (_features & GF_SMALL_HEADER) {
-			ptr += _resourceHeaderSize;
 			if (_features & GF_OLD256)
 				numcolor = READ_LE_UINT16(ptr);
 			else

Index: room.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/room.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- room.cpp	26 Apr 2005 10:58:49 -0000	1.9
+++ room.cpp	26 Apr 2005 14:24:29 -0000	1.10
@@ -384,23 +384,9 @@
 		_EPAL_offs = ptr - roomptr;
 
 	// Locate the standard room palette (for V3-V5 games).
-	// TODO: We used to use findResourceSmall instead of findResourceData;
-	// in the small header case. That means we have to do some ugly trickery
-	// in order to emulate the old behaviour. It would be very nice to get
-	// rid of that. That would require some changes to the palette code.
-	// In particular, it seems only setPaletteFromPtr would have to be
-	// adapted, which would be trivial, since it now adds _resourceHeaderSize
-	// to the palette pointer.
-	//
-	// Of course this would break savegame compatibility unless extra code
-	// were added to the save/load system to cope with this. 
 	ptr = findResourceData(MKID('CLUT'), roomptr);
-
-	if (ptr) {
-		if ((_features & GF_SMALL_HEADER) && ptr)
-			ptr -= _resourceHeaderSize;
+	if (ptr)
 		_CLUT_offs = ptr - roomptr;
-	}
 
 	// Locate the standard room palettes (for V6+ games).
 	if (_version >= 6) {





More information about the Scummvm-git-logs mailing list