diff options
author | Jaromir Wysoglad | 2019-06-25 09:56:54 +0200 |
---|---|---|
committer | Thierry Crozat | 2019-07-28 15:09:14 +0100 |
commit | 8125f7b67d2162ada117276fc7d65eb9bc8562f9 (patch) | |
tree | a680e461b77e18753fbd59db4f7f52ecb43070bb /engines | |
parent | 9cac9a8592fb100946728f2c77828f4b6110d77e (diff) | |
download | scummvm-rg350-8125f7b67d2162ada117276fc7d65eb9bc8562f9.tar.gz scummvm-rg350-8125f7b67d2162ada117276fc7d65eb9bc8562f9.tar.bz2 scummvm-rg350-8125f7b67d2162ada117276fc7d65eb9bc8562f9.zip |
SUPERNOVA: Fix street animation.
Street animation was changing memory that it shouldn't, so
going into the kiosk resulted in a segfault.
Also remove 2 debug lines from supernova2/state.cpp
Diffstat (limited to 'engines')
-rw-r--r-- | engines/supernova/room.cpp | 5 | ||||
-rw-r--r-- | engines/supernova/supernova2/state.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/supernova/room.cpp b/engines/supernova/room.cpp index 487aeee7bf..404ad02474 100644 --- a/engines/supernova/room.cpp +++ b/engines/supernova/room.cpp @@ -127,7 +127,10 @@ RoomId Room::getId() const { } void Room::setSectionVisible(uint section, bool visible) { - _shown[section] = visible ? kShownTrue : kShownFalse; + if (section < kMaxSection) + _shown[section] = visible ? kShownTrue : kShownFalse; + else + _shown[section - 128] = visible ? kShownFalse : kShownTrue; } bool Room::isSectionVisible(uint index) const { diff --git a/engines/supernova/supernova2/state.cpp b/engines/supernova/supernova2/state.cpp index 1bafec87ae..b280b77f71 100644 --- a/engines/supernova/supernova2/state.cpp +++ b/engines/supernova/supernova2/state.cpp @@ -133,8 +133,6 @@ bool GameManager2::deserialize(Common::ReadStream *in, int version) { for (int i = 0; i < NUMROOMS2; ++i) { _rooms[i]->deserialize(in, version); } - delete _rooms[BST_DOOR]; - _rooms[BST_DOOR] = new BstDoor(_vm, this); _lastRoom = _rooms[lastRoomId]; changeRoom(curRoomId); |