mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 16:07:39 +00:00
MADS: Phantom: Add more checks in exitCatacombs
Fix an assert in moveCatacombs
This commit is contained in:
parent
9b52ce590f
commit
351ce463ca
@ -885,13 +885,14 @@ void GamePhantom::setupCatacombs() {
|
||||
}
|
||||
|
||||
int GamePhantom::exitCatacombs(int dir) {
|
||||
int scene = _globals[kCatacombsRoom];
|
||||
assert ((scene < _catacombSize) && (dir < 4));
|
||||
return (_catacombs[scene]._exit[dir]);
|
||||
assert(_globals[kCatacombsRoom] == CLIP(_globals[kCatacombsRoom], 0, _catacombSize - 1));
|
||||
assert(dir == CLIP(dir, 0, 3));
|
||||
|
||||
return (_catacombs[_globals[kCatacombsRoom]]._exit[dir]);
|
||||
}
|
||||
|
||||
void GamePhantom::moveCatacombs(int dir) {
|
||||
assert(_globals[kCatacombsRoom] == CLIP(_globals[kCatacombsRoom], 0, _catacombSize));
|
||||
assert(_globals[kCatacombsRoom] == CLIP(_globals[kCatacombsRoom], 0, _catacombSize - 1));
|
||||
assert(dir == CLIP(dir, 0, 3));
|
||||
|
||||
newCatacombRoom(_catacombs[_globals[kCatacombsRoom]]._fromDirection[dir], _catacombs[_globals[kCatacombsRoom]]._exit[dir]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user