diff options
Diffstat (limited to 'saga')
-rw-r--r-- | saga/isomap.cpp | 5 | ||||
-rw-r--r-- | saga/sprite.cpp | 9 |
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); |