diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/hdb.cpp | 20 | ||||
-rw-r--r-- | engines/hdb/hdb.h | 3 |
2 files changed, 23 insertions, 0 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 11b3bc2634..649c4a9d3a 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -127,6 +127,26 @@ bool HDBGame::init() { return true; } +void HDBGame::save(Common::OutSaveFile *out) { + out->write(_currentMapname, 64); + out->write(_lastMapname, 64); + out->write(_currentLuaName, 64); + out->writeSint32LE(_actionMode); + out->writeByte(_changeLevel); + out->write(_changeMapname, 64); + out->write(_inMapName, 32); +} + +void HDBGame::load(Common::InSaveFile *in) { + in->read(_currentMapname, 64); + in->read(_lastMapname, 64); + in->read(_currentLuaName, 64); + _actionMode = in->readSint32LE(); + _changeLevel = in->readByte(); + in->read(_changeMapname, 64); + in->read(_inMapName, 32); +} + /* Changes the current GameState to the next one. Game State Transitions are deterministic: each state can diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h index e16ee5aca1..01ed0b96da 100644 --- a/engines/hdb/hdb.h +++ b/engines/hdb/hdb.h @@ -30,6 +30,7 @@ #include "common/events.h" #include "common/str.h" #include "common/random.h" +#include "common/savefile.h" #include "graphics/surface.h" #include "gui/debugger.h" @@ -144,6 +145,8 @@ public: // Game related members; bool init(); + void save(Common::OutSaveFile *out); + void load(Common::InSaveFile *in); bool restartMap(); bool startMap(const char *name); |