[Scummvm-cvs-logs] CVS: scummvm/saga isomap.cpp,1.55,1.56 sprite.cpp,1.57,1.58

Eugene Sandulenko sev at users.sourceforge.net
Sat Jul 9 14:31:08 CEST 2005


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

Modified Files:
	isomap.cpp sprite.cpp 
Log Message:
Fix bug #1235211: "SAGA: Fails to compile with gcc4.0"


Index: isomap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/isomap.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- isomap.cpp	9 Jul 2005 16:23:44 -0000	1.55
+++ isomap.cpp	9 Jul 2005 21:29:54 -0000	1.56
@@ -867,8 +867,9 @@
 					col++;
 				}
 				while ((col < _tileClip.right) && (count < fgRunCount)) {
-					assert((uint)ds->pixels <= (uint)(drawPointer + count));
-					assert(((uint)ds->pixels + (_vm->getDisplayWidth() * _vm->getDisplayHeight())) > (uint)(drawPointer + count));
+					assert((byte *)ds->pixels <= (byte *)(drawPointer + count));
+					assert((byte *)((byte *)ds->pixels + (_vm->getDisplayWidth() *
+								 _vm->getDisplayHeight())) > (byte *)(drawPointer + count));
 					drawPointer[count] = readPointer[count];
 					count++;
 					col++;

Index: sprite.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sprite.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- sprite.cpp	9 Jul 2005 16:23:45 -0000	1.57
+++ sprite.cpp	9 Jul 2005 21:29:54 -0000	1.58
@@ -203,10 +203,11 @@
 	}
 	for (i = io; i < clipHeight; i++) {
 		for (j = jo; j < clipWidth; j++) {
-			assert((uint)ds->pixels <= (uint)(bufRowPointer + j + spritePointer.x));
-			assert(((uint)ds->pixels + (_vm->getDisplayWidth() * _vm->getDisplayHeight())) > (uint)(bufRowPointer + j + spritePointer.x));
-			assert((uint)spriteBuffer <= (uint)(srcRowPointer + j));
-			assert(((uint)spriteBuffer + (width * height)) > (uint)(srcRowPointer + j));
+			assert((byte *)ds->pixels <= (byte *)(bufRowPointer + j + spritePointer.x));
+			assert(((byte *)ds->pixels + (_vm->getDisplayWidth() *
+				 _vm->getDisplayHeight())) > (byte *)(bufRowPointer + j + spritePointer.x));
+			assert((const byte *)spriteBuffer <= (const byte *)(srcRowPointer + j));
+			assert(((const byte *)spriteBuffer + (width * height)) > (const byte *)(srcRowPointer + j));
 
 			if (*(srcRowPointer + j) != 0) {
 				*(bufRowPointer + j + spritePointer.x) = *(srcRowPointer + j);





More information about the Scummvm-git-logs mailing list