diff options
author | Paul Gilbert | 2007-12-02 04:49:33 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-12-02 04:49:33 +0000 |
commit | 804c821ab1079a7ab426d08773b08d50e382ffb3 (patch) | |
tree | a81a19e3f2294d409ba32702fa590ac0fbe0ecf8 /engines/lure/res.cpp | |
parent | 3472e16a73a5d7e4813a8bc47029a44e79d0c7dd (diff) | |
download | scummvm-rg350-804c821ab1079a7ab426d08773b08d50e382ffb3.tar.gz scummvm-rg350-804c821ab1079a7ab426d08773b08d50e382ffb3.tar.bz2 scummvm-rg350-804c821ab1079a7ab426d08773b08d50e382ffb3.zip |
Enhanced savegames to store any active dialog when the game was saved
svn-id: r29689
Diffstat (limited to 'engines/lure/res.cpp')
-rw-r--r-- | engines/lure/res.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index 0b926c5454..67a71a840f 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -596,6 +596,10 @@ Hotspot *Resources::addHotspot(uint16 hotspotId) { Hotspot *hotspot = new Hotspot(hData); _activeHotspots.push_back(hotspot); + if (hotspotId < FIRST_NONCHARACTER_ID) + // Default characters to facing upwards until they start moving + hotspot->setDirection(UP); + return hotspot; } @@ -677,6 +681,10 @@ void Resources::setTalkData(uint16 offset) { } void Resources::saveToStream(Common::WriteStream *stream) { + // Save basic fields + stream->writeUint16LE(_talkingCharacter); + + // Save sublist data _hotspotData.saveToStream(stream); _activeHotspots.saveToStream(stream); _fieldList.saveToStream(stream); @@ -688,6 +696,9 @@ void Resources::saveToStream(Common::WriteStream *stream) { } void Resources::loadFromStream(Common::ReadStream *stream) { + debugC(ERROR_DETAILED, kLureDebugScripts, "Loading resource data"); + _talkingCharacter = stream->readUint16LE(); + debugC(ERROR_DETAILED, kLureDebugScripts, "Loading hotspot data"); _hotspotData.loadFromStream(stream); debugC(ERROR_DETAILED, kLureDebugScripts, "Loading active hotspots"); |