[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.163,2.164

Bertrand Augereau tramboi at users.sourceforge.net
Sun Jun 22 10:23:03 CEST 2003


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

Modified Files:
	gfx.cpp 
Log Message:
Special case for screen-wide blits

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.163
retrieving revision 2.164
diff -u -d -r2.163 -r2.164
--- gfx.cpp	17 Jun 2003 14:52:23 -0000	2.163
+++ gfx.cpp	22 Jun 2003 17:22:40 -0000	2.164
@@ -506,11 +506,16 @@
 	assert(src != NULL);
 	assert(dst != NULL);
 
-	do {
-		memcpy(dst, src, w);
-		dst += _screenWidth;
-		src += _screenWidth;
-	} while (--h);
+	if (w==_screenWidth)
+		memcpy (dst, src, w*h);
+	else
+	{
+		do {
+			memcpy(dst, src, w);
+			dst += _screenWidth;
+			src += _screenWidth;
+		} while (--h);
+	}
 }
 
 void Scumm::drawBox(int x, int y, int x2, int y2, int color) {





More information about the Scummvm-git-logs mailing list