aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2010-07-01 16:05:10 +0000
committerMax Horn2010-07-01 16:05:10 +0000
commitc822cd67cbebf22999a6b4d95d965ea5873e1b9a (patch)
treeabbe265263e1246a70013bed05605e508dbd28b8
parent36799dc83f59674de8956ea2ec29029783633f45 (diff)
downloadscummvm-rg350-c822cd67cbebf22999a6b4d95d965ea5873e1b9a.tar.gz
scummvm-rg350-c822cd67cbebf22999a6b4d95d965ea5873e1b9a.tar.bz2
scummvm-rg350-c822cd67cbebf22999a6b4d95d965ea5873e1b9a.zip
SCI: Make SegManager::_classTable private.
This require a small tweak to the save/load code: I moved the syncing logic for _classtable from EngineState::saveLoadWithSerializer to SegManager::saveLoadWithSerializer, which in theory should have no effect (luckily, _classtable was being synced right after the segment manager). svn-id: r50551
-rw-r--r--engines/sci/engine/savegame.cpp4
-rw-r--r--engines/sci/engine/seg_manager.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 6a1cbe4740..bf29dbb046 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -248,6 +248,8 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) {
s.syncAsSint32LE(_clonesSegId);
s.syncAsSint32LE(_listsSegId);
s.syncAsSint32LE(_nodesSegId);
+
+ syncArray<Class>(s, _classTable);
}
@@ -343,8 +345,6 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) {
_segMan->saveLoadWithSerializer(s);
- syncArray<Class>(s, _segMan->_classTable);
-
g_sci->_soundCmd->syncPlayList(s);
}
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h
index 6fb1114555..5bb6f7e524 100644
--- a/engines/sci/engine/seg_manager.h
+++ b/engines/sci/engine/seg_manager.h
@@ -462,8 +462,6 @@ public:
public: // TODO: make private
Common::Array<SegmentObj *> _heap;
- // Only accessible from saveLoadWithSerializer()
- Common::Array<Class> _classTable; /**< Table of all classes */
#ifdef ENABLE_SCI32
SciArray<reg_t> *allocateArray(reg_t *addr);
@@ -476,6 +474,8 @@ public: // TODO: make private
#endif
private:
+ // Only accessible from saveLoadWithSerializer()
+ Common::Array<Class> _classTable; /**< Table of all classes */
/** Map script ids to segment ids. */
Common::HashMap<int, SegmentId> _scriptSegMap;