From fe88ea1092fb56b964a3261047cfb9a5e3263c6b Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 4 Apr 2018 22:45:52 -0400 Subject: XEEN: Draw proper sky tiles outside bounds of sky maps --- engines/xeen/map.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index a89918a9bb..24a10bf448 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -1225,7 +1225,8 @@ void Map::setWall(const Common::Point &pt, Direction dir, int v) { } int Map::getCell(int idx) { - int mapId = _vm->_party->_mazeId; + Party &party = *g_vm->_party; + int mapId = party._mazeId; Direction dir = _vm->_party->_mazeDirection; Common::Point pt( _vm->_party->_mazePosition.x + Res.SCREEN_POSITIONING_X[_vm->_party->_mazeDirection][idx], @@ -1259,6 +1260,8 @@ int Map::getCell(int idx) { } if (!mapId) { + mapId = party._mazeId; + if (_isOutdoors) { _currentSurfaceId = SURFTYPE_SPACE; _currentWall = 0; @@ -1293,6 +1296,8 @@ int Map::getCell(int idx) { } if (!mapId) { + mapId = party._mazeId; + if (_isOutdoors) { _currentSurfaceId = SURFTYPE_SPACE; _currentWall = 0; -- cgit v1.2.3