[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.107,2.108

Max Horn fingolfin at users.sourceforge.net
Fri Sep 24 15:32:04 CEST 2004


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

Modified Files:
	charset.cpp 
Log Message:
Fix charset text in V7_SMOOTH_SCROLLING_HACK mode

Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.107
retrieving revision 2.108
diff -u -d -r2.107 -r2.108
--- charset.cpp	20 Sep 2004 22:03:59 -0000	2.107
+++ charset.cpp	24 Sep 2004 22:30:51 -0000	2.108
@@ -1289,21 +1289,28 @@
 		_hasMask = true;
 		_textScreenID = vs->number;
 	}
+	
+	Graphics::Surface dstSurface;
+	Graphics::Surface backSurface;
 	if (_ignoreCharsetMask || !vs->hasTwoBuffers) {
+		dstSurface = *vs;
 		dst = vs->getPixels(_left, drawTop);
 	} else {
+		dstSurface = _vm->gdi._textSurface;
 		dst = (byte *)_vm->gdi._textSurface.pixels + (_top - _vm->_screenTop) * _vm->gdi._textSurface.pitch + _left;
 	}
 
 	if (_blitAlso && vs->hasTwoBuffers) {
+		backSurface = dstSurface;
 		back = dst;
+		dstSurface = *vs;
 		dst = vs->getBackPixels(_left, drawTop);
 	}
 
 	if (is2byte) {
-		drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight);
+		drawBits1(dstSurface, dst, charPtr, drawTop, origWidth, origHeight);
 	} else {
-		drawBitsN(*vs, dst, charPtr, *_fontPtr, drawTop, origWidth, origHeight);
+		drawBitsN(dstSurface, dst, charPtr, *_fontPtr, drawTop, origWidth, origHeight);
 	}
 
 	if (_blitAlso && vs->hasTwoBuffers) {
@@ -1319,8 +1326,8 @@
 		int h = height;
 		do {
 			memcpy(back, dst, width);
-			back += vs->pitch;
-			dst += vs->pitch;
+			back += backSurface.pitch;
+			dst += dstSurface.pitch;
 		} while (--h);
 	}
 	





More information about the Scummvm-git-logs mailing list