aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-06-25 09:56:54 +0200
committerThierry Crozat2019-07-28 15:09:14 +0100
commit8125f7b67d2162ada117276fc7d65eb9bc8562f9 (patch)
treea680e461b77e18753fbd59db4f7f52ecb43070bb
parent9cac9a8592fb100946728f2c77828f4b6110d77e (diff)
downloadscummvm-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
-rw-r--r--engines/supernova/room.cpp5
-rw-r--r--engines/supernova/supernova2/state.cpp2
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);