diff options
author | Paul Gilbert | 2017-12-11 22:14:39 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-12-11 22:14:39 -0500 |
commit | 171a86acc71713a0d25d0858c7a9d3e5c8f64289 (patch) | |
tree | c64aa547e6b27ff8c908a7d54d22360fde23994c /engines/xeen | |
parent | a91297977834d5cabf9005e4ed825cb9a88633c0 (diff) | |
download | scummvm-rg350-171a86acc71713a0d25d0858c7a9d3e5c8f64289.tar.gz scummvm-rg350-171a86acc71713a0d25d0858c7a9d3e5c8f64289.tar.bz2 scummvm-rg350-171a86acc71713a0d25d0858c7a9d3e5c8f64289.zip |
XEEN: Fix Coverity identified warnings
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/dialogs_map.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/interface_minimap.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/interface_scene.cpp | 5 |
3 files changed, 9 insertions, 0 deletions
diff --git a/engines/xeen/dialogs_map.cpp b/engines/xeen/dialogs_map.cpp index f47f1b69ca..8008d4645a 100644 --- a/engines/xeen/dialogs_map.cpp +++ b/engines/xeen/dialogs_map.cpp @@ -127,6 +127,7 @@ void MapDialog::drawOutdoors() { for (int xp = MAP_XSTART, mazeX = _pt.x - (MAP_DIFF - 1); mazeX <= (_pt.x + MAP_DIFF); xp += TILE_WIDTH, ++mazeX) { v = map.mazeLookup(Common::Point(mazeX, mazeY), 0); + assert(v != INVALID_CELL); frame = map.mazeDataCurrent()._surfaceTypes[v]; if (map._currentSteppedOn) { @@ -140,6 +141,7 @@ void MapDialog::drawOutdoors() { for (int xp = MAP_XSTART, mazeX = _pt.x - (MAP_DIFF - 1); mazeX <= (_pt.x + MAP_DIFF); xp += TILE_WIDTH, ++mazeX) { v = map.mazeLookup(Common::Point(mazeX, mazeY), 4); + assert(v != INVALID_CELL); frame = map.mazeDataCurrent()._wallTypes[v]; if (frame && map._currentSteppedOn) diff --git a/engines/xeen/interface_minimap.cpp b/engines/xeen/interface_minimap.cpp index 8ac3523a8f..c9bbf10897 100644 --- a/engines/xeen/interface_minimap.cpp +++ b/engines/xeen/interface_minimap.cpp @@ -75,6 +75,7 @@ void InterfaceMinimap::drawOutdoorsMinimap() { for (int xp = MINIMAP_XSTART, mazeX = pt.x - MINIMAP_DIFF; mazeX <= (pt.x + MINIMAP_DIFF); xp += TILE_WIDTH, ++mazeX) { v = map.mazeLookup(Common::Point(mazeX, mazeY), 0); + assert(v != INVALID_CELL); frame = map.mazeDataCurrent()._surfaceTypes[v]; if (frame && (map._currentSteppedOn || party._wizardEyeActive)) { @@ -88,6 +89,7 @@ void InterfaceMinimap::drawOutdoorsMinimap() { for (int xp = MINIMAP_XSTART, mazeX = pt.x - MINIMAP_DIFF; mazeX <= (pt.x + MINIMAP_DIFF); xp += TILE_WIDTH, ++mazeX) { v = map.mazeLookup(Common::Point(mazeX, mazeY), 4); + assert(v != INVALID_CELL); frame = map.mazeData()._wallTypes[v]; if (frame && (map._currentSteppedOn || party._wizardEyeActive)) { diff --git a/engines/xeen/interface_scene.cpp b/engines/xeen/interface_scene.cpp index 999c8526b9..d495d4626f 100644 --- a/engines/xeen/interface_scene.cpp +++ b/engines/xeen/interface_scene.cpp @@ -4419,26 +4419,31 @@ void InterfaceScene::drawOutdoors() { assert(map._currentWall != INVALID_CELL); for (int idx = 0; idx < 9; ++idx) { map.getCell(TERRAIN_INDEXES1[idx]); + assert(map._currentWall != INVALID_CELL); SpriteResource &spr = map._wallSprites._surfaces[map._currentWall]; _outdoorList[28 + idx]._sprites = spr.size() == 0 ? (SpriteResource *)nullptr : &spr; } for (int idx = 0; idx < 5; ++idx) { map.getCell(TERRAIN_INDEXES2[idx]); + assert(map._currentWall != INVALID_CELL); SpriteResource &spr = map._wallSprites._surfaces[map._currentWall]; _outdoorList[61 + idx]._sprites = spr.size() == 0 ? (SpriteResource *)nullptr : &spr; } for (int idx = 0; idx < 3; ++idx) { map.getCell(TERRAIN_INDEXES3[idx]); + assert(map._currentWall != INVALID_CELL); SpriteResource &spr = map._wallSprites._surfaces[map._currentWall]; _outdoorList[84 + idx]._sprites = spr.size() == 0 ? (SpriteResource *)nullptr : &spr; } for (int idx = 0; idx < 5; ++idx) { map.getCell(TERRAIN_INDEXES4[idx]); + assert(map._currentWall != INVALID_CELL); SpriteResource &spr = map._wallSprites._surfaces[map._currentWall]; _outdoorList[103 + idx]._sprites = spr.size() == 0 ? (SpriteResource *)nullptr : &spr; } map.getCell(1); + assert(map._currentWall != INVALID_CELL); SpriteResource &surface = map._wallSprites._surfaces[map._currentWall]; _outdoorList[108]._sprites = surface.size() == 0 ? (SpriteResource *)nullptr : &surface; _outdoorList[109]._sprites = _outdoorList[108]._sprites; |