aboutsummaryrefslogtreecommitdiff
path: root/scumm/akos.cpp
diff options
context:
space:
mode:
authorMax Horn2004-04-04 22:43:54 +0000
committerMax Horn2004-04-04 22:43:54 +0000
commit21b81b9ef473f97838f7fe9cb5911a962cc633bd (patch)
tree702b4f43d83014126bd61723014d3203c6e28798 /scumm/akos.cpp
parent71bbdbfae41545f68713642bb9f395cb234bb60c (diff)
downloadscummvm-rg350-21b81b9ef473f97838f7fe9cb5911a962cc633bd.tar.gz
scummvm-rg350-21b81b9ef473f97838f7fe9cb5911a962cc633bd.tar.bz2
scummvm-rg350-21b81b9ef473f97838f7fe9cb5911a962cc633bd.zip
Fix signedness issue (lead to incorred address computations on 64 bit machines)
svn-id: r13465
Diffstat (limited to 'scumm/akos.cpp')
-rw-r--r--scumm/akos.cpp17
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)