diff options
author | Travis Howell | 2007-05-27 11:54:01 +0000 |
---|---|---|
committer | Travis Howell | 2007-05-27 11:54:01 +0000 |
commit | e2af13a7f688f6447b4ec1ad30b7127323245924 (patch) | |
tree | aea5e6d59ec6e59f2eaba3d8c24f0a815e727406 | |
parent | 13541d3e96fad9dd24fa5d2d01a4454505d50fef (diff) | |
download | scummvm-rg350-e2af13a7f688f6447b4ec1ad30b7127323245924.tar.gz scummvm-rg350-e2af13a7f688f6447b4ec1ad30b7127323245924.tar.bz2 scummvm-rg350-e2af13a7f688f6447b4ec1ad30b7127323245924.zip |
Adjust code for paranoid compilers.
svn-id: r26971
-rw-r--r-- | engines/agos/cursor.cpp | 6 | ||||
-rw-r--r-- | engines/agos/gfx.cpp | 14 |
2 files changed, 9 insertions, 11 deletions
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp index ffb752f411..77d811dbd7 100644 --- a/engines/agos/cursor.cpp +++ b/engines/agos/cursor.cpp @@ -664,7 +664,7 @@ void AGOSEngine::drawMousePointer() { } else if (getGameType() == GType_SIMON1) { CursorMan.replaceCursor(_mouseData, 16, 16, 0, 0, 0xFF); } else { - const uint16 *src = NULL; + const uint16 *src; int i, j; const uint8 color = (getGameType() == GType_ELVIRA1) ? 15: 65; @@ -708,7 +708,7 @@ void AGOSEngine::drawMousePointer() { } else { src = _common_crossbowInfo2; } - } else if (getGameType() == GType_ELVIRA1) { + } else { if (_mouseCursor == 0) { src = _common_mouseInfo; } else if (_mouseCursor == 1) { @@ -721,8 +721,6 @@ void AGOSEngine::drawMousePointer() { if (_dragFlag != 0) src = _common_handInfo; - assert(src); - for (i = 0; i < 16; i++) { for (j = 0; j < 16; j++) { if (src[0] & (1 << (15 - (j % 16)))) { diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp index 68c405ba8c..33e3d97184 100644 --- a/engines/agos/gfx.cpp +++ b/engines/agos/gfx.cpp @@ -630,7 +630,7 @@ void AGOSEngine_Simon1::drawImage(VC10_state *state) { if (getFeatures() & GF_32COLOR) state->palette = 0xC0; - uint16 xoffs = 0, yoffs = 0; + uint16 xoffs, yoffs; if (getGameType() == GType_SIMON2) { state->surf2_addr = getBackGround(); state->surf2_pitch = _screenWidth; @@ -667,7 +667,7 @@ void AGOSEngine_Simon1::drawImage(VC10_state *state) { xoffs = (vlut[0] * 2 + state->x) * 8; yoffs = vlut[1] + state->y; } - } else if (getGameType() == GType_SIMON1) { + } else { if (_windowNum == 3 || _windowNum == 4 || _windowNum >= 10) { if (_window3Flag == 1) { state->surf2_addr = getBackGround(); @@ -810,7 +810,7 @@ void AGOSEngine::drawImage(VC10_state *state) { if (!drawImage_clip(state)) return; - uint16 xoffs = 0, yoffs = 0; + uint16 xoffs, yoffs; if (getGameType() == GType_WW) { if (_windowNum == 4 || (_windowNum >= 10 && _windowNum <= 27)) { state->surf_addr = _window4BackScn; @@ -851,7 +851,7 @@ void AGOSEngine::drawImage(VC10_state *state) { xoffs = (vlut[0] * 2 + state->x) * 8; yoffs = vlut[1] + state->y; } - } else if (getGameType() == GType_ELVIRA1) { + } else { if (_windowNum == 6) { state->surf_addr = _window6BackScn; state->surf_pitch = 48; @@ -1301,8 +1301,8 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vga_res_id) { uint height = _videoWindows[updateWindow * 4 + 3]; byte *dst = getBackGround() + xoffs + yoffs * _screenWidth; - byte *src = dst; - uint srcWidth = 0; + byte *src; + uint srcWidth; if (getGameType() == GType_SIMON2) { src = _window4BackScn + xoffs + yoffs * 320; @@ -1355,7 +1355,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vga_res_id) { _lockWord &= ~0x20; return; } - } else if (getGameType() == GType_ELVIRA1) { + } else { if (updateWindow == 6) { _window6Flag = 1; src = _window6BackScn; |