mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 19:51:49 +00:00
Fix to ensure any active conversation data or selected hotspot is cleared when restoring or restarting a game
svn-id: r30066
This commit is contained in:
parent
52dc147f8c
commit
a54f9c311a
@ -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");
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user