aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/savegame.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-09-02 23:11:50 +0000
committerFilippos Karapetis2009-09-02 23:11:50 +0000
commit9829378a98391ef2288b5c0f97d8011346909ac2 (patch)
tree9ab815c3e29a1f87f3bde1957d7b97f4f6bffd41 /engines/sci/engine/savegame.cpp
parent58f06b394f87d094ea1139f5098cac12044ea1ee (diff)
downloadscummvm-rg350-9829378a98391ef2288b5c0f97d8011346909ac2.tar.gz
scummvm-rg350-9829378a98391ef2288b5c0f97d8011346909ac2.tar.bz2
scummvm-rg350-9829378a98391ef2288b5c0f97d8011346909ac2.zip
Fixed loading again (broken accidentally in rev. 43504
svn-id: r43913
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r--engines/sci/engine/savegame.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index f57901a064..9812a16ab8 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -204,14 +204,7 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) {
s.syncAsSint32LE(Nodes_seg_id);
}
-static void sync_SegManagerPtr(Common::Serializer &s, SegManager *&obj) {
- ResourceManager *resMan = 0;
-
- if (s.isSaving()) {
- assert(obj);
- resMan = obj->_resMan;
- }
-
+static void sync_SegManagerPtr(Common::Serializer &s, ResourceManager *&resMan, SegManager *&obj) {
s.skip(1); // obsolete: used to be a flag indicating if we got sci11 or not
if (s.isLoading()) {
@@ -264,7 +257,7 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) {
s.syncAsSint32LE(status_bar_foreground);
s.syncAsSint32LE(status_bar_background);
- sync_SegManagerPtr(s, segMan);
+ sync_SegManagerPtr(s, resMan, segMan);
syncArray<Class>(s, segMan->_classtable);