diff options
Diffstat (limited to 'scumm/akos.cpp')
-rw-r--r-- | scumm/akos.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 61b5b0aea0..35c6503e4b 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -347,7 +347,8 @@ void AkosRenderer::codec1_genericDecode() { const byte *mask, *src; byte *dst; byte len, maskbit; - uint y, color, height, pcolor; + int y; + uint color, height, pcolor; const byte *scaleytab; bool masked; bool skip_column = false; @@ -376,7 +377,7 @@ void AkosRenderer::codec1_genericDecode() { do { if (*scaleytab++ < _scaleY) { if (_actorHitMode) { - if (color && (int16) y == _actorHitY && v1.x == _actorHitX) { + if (color && y == _actorHitY && v1.x == _actorHitX) { _actorHitResult = true; return; } @@ -413,7 +414,7 @@ void AkosRenderer::codec1_genericDecode() { if (v1.scaletable[v1.scaleXindex] < _scaleX) { v1.x += v1.scaleXstep; - if (v1.x < 0 || v1.x >= (int)_outwidth) + if (v1.x < 0 || v1.x >= _outwidth) return; maskbit = revBitMask[v1.x & 7]; v1.destptr += v1.scaleXstep; @@ -613,7 +614,7 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) { j = startScaleIndexX; for (i = 0, skip = 0; i < _width; i++) { - if (rect.left >= (int)_outwidth) { + if (rect.left >= _outwidth) { startScaleIndexX = j; skip++; } @@ -678,10 +679,10 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) { } else _vm->markRectAsDirty(kMainVirtScreen, rect, _actorID); - if (rect.top >= (int)_outheight || rect.bottom <= 0) + if (rect.top >= _outheight || rect.bottom <= 0) return 0; - if (rect.left >= (int)_outwidth || rect.right <= 0) + if (rect.left >= _outwidth || rect.right <= 0) return 0; v1.replen = 0; @@ -724,10 +725,10 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) { if (v1.skip_width <= 0 || _height <= 0) return 0; - if ((uint) rect.top > _outheight) + if (rect.top > _outheight) rect.top = 0; - if ((uint) rect.bottom > _outheight) + if (rect.bottom > _outheight) rect.bottom = _outheight; if (_draw_top > rect.top) |