From c822cd67cbebf22999a6b4d95d965ea5873e1b9a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 1 Jul 2010 16:05:10 +0000 Subject: 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 --- engines/sci/engine/savegame.cpp | 4 ++-- engines/sci/engine/seg_manager.h | 4 ++-- 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(s, _classTable); } @@ -343,8 +345,6 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) { _segMan->saveLoadWithSerializer(s); - syncArray(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 _heap; - // Only accessible from saveLoadWithSerializer() - Common::Array _classTable; /**< Table of all classes */ #ifdef ENABLE_SCI32 SciArray *allocateArray(reg_t *addr); @@ -476,6 +474,8 @@ public: // TODO: make private #endif private: + // Only accessible from saveLoadWithSerializer() + Common::Array _classTable; /**< Table of all classes */ /** Map script ids to segment ids. */ Common::HashMap _scriptSegMap; -- cgit v1.2.3