aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/interface_map.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/engines/xeen/interface_map.cpp b/engines/xeen/interface_map.cpp
index 43a467df9b..23b709d391 100644
--- a/engines/xeen/interface_map.cpp
+++ b/engines/xeen/interface_map.cpp
@@ -4423,25 +4423,30 @@ void InterfaceMap::drawOutdoors() {
for (int idx = 0; idx < 9; ++idx) {
map.getCell(TERRAIN_INDEXES1[idx]);
- _outdoorList[36 + idx]._sprites = &map._wallSprites._surfaces[map._currentWall];
+ SpriteResource &spr = map._wallSprites._surfaces[map._currentWall];
+ _outdoorList[36 + idx]._sprites = spr.size() == 0 ? (SpriteResource *)nullptr : &spr;
}
for (int idx = 0; idx < 5; ++idx) {
map.getCell(TERRAIN_INDEXES2[idx]);
- _outdoorList[61 + idx]._sprites = &map._wallSprites._surfaces[map._currentWall];
+ 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]);
- _outdoorList[84 + idx]._sprites = &map._wallSprites._surfaces[map._currentWall];
+ 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]);
- _outdoorList[103 + idx]._sprites = &map._wallSprites._surfaces[map._currentWall];
+ SpriteResource &spr = map._wallSprites._surfaces[map._currentWall];
+ _outdoorList[103 + idx]._sprites = spr.size() == 0 ? (SpriteResource *)nullptr : &spr;
}
map.getCell(1);
- _outdoorList[108]._sprites = &map._wallSprites._surfaces[map._currentWall];
- _outdoorList[109]._sprites = &map._wallSprites._surfaces[map._currentWall];
- _outdoorList[110]._sprites = &map._wallSprites._surfaces[map._currentWall];
+ SpriteResource &surface = map._wallSprites._surfaces[map._currentWall];
+ _outdoorList[108]._sprites = surface.size() == 0 ? (SpriteResource *)nullptr : &surface;
+ _outdoorList[109]._sprites = _outdoorList[108]._sprites;
+ _outdoorList[110]._sprites = _outdoorList[108]._sprites;
_outdoorList._sky1._flags = _outdoorList._sky2._flags = _flipSky ? SPRFLAG_HORIZ_FLIPPED : 0;
_outdoorList._groundSprite._flags = _flipWater ? SPRFLAG_HORIZ_FLIPPED : 0;