diff options
author | Paul Gilbert | 2015-01-24 23:49:12 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-01-24 23:49:12 -0500 |
commit | 51dba2606e1cf202d73d7c77ba15939268bb6efd (patch) | |
tree | b04797410eb6b1775738fc6d3a0a8d247f2dfcf6 /engines/xeen/map.cpp | |
parent | b695934a1e5a62aa854bfc02bb4f10f562efe62b (diff) | |
download | scummvm-rg350-51dba2606e1cf202d73d7c77ba15939268bb6efd.tar.gz scummvm-rg350-51dba2606e1cf202d73d7c77ba15939268bb6efd.tar.bz2 scummvm-rg350-51dba2606e1cf202d73d7c77ba15939268bb6efd.zip |
XEEN: Simplify _currentWall back to int for now
Diffstat (limited to 'engines/xeen/map.cpp')
-rw-r--r-- | engines/xeen/map.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index ae38b77ed6..52dc4273aa 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -866,7 +866,7 @@ Map::Map(XeenEngine *vm) : _vm(vm), _mobData(vm) { _mazeDataIndex = 0; _currentSteppedOn = false; _currentSurfaceId = 0; - _currentWall._data = 0; + _currentWall = 0; _currentTile = 0; _currentIsGrate = false; _currentCantRest = false; @@ -1398,7 +1398,7 @@ int Map::getCell(int idx) { } else { _currentSurfaceId = (mapId >= 25 && mapId <= 27) ? 7 : 0; } - _currentWall._data = INVALID_CELL; + _currentWall = INVALID_CELL; return INVALID_CELL; } @@ -1418,7 +1418,7 @@ int Map::getCell(int idx) { if (!mapId) { if (_isOutdoors) { _currentSurfaceId = SURFTYPE_SPACE; - _currentWall._data = 0; + _currentWall = 0; return 0; } else { if (_vm->_files->_isDarkCc) { @@ -1432,7 +1432,7 @@ int Map::getCell(int idx) { _currentSurfaceId = (mapId >= 25 && mapId <= 27) ? SURFTYPE_ROAD : SURFTYPE_DEFAULT; } - _currentWall._data = INVALID_CELL; + _currentWall = INVALID_CELL; return INVALID_CELL; } @@ -1454,7 +1454,7 @@ int Map::getCell(int idx) { if (!mapId) { if (_isOutdoors) { _currentSurfaceId = SURFTYPE_SPACE; - _currentWall._data = 0; + _currentWall = 0; return 0; } else { if (_vm->_files->_isDarkCc) { @@ -1468,7 +1468,7 @@ int Map::getCell(int idx) { _currentSurfaceId = (mapId >= 25 && mapId <= 27) ? SURFTYPE_ROAD : SURFTYPE_DEFAULT; } - _currentWall._data = INVALID_CELL; + _currentWall = INVALID_CELL; return INVALID_CELL; } } @@ -1478,16 +1478,16 @@ int Map::getCell(int idx) { ++_mazeDataIndex; } - MazeWallLayers &wallLayers = _mazeData[_mazeDataIndex]._wallData[pt.y][pt.x]; + int wallData = _mazeData[_mazeDataIndex]._wallData[pt.y][pt.x]._data; if (_isOutdoors) { if (mapId) { // TODO: tile is set to word of (wallLayers >> 8) && 0xff? Makes no sense - _currentTile = wallLayers._outdoors._surfaceId; - _currentWall = wallLayers; - _currentSurfaceId = wallLayers._outdoors._surfaceId; + _currentTile = (wallData >> 8) & 0xFF; + _currentWall = (wallData >> 4) & 0xF; + _currentSurfaceId = wallData & 0xF; } else { _currentSurfaceId = SURFTYPE_DEFAULT; - _currentWall._data = 0; + _currentWall = 0; _currentTile = 0; } } else { @@ -1499,11 +1499,11 @@ int Map::getCell(int idx) { else _currentSurfaceId = _mazeData[_mazeDataIndex]._cells[pt.y][pt.x]._surfaceId; - _currentWall = wallLayers; - return (_currentWall._data >> WALL_SHIFTS[dir][idx]) & 0xF; + _currentWall = wallData; + return (_currentWall >> WALL_SHIFTS[dir][idx]) & 0xF; } - return _currentWall._data; + return _currentWall; } void Map::loadSky() { |