diff options
author | Paul Gilbert | 2006-10-02 12:48:56 +0000 |
---|---|---|
committer | Paul Gilbert | 2006-10-02 12:48:56 +0000 |
commit | 1a96e26bf6bd9593da746e1cf3da98448df3a92d (patch) | |
tree | b93ffac36b281447d64e08ce3d34a4511f4b6a89 /engines/lure/res.cpp | |
parent | e8623fa477119e4b418200826e1bac372b9f8df4 (diff) | |
download | scummvm-rg350-1a96e26bf6bd9593da746e1cf3da98448df3a92d.tar.gz scummvm-rg350-1a96e26bf6bd9593da746e1cf3da98448df3a92d.tar.bz2 scummvm-rg350-1a96e26bf6bd9593da746e1cf3da98448df3a92d.zip |
Added functionality to allow saving/loading the game state
svn-id: r24070
Diffstat (limited to 'engines/lure/res.cpp')
-rw-r--r-- | engines/lure/res.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index 821c4103ac..819a1eacea 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -28,6 +28,8 @@ namespace Lure { +using namespace Common; + static Resources *int_resources = NULL; Resources &Resources::getReference() { @@ -597,4 +599,21 @@ void Resources::setTalkData(uint16 offset) { error("Unknown talk entry offset %d requested", offset); } +void Resources::saveToStream(Common::WriteStream *stream) +{ + _hotspotData.saveToStream(stream); + _activeHotspots.saveToStream(stream); + _fieldList.saveToStream(stream); +} + +void Resources::loadFromStream(Common::ReadStream *stream) { + 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, "Finished loading"); +} + } // end of namespace Lure |