aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
authorPaul Gilbert2007-12-29 04:25:26 +0000
committerPaul Gilbert2007-12-29 04:25:26 +0000
commita54f9c311a7b981234822e558ca008a130eb4de8 (patch)
tree6328032175a3f7740d3511c26707043916db0210 /engines/lure
parent52dc147f8c950007e8b49c0e130e256ef5520af8 (diff)
downloadscummvm-rg350-a54f9c311a7b981234822e558ca008a130eb4de8.tar.gz
scummvm-rg350-a54f9c311a7b981234822e558ca008a130eb4de8.tar.bz2
scummvm-rg350-a54f9c311a7b981234822e558ca008a130eb4de8.zip
Fix to ensure any active conversation data or selected hotspot is cleared when restoring or restarting a game
svn-id: r30066
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