diff options
author | Paul Gilbert | 2015-01-18 20:54:58 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-01-18 20:54:58 -0500 |
commit | 130bd58e2c8ffdac6de86364d45d772ffe6a8d1b (patch) | |
tree | 8f19f069fb679f10da93302ea13bcb5ed7ecb304 | |
parent | e4c473630655bd9b68d925b338559706ea927497 (diff) | |
download | scummvm-rg350-130bd58e2c8ffdac6de86364d45d772ffe6a8d1b.tar.gz scummvm-rg350-130bd58e2c8ffdac6de86364d45d772ffe6a8d1b.tar.bz2 scummvm-rg350-130bd58e2c8ffdac6de86364d45d772ffe6a8d1b.zip |
XEEN: Load correct surface sprites for the maze
-rw-r--r-- | engines/xeen/interface_map.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/map.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/xeen/interface_map.cpp b/engines/xeen/interface_map.cpp index ddc311bae0..93c3d9a679 100644 --- a/engines/xeen/interface_map.cpp +++ b/engines/xeen/interface_map.cpp @@ -1118,8 +1118,8 @@ void InterfaceMap::drawIndoors() { surfaceId = map.mazeData()._surfaceTypes[map._currentSurfaceId]; if (surfaceId == SURFTYPE_WATER || surfaceId == SURFTYPE_LAVA || surfaceId == SURFTYPE_SEWER) { - drawStruct._flags = _flipWater ? 1 : 0; drawStruct._frame = DRAW_FRAMES[cellIndex][_flipWater ? 1 : 0]; + drawStruct._flags = _flipWater ? SPRFLAG_HORIZ_FLIPPED : 0; } else { drawStruct._frame = DRAW_FRAMES[cellIndex][_flipGround ? 1 : 0]; drawStruct._flags = _flipGround ? SPRFLAG_HORIZ_FLIPPED : 0; diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index d39b8f5199..9c69106857 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -1089,13 +1089,14 @@ void Map::load(int mapId) { for (int i = 0; i < TOTAL_SURFACES; ++i) { _wallSprites._surfaces[i].clear(); + if (_mazeData[0]._wallTypes[i] != 0) { _wallSprites._surfaces[i].load(Common::String::format("%s.wal", - SURFACE_TYPE_NAMES[i])); + SURFACE_TYPE_NAMES[_mazeData[0]._wallTypes[i]])); } _surfaceSprites[i].clear(); - if (i != 0 && _mazeData[0]._wallTypes[i] != 0) + if (i != 0 && _mazeData[0]._surfaceTypes[i] != 0) _surfaceSprites[i].load(SURFACE_NAMES[_mazeData[0]._surfaceTypes[i]]); } } else { @@ -1113,7 +1114,7 @@ void Map::load(int mapId) { _surfaceSprites[i].clear(); if (_mazeData[0]._surfaceTypes[i] != 0 || i == 4) - _surfaceSprites[i].load(SURFACE_NAMES[i]); + _surfaceSprites[i].load(SURFACE_NAMES[_mazeData[0]._surfaceTypes[i]]); } for (int i = 0; i < TOTAL_SURFACES; ++i) |