[Scummvm-cvs-logs] CVS: scummvm sdl.cpp,1.115,1.116

Max Horn fingolfin at users.sourceforge.net
Thu May 9 10:40:03 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv358

Modified Files:
	sdl.cpp 
Log Message:
fixed redraw bug in SDL backend

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- sdl.cpp	7 May 2002 22:06:06 -0000	1.115
+++ sdl.cpp	9 May 2002 17:39:38 -0000	1.116
@@ -467,14 +467,16 @@
 #define DOLINE(x) a ^= ((uint32*)buf)[0+(x)*(SCREEN_WIDTH/4)]; b ^= ((uint32*)buf)[1+(x)*(SCREEN_WIDTH/4)]
 void OSystem_SDL::mk_checksums(const byte *buf) {
 	uint32 *sums = dirty_checksums;
-	int x,y;
+	uint x,y;
+	const uint last_x = (uint)SCREEN_WIDTH/8;
+	const uint last_y = (uint)SCREEN_HEIGHT/8;
 
 	/* the 8x8 blocks in buf are enumerated starting in the top left corner and
 	 * reading each line at a time from left to right */
-	for(y=0; y!=SCREEN_HEIGHT/8; y++,buf+=SCREEN_WIDTH*(8-1))
-		for(x=0; x!=SCREEN_WIDTH/8; x++,buf+=8) {
-			int32 a = x;
-			int32 b = y;
+	for(y=0; y != last_y; y++, buf+=SCREEN_WIDTH*(8-1))
+		for(x=0; x != last_x; x++, buf+=8) {
+			uint32 a = x;
+			uint32 b = y;
 
 			DOLINE(0); ROL(a,13); ROL(b,11);
 			DOLINE(2); ROL(a,13); ROL(b,11);





More information about the Scummvm-git-logs mailing list