diff options
author | Paul Gilbert | 2015-02-27 21:33:07 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-02-27 21:33:07 -0500 |
commit | 302b3cdc63fe24b4c702c260935879fd7f477bd5 (patch) | |
tree | 7c3ffe67552b67c4b9164866a1513fc6f74b4230 | |
parent | b9539c6cb168ecabda994353a453e050b380487f (diff) | |
download | scummvm-rg350-302b3cdc63fe24b4c702c260935879fd7f477bd5.tar.gz scummvm-rg350-302b3cdc63fe24b4c702c260935879fd7f477bd5.tar.bz2 scummvm-rg350-302b3cdc63fe24b4c702c260935879fd7f477bd5.zip |
XEEN: Fix updating cell flag that grate is unlocked
-rw-r--r-- | engines/xeen/map.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index e5a5531cbf..021c417528 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -1395,7 +1395,8 @@ void Map::setCellSurfaceFlags(const Common::Point &pt, int bits) { mazeLookup(pt, 0); Common::Point mapPos(pt.x & 15, pt.y & 15); - _mazeData[_mazeDataIndex]._cells[mapPos.y][mapPos.x]._surfaceId |= bits; + MazeCell &cell = _mazeData[_mazeDataIndex]._cells[mapPos.y][mapPos.x]; + cell._flags |= bits & 0xF8; } void Map::setWall(const Common::Point &pt, Direction dir, int v) { @@ -1453,7 +1454,7 @@ int Map::getCell(int idx) { if (_vm->_files->_isDarkCc) { if ((mapId >= 53 && mapId <= 88 && mapId != 73) || (mapId >= 74 && mapId <= 120) || mapId == 125 || mapId == 126 || mapId == 128 || mapId == 129) { - _currentSurfaceId = SURFTYPE_DESERT; + _currentSurfaceId = 6; } else { _currentSurfaceId = 0; } @@ -1489,7 +1490,7 @@ int Map::getCell(int idx) { if (_vm->_files->_isDarkCc) { if ((mapId >= 53 && mapId <= 88 && mapId != 73) || (mapId >= 74 && mapId <= 120) || mapId == 125 || mapId == 126 || mapId == 128 || mapId == 129) { - _currentSurfaceId = SURFTYPE_DESERT; + _currentSurfaceId = 6; } else { _currentSurfaceId = 0; } @@ -1524,7 +1525,7 @@ int Map::getCell(int idx) { return 0; if (pt.x > 31 || pt.y > 31) - _currentSurfaceId = SURFTYPE_ROAD; + _currentSurfaceId = 7; else _currentSurfaceId = _mazeData[_mazeDataIndex]._cells[pt.y][pt.x]._surfaceId; |