[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.44,2.45 scummvm.cpp,2.77,2.78

Pawel Kolodziejski aquadran at users.sourceforge.net
Thu Apr 10 12:31:01 CEST 2003


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

Modified Files:
	gfx.cpp scummvm.cpp 
Log Message:
fixed zplanes and a little palette changes for ega blocked games

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.44
retrieving revision 2.45
diff -u -d -r2.44 -r2.45
--- gfx.cpp	10 Apr 2003 12:20:36 -0000	2.44
+++ gfx.cpp	10 Apr 2003 19:29:59 -0000	2.45
@@ -858,13 +858,22 @@
 	numzbuf = _disable_zbuffer ? 0 : _numZBuffer;
 	assert(numzbuf <= (int)ARRAYSIZE(zplane_list));
 
-	if (_vm->_features & GF_SMALL_HEADER) {
+	if (_vm->_gameId == GID_MONKEY_EGA) {
+		byte *ptr_z = smap_ptr;
+		for (i = 0; i < numzbuf; i++) {
+			int off = READ_LE_UINT16(ptr_z);
+			if (off) {
+				zplane_list[i] = ptr_z;
+				ptr_z += off;
+			}
+		}
+	} else if (_vm->_features & GF_SMALL_HEADER) {
 		/* this is really ugly, FIXME */
 		if ((ptr[-2] == 'B' && ptr[-1] == 'M' && READ_LE_UINT32(ptr - 6) > (READ_LE_UINT32(ptr) + 10)) ||
 		    (ptr[-4] == 'O' && ptr[-3] == 'I' && READ_LE_UINT32(ptr - 8) > READ_LE_UINT32(ptr) + 12)) {
 			zplane_list[1] = smap_ptr + READ_LE_UINT32(ptr);
 			// FIXME - how does GF_OLD256 encode the multiple zplanes?
-			if (!(_vm->_features & GF_AFTER_V3))
+			if (!(_vm->_features & GF_OLD256))
 				for (i = 2; i < numzbuf; i++) {
 					zplane_list[i] = zplane_list[i-1] + READ_LE_UINT16(zplane_list[i-1]);
 			}

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.77
retrieving revision 2.78
diff -u -d -r2.77 -r2.78
--- scummvm.cpp	10 Apr 2003 12:13:09 -0000	2.77
+++ scummvm.cpp	10 Apr 2003 19:30:01 -0000	2.78
@@ -320,8 +320,8 @@
 		byte pal16[16 * 4] = {
 			0,   0,  0,  0,   0,   0,  168, 0,   0,   168, 0,  0,   0,   168, 168, 0,
 			168, 0,  0,  0,   168, 0,  168, 0,   168, 84,  0,  0,   168, 168, 168, 0,
-			84,  84, 84, 0,   84,  84, 168, 0,   84,  252, 84, 0,   84,  252, 252, 0,
-			252, 84, 84, 0,   252, 84, 252, 0,   252, 252, 84, 0,   252, 252, 252, 0
+			84,  84, 84, 0,   84,  84, 168, 0,   0,   252, 0,  0,   0,   252, 252, 0,
+			252, 84, 84, 0,   252, 0,  252, 0,   252, 252, 0,  0,   252, 252, 252, 0
 		};
 		_system->set_palette(pal16, 0, 16);
 	}





More information about the Scummvm-git-logs mailing list