diff options
author | Paul Gilbert | 2014-04-26 11:01:21 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-04-26 11:01:21 -0400 |
commit | bb5edf5426c3d8717d3a3f843a3dbf6193bbe9e9 (patch) | |
tree | abd149381ed333a565cadb1cee3bce7eec8a5f1c /engines/mads/game_data.cpp | |
parent | bae0a6590a4ba843ef51f4cc67875c578863f5b2 (diff) | |
download | scummvm-rg350-bb5edf5426c3d8717d3a3f843a3dbf6193bbe9e9.tar.gz scummvm-rg350-bb5edf5426c3d8717d3a3f843a3dbf6193bbe9e9.tar.bz2 scummvm-rg350-bb5edf5426c3d8717d3a3f843a3dbf6193bbe9e9.zip |
MADS: Implemented more save/load logic
Diffstat (limited to 'engines/mads/game_data.cpp')
-rw-r--r-- | engines/mads/game_data.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/mads/game_data.cpp b/engines/mads/game_data.cpp index 0f41692e2c..9211bbfa5a 100644 --- a/engines/mads/game_data.cpp +++ b/engines/mads/game_data.cpp @@ -46,4 +46,23 @@ bool VisitedScenes::exists(int sceneId) { return false; } +void VisitedScenes::synchronize(Common::Serializer &s) { + int count = size(); + int v = 0; + s.syncAsUint16LE(count); + + if (s.isSaving()) { + for (uint i = 0; i < size(); ++i) { + v = (*this)[i]; + s.syncAsSint16LE(v); + } + } else { + clear(); + for (uint i = 0; i < count; ++i) { + s.syncAsSint16LE(v); + push_back(v); + } + } +} + } // End of namespace MADS |