aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lure')
-rw-r--r--engines/lure/res.cpp6
-rw-r--r--engines/lure/room.cpp14
-rw-r--r--engines/lure/room.h2
3 files changed, 21 insertions, 1 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 63c4af8ec7..b405651d42 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -97,6 +97,9 @@ void Resources::reset() {
freeData();
_fieldList.reset();
+ _talkState = TALK_NONE;
+ _activeTalkData = NULL;
+
reloadData();
}
@@ -712,6 +715,9 @@ void Resources::loadFromStream(Common::ReadStream *stream) {
_talkingCharacter = 0;
}
+ _talkState = TALK_NONE;
+ _activeTalkData = NULL;
+
debugC(ERROR_DETAILED, kLureDebugScripts, "Loading hotspot data");
_hotspotData.loadFromStream(stream);
debugC(ERROR_DETAILED, kLureDebugScripts, "Loading active hotspots");
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index 450e2ea3aa..6576420f24 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -756,6 +756,11 @@ void Room::loadFromStream(Common::ReadStream *stream) {
if (saveVersion >= 26)
_talkDialog = TalkDialog::loadFromStream(stream);
+ // Clear any active hotspot
+ _hotspotId = 0;
+ _hotspotName[0] = '\0';
+ _statusLine[0] = '\0';
+
uint16 roomNum = stream->readUint16LE();
_roomNumber = 999; // Dummy room number so current room is faded out
setRoomNumber(roomNum, false);
@@ -765,4 +770,13 @@ void Room::loadFromStream(Common::ReadStream *stream) {
_cursorState = (CursorState) stream->readUint16LE();
}
+void Room::reset() {
+ _roomNumber = 999;
+ setTalkDialog(0, 0, 0, 0);
+
+ _hotspotId = 0;
+ _hotspotName[0] = '\0';
+ _statusLine[0] = '\0';
+}
+
} // end of namespace Lure
diff --git a/engines/lure/room.h b/engines/lure/room.h
index 419b757e2e..e208698a2e 100644
--- a/engines/lure/room.h
+++ b/engines/lure/room.h
@@ -127,7 +127,7 @@ public:
char *statusLine() { return _statusLine; }
void saveToStream(Common::WriteStream *stream);
void loadFromStream(Common::ReadStream *stream);
- void reset() { _roomNumber = 999; }
+ void reset();
};
} // end of namespace Lure