diff options
author | Strangerke | 2015-05-08 17:54:53 +0200 |
---|---|---|
committer | Strangerke | 2015-05-08 17:54:53 +0200 |
commit | fc5a0deb8915bb5bfc85626751539920752b386b (patch) | |
tree | ded357fd4dec6a69c618fa656fab382bf89edc24 /engines/sherlock | |
parent | 8b7ebf4269adda0dbd33e559ab5e3de047411f82 (diff) | |
download | scummvm-rg350-fc5a0deb8915bb5bfc85626751539920752b386b.tar.gz scummvm-rg350-fc5a0deb8915bb5bfc85626751539920752b386b.tar.bz2 scummvm-rg350-fc5a0deb8915bb5bfc85626751539920752b386b.zip |
SHERLOCK: Fix some more GCC warnings
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/journal.cpp | 2 | ||||
-rw-r--r-- | engines/sherlock/objects.cpp | 7 | ||||
-rw-r--r-- | engines/sherlock/people.cpp | 6 |
3 files changed, 9 insertions, 6 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index 26aaa7a1a0..0c8864c302 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -1125,7 +1125,7 @@ int Journal::getFindName(bool printError) { if (events.kbHit()) { Common::KeyState keyState = events.getKey(); - if (keyState.keycode == Common::KEYCODE_BACKSPACE && name.c_str() > 0) { + if ((keyState.keycode == Common::KEYCODE_BACKSPACE) && (name.c_str() > 0)) { screen.vgaBar(Common::Rect(xp - screen.charWidth(name.lastChar()), yp, xp + 8, yp + 9), BUTTON_MIDDLE); xp -= screen.charWidth(name.lastChar()); screen.vgaBar(Common::Rect(xp, yp, xp + 8, yp + 9), INV_FOREGROUND); diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index 40c8b954cb..488d1fcf83 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -242,8 +242,8 @@ void Sprite::checkSprite() { // Invert percentage palPercent = 100 - palPercent; - for (int idx = palStart; idx < (palStart + palLength); ++idx) - screen._sMap[idx] = screen._cMap[idx] * palPercent / 100; + for (int i = palStart; i < (palStart + palLength); ++i) + screen._sMap[i] = screen._cMap[i] * palPercent / 100; events.pollEvents(); screen.setPalette(screen._sMap); @@ -352,6 +352,9 @@ void Sprite::checkSprite() { case DELTA: _position.x += 200; break; + + default: + break; } } } diff --git a/engines/sherlock/people.cpp b/engines/sherlock/people.cpp index 0a3ef693a8..acc660b0c0 100644 --- a/engines/sherlock/people.cpp +++ b/engines/sherlock/people.cpp @@ -333,12 +333,12 @@ void People::setWalking() { // See whether the major movement is horizontal or vertical if (delta.x >= delta.y) { // Set the initial frame sequence for the left and right, as well - // as settting the delta x depending on direction + // as setting the delta x depending on direction if (_walkDest.x < (_player._position.x / 100)) { - _player._sequenceNumber = map._active ? MAP_LEFT : WALK_LEFT; + _player._sequenceNumber = (int) (map._active ? MAP_LEFT : WALK_LEFT); _player._delta.x = speed.x * -100; } else { - _player._sequenceNumber = map._active ? MAP_RIGHT : WALK_RIGHT; + _player._sequenceNumber = (int) (map._active ? MAP_RIGHT : WALK_RIGHT); _player._delta.x = speed.x * 100; } |