diff options
author | Filippos Karapetis | 2010-06-08 18:23:38 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-08 18:23:38 +0000 |
commit | 3d0ac2a676bd726a1f390b83812f8f5ac7a52d4a (patch) | |
tree | 77a99d7f79a0771e699f6e745a6a293b1da1ae16 | |
parent | 12ca735cebcad417e995566e446142ffd41e6323 (diff) | |
download | scummvm-rg350-3d0ac2a676bd726a1f390b83812f8f5ac7a52d4a.tar.gz scummvm-rg350-3d0ac2a676bd726a1f390b83812f8f5ac7a52d4a.tar.bz2 scummvm-rg350-3d0ac2a676bd726a1f390b83812f8f5ac7a52d4a.zip |
Merged sync_SegManagerPtr() inside EngineState::saveLoadWithSerializer()
svn-id: r49512
-rw-r--r-- | engines/sci/engine/savegame.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 17dbbc94d9..835ae5b966 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -293,16 +293,6 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint32LE(Nodes_seg_id); } -static void sync_SegManagerPtr(Common::Serializer &s, SegManager *&obj) { - s.skip(1, VER(9), VER(9)); // obsolete: used to be a flag indicating if we got sci11 or not - - if (s.isLoading()) - obj->resetSegMan(); - - obj->saveLoadWithSerializer(s); -} - - template <> void syncWithSerializer(Common::Serializer &s, Class &obj) { @@ -381,7 +371,12 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint16LE(picPortLeft); } - sync_SegManagerPtr(s, _segMan); + s.skip(1, VER(9), VER(9)); // obsolete: used to be a flag indicating if we got sci11 or not + + if (s.isLoading()) + _segMan->resetSegMan(); + + _segMan->saveLoadWithSerializer(s); syncArray<Class>(s, _segMan->_classTable); |