[Scummvm-cvs-logs] CVS: scummvm/scumm wiz_he.cpp,2.11,2.12

Gregory Montoir cyx at users.sourceforge.net
Sat Feb 26 19:25:06 CET 2005


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

Modified Files:
	wiz_he.cpp 
Log Message:
fixed footdemo startup wizimage

Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.11
retrieving revision 2.12
diff -u -d -r2.11 -r2.12
--- wiz_he.cpp	27 Feb 2005 02:55:13 -0000	2.11
+++ wiz_he.cpp	27 Feb 2005 03:23:16 -0000	2.12
@@ -256,13 +256,13 @@
 void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor) {
 	Common::Rect r1, r2;
 	if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) {
-		if (flags & 0x400) {
+		if (flags & kWIFFlipX) {
 			int l = r1.left;
 			int r = r1.right;
 			r1.left = srcw - r;
 			r1.right = srcw - l;
 		}
-		if (flags & 0x800) {
+		if (flags & kWIFFlipY) {
 			int t = r1.top;
 			int b = r1.bottom;
 			r1.top = srch - b;
@@ -277,14 +277,22 @@
 		}
 		int h = r1.height();
 		int w = r1.width();
+		if (srcx < 0) {
+			src -= srcx;
+		}
+		if (srcy < 0) {
+			src -= srcy * srcw;
+		}
 		dst += r2.left + r2.top * dstw;
 		while (h--) {
+			const uint8 *p = src;
 			for (int i = 0; i < w; ++i) {
-				uint8 col = *src++;
+				uint8 col = *p++;
 				if (transColor == -1 || transColor != col) {
 					dst[i] = palPtr[col];
 				}
 			}
+			src += srcw;
 			dst += dstw;
 		}
 	}
@@ -863,6 +871,7 @@
 		uint32 comp   = READ_LE_UINT32(wizh + 0x0);
 		uint32 width  = READ_LE_UINT32(wizh + 0x4);
 		uint32 height = READ_LE_UINT32(wizh + 0x8);
+		debug(1, "wiz_header.comp = %d wiz_header.w = %d wiz_header.h = %d)", comp, width, height);
 		assert(comp == 0 || comp == 1 || comp == 2 || comp == 3 || comp == 10 || comp == 11);
 		
 		const uint8 *wizd = findWrappedBlock(MKID('WIZD'), dataPtr, pwi->state, 0);





More information about the Scummvm-git-logs mailing list