diff options
author | Paul Gilbert | 2015-01-12 20:56:15 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-01-12 20:56:15 -0500 |
commit | 07f37cedf54d956d9f736012f5b334e26cdbac5d (patch) | |
tree | d0666103eabaf0641be6ead1acfb616d4f4dc472 | |
parent | 488847006c5ddd29a6ab8de0145d80e26daab48c (diff) | |
download | scummvm-rg350-07f37cedf54d956d9f736012f5b334e26cdbac5d.tar.gz scummvm-rg350-07f37cedf54d956d9f736012f5b334e26cdbac5d.tar.bz2 scummvm-rg350-07f37cedf54d956d9f736012f5b334e26cdbac5d.zip |
XEEN: Change _currentWall to be MazeWallLayers union
-rw-r--r-- | engines/xeen/interface.cpp | 6 | ||||
-rw-r--r-- | engines/xeen/map.cpp | 32 | ||||
-rw-r--r-- | engines/xeen/map.h | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 46b7bc4c58..2dec248d54 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -1311,7 +1311,7 @@ void Interface::setMazeBits() { case 14: ++_wo[287]; break; - defualt: + default: break; } @@ -1497,7 +1497,7 @@ void Interface::setMazeBits() { break; } - _thinWall = (_vm->_map->_currentWall != 0x8888 && _wo[27]); + _thinWall = (_vm->_map->_currentWall._data != 0x8888) && _wo[27]; switch (_vm->_map->getCell(8)) { case 1: @@ -1571,7 +1571,7 @@ void Interface::setMazeBits() { switch (_vm->_map->getCell(10)) { case 0: - +_wo[117]; + ++_wo[117]; break; case 1: ++_wo[55]; diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index b6bf91db57..f9a687b6ee 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -854,7 +854,7 @@ Map::Map(XeenEngine *vm) : _vm(vm), _mobData(vm) { _mazeDataIndex = 0; _currentSteppedOn = false; _currentSurfaceId = 0; - _currentWall = 0; + _currentWall._data = 0; _currentTile = 0; _currentIsGrate = false; _currentCantRest = false; @@ -1239,8 +1239,8 @@ int Map::getCell(int idx) { } else { _currentSurfaceId = (mapId >= 25 && mapId <= 27) ? 7 : 0; } - _currentWall = 0x8888; - return _currentWall; + _currentWall._data = 0x8888; + return 0x8888; } _mazeDataIndex = 0; @@ -1259,7 +1259,7 @@ int Map::getCell(int idx) { if (!mapId) { if (_isOutdoors) { _currentSurfaceId = SURFTYPE_SPACE; - _currentWall = 0; + _currentWall._data = 0; return 0; } else { if (_vm->_files->_isDarkCc) { @@ -1273,8 +1273,8 @@ int Map::getCell(int idx) { _currentSurfaceId = (mapId >= 25 && mapId <= 27) ? SURFTYPE_ROAD : SURFTYPE_DEFAULT; } - _currentWall = 0x8888; - return _currentWall; + _currentWall._data = 0x8888; + return 0x8888; } _mazeDataIndex = 0; @@ -1295,8 +1295,8 @@ int Map::getCell(int idx) { if (!mapId) { if (_isOutdoors) { _currentSurfaceId = SURFTYPE_SPACE; - _currentWall = 0; - return _currentWall; + _currentWall._data = 0; + return 0; } else { if (_vm->_files->_isDarkCc) { if ((mapId >= 53 && mapId <= 88 && mapId != 73) || (mapId >= 74 && mapId <= 120) || @@ -1309,8 +1309,8 @@ int Map::getCell(int idx) { _currentSurfaceId = (mapId >= 25 && mapId <= 27) ? SURFTYPE_ROAD : SURFTYPE_DEFAULT; } - _currentWall = 0x8888; - return _currentWall; + _currentWall._data = 0x8888; + return 0x8888; } _mazeDataIndex = 0; @@ -1324,15 +1324,15 @@ int Map::getCell(int idx) { if (mapId) { // TODO: tile is set to word of (wallLayers >> 8) && 0xff? Makes no sense _currentTile = wallLayers._outdoors._surfaceId; - _currentWall = wallLayers._outdoors._iMiddle; + _currentWall = wallLayers; _currentSurfaceId = wallLayers._outdoors._surfaceId; } else { _currentSurfaceId = SURFTYPE_DEFAULT; - _currentWall = 0; + _currentWall._data = 0; _currentTile = 0; } } else { - if (!mapId) + if (!mapId) return 0; if (pt.x > 31 || pt.y > 31) @@ -1340,11 +1340,11 @@ int Map::getCell(int idx) { else _currentSurfaceId = _mazeData[_mazeDataIndex]._cells[pt.y][pt.x]._surfaceId; - _currentWall = wallLayers._data; - return (_currentWall >> (WALL_NUMBERS[dir][idx * 2] * 4)) & 0xF; + _currentWall = wallLayers; + return (_currentWall._data >> (WALL_NUMBERS[dir][idx * 2] * 4)) & 0xF; } - return _currentWall; + return _currentWall._data; } } // End of namespace Xeen diff --git a/engines/xeen/map.h b/engines/xeen/map.h index 6a061788ac..090619f6d0 100644 --- a/engines/xeen/map.h +++ b/engines/xeen/map.h @@ -367,7 +367,7 @@ public: bool _currentIsEvent; bool _currentIsObject; int _currentMonsterFlags; - int _currentWall; + MazeWallLayers _currentWall; int _currentTile; public: Map(XeenEngine *vm); |