diff options
author | Eugene Sandulenko | 2011-11-02 22:20:40 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2011-11-02 22:20:40 +0000 |
commit | d0bb81f5661879f81fb1a17174fa7f2e9085c698 (patch) | |
tree | 33cc46e69895785820e9ba7891aecaff2d4adbac /engines | |
parent | f6a9c6727dc11639a11e17fdcf3d0c0a39b8be96 (diff) | |
download | scummvm-rg350-d0bb81f5661879f81fb1a17174fa7f2e9085c698.tar.gz scummvm-rg350-d0bb81f5661879f81fb1a17174fa7f2e9085c698.tar.bz2 scummvm-rg350-d0bb81f5661879f81fb1a17174fa7f2e9085c698.zip |
AGI: Fix warnings
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/graphics.cpp | 4 | ||||
-rw-r--r-- | engines/agi/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/agi/text.cpp | 1 |
3 files changed, 4 insertions, 5 deletions
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp index 074e5570d5..4bb3877f7d 100644 --- a/engines/agi/graphics.cpp +++ b/engines/agi/graphics.cpp @@ -1083,7 +1083,7 @@ void GfxMgr::putPixelsA(int x, int y, int n, uint8 *p) { // Choose the correct screen to read from. If AGI256 or AGI256-2 is used and we're not trying to show the priority information, // then choose the 256 color screen, otherwise choose the 16 color screen (Which also has the priority information). - p += _vm->getFeatures() & (GF_AGI256 | GF_AGI256_2) && !_vm->_debug.priority ? FROM_SBUF16_TO_SBUF256_OFFSET : 0; + p += ((_vm->getFeatures() & (GF_AGI256 | GF_AGI256_2)) && !_vm->_debug.priority) ? FROM_SBUF16_TO_SBUF256_OFFSET : 0; if (_vm->_renderMode == Common::kRenderCGA) { for (x *= 2; n--; p++, x += 2) { @@ -1091,7 +1091,7 @@ void GfxMgr::putPixelsA(int x, int y, int n, uint8 *p) { *(uint16 *)&_agiScreen[x + y * GFX_WIDTH] = (q >> rShift) & 0x0f0f; } } else { - const uint16 mask = _vm->getFeatures() & (GF_AGI256 | GF_AGI256_2) && !_vm->_debug.priority ? 0xffff : 0x0f0f; + const uint16 mask = ((_vm->getFeatures() & (GF_AGI256 | GF_AGI256_2)) && !_vm->_debug.priority) ? 0xffff : 0x0f0f; for (x *= 2; n--; p++, x += 2) { register uint16 q = ((uint16)*p << 8) | *p; *(uint16 *)&_agiScreen[x + y * GFX_WIDTH] = (q >> rShift) & mask; diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index 3cebbf50c8..1bcabd507f 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -300,7 +300,7 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) { _game.state = (State)in->readByte(); in->read(loadId, 8); - if (strcmp(loadId, _game.id) && checkId) { + if (strcmp(loadId, _game.id) != 0 && checkId) { delete in; warning("This save seems to be from a different AGI game (save from %s, running %s), not loaded", loadId, _game.id); return errBadFileOpen; @@ -331,7 +331,7 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) { warning("Since your game was only detected via the fallback detector, there is no possibility to assure the save is compatible with your game version"); debug(0, "The game used for saving is \"%s\".", md5); - } else if (strcmp(md5, getGameMD5())) { + } else if (strcmp(md5, getGameMD5()) != 0) { warning("Game was saved with different gamedata - you may encounter problems"); debug(0, "Your game is \"%s\" and save is \"%s\".", getGameMD5(), md5); diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp index d5027588f9..3247862e32 100644 --- a/engines/agi/text.cpp +++ b/engines/agi/text.cpp @@ -240,7 +240,6 @@ char *AgiEngine::wordWrapString(const char *s, int *len) { while (*s) { pWord = s; - wLen = 0; while (*s != '\0' && *s != ' ' && *s != '\n' && *s != '\r') s++; |