aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/res.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2008-01-20 03:38:16 +0000
committerPaul Gilbert2008-01-20 03:38:16 +0000
commit99e2c7c1d65251a188b986685bd7986dda82edb9 (patch)
tree9a6a648024104ab5f6628311512285b3c194eb77 /engines/lure/res.cpp
parent08a0caa17fba3308138ef9792254224b99d779cf (diff)
downloadscummvm-rg350-99e2c7c1d65251a188b986685bd7986dda82edb9.tar.gz
scummvm-rg350-99e2c7c1d65251a188b986685bd7986dda82edb9.tar.bz2
scummvm-rg350-99e2c7c1d65251a188b986685bd7986dda82edb9.zip
Fixed bug with saving of cached actor schedules and added saving of talk data flags
svn-id: r30582
Diffstat (limited to 'engines/lure/res.cpp')
-rw-r--r--engines/lure/res.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index a3eb33660d..78ae7ec87f 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -731,15 +731,16 @@ void Resources::saveToStream(Common::WriteStream *stream) {
stream->writeUint16LE(_talkingCharacter);
// Save sublist data
+ _hotspotSchedules.saveToStream(stream);
_hotspotData.saveToStream(stream);
_activeHotspots.saveToStream(stream);
- _hotspotSchedules.saveToStream(stream);
_fieldList.saveToStream(stream);
_randomActions.saveToStream(stream);
_barmanLists.saveToStream(stream);
_exitJoins.saveToStream(stream);
_roomData.saveToStream(stream);
_delayList.saveToStream(stream);
+ _talkData.saveToStream(stream);
}
void Resources::loadFromStream(Common::ReadStream *stream) {
@@ -755,17 +756,16 @@ void Resources::loadFromStream(Common::ReadStream *stream) {
_talkState = TALK_NONE;
_activeTalkData = NULL;
- debugC(ERROR_DETAILED, kLureDebugScripts, "Loading hotspot data");
- _hotspotData.loadFromStream(stream);
- debugC(ERROR_DETAILED, kLureDebugScripts, "Loading active hotspots");
- _activeHotspots.loadFromStream(stream);
-
_hotspotSchedules.clear();
if (saveVersion >= 31) {
_hotspotSchedules.loadFromStream(stream);
debugC(ERROR_DETAILED, kLureDebugScripts, "Loading hotspot schedules");
}
+ debugC(ERROR_DETAILED, kLureDebugScripts, "Loading hotspot data");
+ _hotspotData.loadFromStream(stream);
+ debugC(ERROR_DETAILED, kLureDebugScripts, "Loading active hotspots");
+ _activeHotspots.loadFromStream(stream);
debugC(ERROR_DETAILED, kLureDebugScripts, "Loading fields");
_fieldList.loadFromStream(stream);
debugC(ERROR_DETAILED, kLureDebugScripts, "Loading random actions");
@@ -778,6 +778,12 @@ void Resources::loadFromStream(Common::ReadStream *stream) {
_roomData.loadFromStream(stream);
debugC(ERROR_DETAILED, kLureDebugScripts, "Loading delay list");
_delayList.loadFromStream(stream);
+
+ if (saveVersion >= 32) {
+ debugC(ERROR_DETAILED, kLureDebugScripts, "Loading talk data");
+ _talkData.loadFromStream(stream);
+ }
+
debugC(ERROR_DETAILED, kLureDebugScripts, "Finished loading");
}