aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-07-09 21:29:54 +0000
committerEugene Sandulenko2005-07-09 21:29:54 +0000
commit02d28a96ceb5c8c60aea82166b1ad92f83d660d2 (patch)
tree47f0d4b0f12804f49e143a191ee43f7e1b4a2190
parent237eefba64129b28f9815303fc8a5299c3cfb448 (diff)
downloadscummvm-rg350-02d28a96ceb5c8c60aea82166b1ad92f83d660d2.tar.gz
scummvm-rg350-02d28a96ceb5c8c60aea82166b1ad92f83d660d2.tar.bz2
scummvm-rg350-02d28a96ceb5c8c60aea82166b1ad92f83d660d2.zip
Fix bug #1235211: "SAGA: Fails to compile with gcc4.0"
svn-id: r18526
-rw-r--r--saga/isomap.cpp5
-rw-r--r--saga/sprite.cpp9
2 files changed, 8 insertions, 6 deletions
diff --git a/saga/isomap.cpp b/saga/isomap.cpp
index 333f8f6c8e..311d445afd 100644
--- a/saga/isomap.cpp
+++ b/saga/isomap.cpp
@@ -867,8 +867,9 @@ void IsoMap::drawTile(Surface *ds, uint16 tileIndex, const Point &point, const L
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++;
diff --git a/saga/sprite.cpp b/saga/sprite.cpp
index 4078e617c2..2c469a3066 100644
--- a/saga/sprite.cpp
+++ b/saga/sprite.cpp
@@ -203,10 +203,11 @@ void Sprite::drawClip(Surface *ds, const Rect &clipRect, const Point &spritePoin
}
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);