[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.206,2.207 script_v2.cpp,2.188,2.189 scummvm.cpp,2.356,2.357

Travis Howell kirben at users.sourceforge.net
Thu Aug 28 23:47:04 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv11700/scumm

Modified Files:
	gfx.cpp script_v2.cpp scummvm.cpp 
Log Message:

Change zak room color remapping, so it work correctly after load/save in room with remapped colors.


Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.206
retrieving revision 2.207
diff -u -d -r2.206 -r2.207
--- gfx.cpp	29 Aug 2003 03:35:15 -0000	2.206
+++ gfx.cpp	29 Aug 2003 06:46:12 -0000	2.207
@@ -1346,11 +1346,12 @@
 	height >>= 3;
 	for (int y = 0; y < height; y++) {
 		_C64Colors[3] = (_C64ColorMap[y + stripnr * height] & 7);
+		// Check for room color change in V1 zak
 		if (_vm->_roomPalette[0] == 255) {
-			_vm->_roomPalette[0] = 0;
 			_C64Colors[2] = _vm->_roomPalette[2];
 			_C64Colors[1] = _vm->_roomPalette[1];
 		}
+
 		charIdx = _C64PicMap[y + stripnr * height] * 8;
 		for (int i = 0; i < 8; i++) {
 			byte c = _C64CharMap[charIdx + i];

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.188
retrieving revision 2.189
diff -u -d -r2.188 -r2.189
--- script_v2.cpp	27 Aug 2003 01:12:17 -0000	2.188
+++ script_v2.cpp	29 Aug 2003 06:46:12 -0000	2.189
@@ -1334,6 +1334,7 @@
 		break;
 	case 2:											/* room color */
 		if (_version == 1) {
+			// V1 zak needs to know when room color is changed
 			_roomPalette[0] = 255;
 			_roomPalette[1] = a;
 			_roomPalette[2] = b;

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.356
retrieving revision 2.357
diff -u -d -r2.356 -r2.357
--- scummvm.cpp	29 Aug 2003 03:35:15 -0000	2.356
+++ scummvm.cpp	29 Aug 2003 06:46:12 -0000	2.357
@@ -1946,6 +1946,10 @@
 	if (!roomptr || !roomResPtr)
 		error("Room %d: data not found (" __FILE__  ":%d)", _roomResource, __LINE__);
 
+	// Reset room color for V1 zak
+	if (_version == 1)
+		_roomPalette[0] = 0;
+
 	//
 	// Determine the room dimensions (width/height)
 	//





More information about the Scummvm-git-logs mailing list