[Scummvm-cvs-logs] CVS: scummvm/scumm wiz_he.cpp,2.120,2.121

Gregory Montoir cyx at users.sourceforge.net
Tue Jan 31 11:29:10 CET 2006


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

Modified Files:
	wiz_he.cpp 
Log Message:
Use the pitch of a virtual screen surface instead of the width to skip a scanline.

Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.120
retrieving revision 2.121
diff -u -d -r2.120 -r2.121
--- wiz_he.cpp	31 Jan 2006 02:54:37 -0000	2.120
+++ wiz_he.cpp	31 Jan 2006 19:28:19 -0000	2.121
@@ -1246,7 +1246,7 @@
 	uint8 *srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, shadow, 0, r, kWIFBlitToMemBuffer, 0, palette);
 	if (srcWizBuf) {
 		uint8 *dst;
-		int32 dstw, dsth, wizW, wizH;
+		int32 dstw, dsth, dstpitch, wizW, wizH;
 		VirtScreen *pvs = &_vm->virtscr[kMainVirtScreen];
 		int transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : 5;
 
@@ -1256,6 +1256,7 @@
 			dst = _vm->findWrappedBlock(MKID('WIZD'), dstPtr, 0, 0);
 			assert(dst);
 			getWizImageDim(dstResNum, 0, dstw, dsth);
+			dstpitch = dstw;
 		} else {
 			if (flags & kWIFMarkBufferDirty) {
 				dst = pvs->getPixels(0, 0);
@@ -1264,6 +1265,7 @@
 			}
 			dstw = pvs->w;
 			dsth = pvs->h;
+			dstpitch = pvs->pitch;
 		}
 
 		getWizImageDim(resNum, state, wizW, wizH);
@@ -1318,7 +1320,7 @@
 
 		pdd.rAreasNum = 0;
 		PolygonDrawData::ResultArea *pra = &pdd.ra[0];
-		int32 yoff = pdd.mat[0].y * dstw;
+		int32 yoff = pdd.mat[0].y * dstpitch;
 		int16 y_start = pdd.mat[0].y;
 		for (i = 0; i < pdd.pAreasNum; ++i) {
 			PolygonDrawData::PolygonArea *ppa = &pdd.pa[i];
@@ -1350,7 +1352,7 @@
 				}
 			}
 			++ppa;
-			yoff += dstw;
+			yoff += dstpitch;
 			++y_start;
 		}
 





More information about the Scummvm-git-logs mailing list