aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-17 11:42:47 +0000
committerEugene Sandulenko2010-08-17 11:42:47 +0000
commit1ac434165d047c0b61cd77c4ba4e206172ca511d (patch)
tree362d0f42ec8e20e4723ae8dcb95a22db12039c18 /engines/hugo
parent56ec4fc353fc0fddaa3d046cbeeb9393c16c453a (diff)
downloadscummvm-rg350-1ac434165d047c0b61cd77c4ba4e206172ca511d.tar.gz
scummvm-rg350-1ac434165d047c0b61cd77c4ba4e206172ca511d.tar.bz2
scummvm-rg350-1ac434165d047c0b61cd77c4ba4e206172ca511d.zip
HUGO: Fix even more warnings
svn-id: r52154
Diffstat (limited to 'engines/hugo')
-rwxr-xr-xengines/hugo/display.cpp6
-rwxr-xr-xengines/hugo/engine.cpp15
2 files changed, 13 insertions, 8 deletions
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index fde97c8f00..fe30ab0edb 100755
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -396,7 +396,7 @@ int16 Screen::stringLength(char *s) {
debugC(2, kDebugDisplay, "stringLength(%s)", s);
for (sum = 0; *s; s++)
- sum += *(fontArr[*s] + 1) + 1;
+ sum += *(fontArr[(uint)*s] + 1) + 1;
return(sum);
}
@@ -419,8 +419,8 @@ void Screen::writeStr(int16 sx, int16 sy, char *s, byte color) {
sx = center(s);
for (; *s; s++) {
- writeChr(sx, sy, color, (char *)font[*s]);
- sx += *(font[*s] + 1) + 1;
+ writeChr(sx, sy, color, (char *)font[(uint)*s]);
+ sx += *(font[(uint)*s] + 1) + 1;
}
}
diff --git a/engines/hugo/engine.cpp b/engines/hugo/engine.cpp
index f27f38c574..59b2e0d9ee 100755
--- a/engines/hugo/engine.cpp
+++ b/engines/hugo/engine.cpp
@@ -272,24 +272,27 @@ void HugoEngine::moveObjects() {
switch (obj->seqNumb) {
case 4:
if (!obj->vx) { // Got 4 directions
- if (obj->vx != obj->oldvx) // vx just stopped
+ if (obj->vx != obj->oldvx) { // vx just stopped
if (dy >= 0)
obj->currImagePtr = obj->seqList[DOWN].seqPtr;
else
obj->currImagePtr = obj->seqList[_UP].seqPtr;
- } else if (obj->vx != obj->oldvx)
+ }
+ } else if (obj->vx != obj->oldvx) {
if (dx > 0)
obj->currImagePtr = obj->seqList[RIGHT].seqPtr;
else
obj->currImagePtr = obj->seqList[LEFT].seqPtr;
+ }
break;
case 3:
case 2:
- if (obj->vx != obj->oldvx) // vx just stopped
+ if (obj->vx != obj->oldvx) { // vx just stopped
if (dx > 0) // Left & right only
obj->currImagePtr = obj->seqList[RIGHT].seqPtr;
else
obj->currImagePtr = obj->seqList[LEFT].seqPtr;
+ }
break;
}
@@ -312,16 +315,18 @@ void HugoEngine::moveObjects() {
// Set first image in sequence (if multi-seq object)
if (obj->seqNumb > 1) {
if (!obj->vx && (obj->seqNumb >= 4)) {
- if (obj->vx != obj->oldvx) // vx just stopped
+ if (obj->vx != obj->oldvx) { // vx just stopped
if (obj->vy > 0)
obj->currImagePtr = obj->seqList[DOWN].seqPtr;
else
obj->currImagePtr = obj->seqList[_UP].seqPtr;
- } else if (obj->vx != obj->oldvx)
+ }
+ } else if (obj->vx != obj->oldvx) {
if (obj->vx > 0)
obj->currImagePtr = obj->seqList[RIGHT].seqPtr;
else
obj->currImagePtr = obj->seqList[LEFT].seqPtr;
+ }
}
obj->oldvx = obj->vx;
obj->oldvy = obj->vy;