[Scummvm-cvs-logs] SF.net SVN: scummvm:[50551] scummvm/trunk/engines/sci/engine

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Jul 1 18:05:10 CEST 2010


Revision: 50551
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50551&view=rev
Author:   fingolfin
Date:     2010-07-01 16:05:10 +0000 (Thu, 01 Jul 2010)

Log Message:
-----------
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).

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.h

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-07-01 16:04:48 UTC (rev 50550)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-07-01 16:05:10 UTC (rev 50551)
@@ -248,6 +248,8 @@
 	s.syncAsSint32LE(_clonesSegId);
 	s.syncAsSint32LE(_listsSegId);
 	s.syncAsSint32LE(_nodesSegId);
+
+	syncArray<Class>(s, _classTable);
 }
 
 
@@ -343,8 +345,6 @@
 
 	_segMan->saveLoadWithSerializer(s);
 
-	syncArray<Class>(s, _segMan->_classTable);
-
 	g_sci->_soundCmd->syncPlayList(s);
 }
 

Modified: scummvm/trunk/engines/sci/engine/seg_manager.h
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.h	2010-07-01 16:04:48 UTC (rev 50550)
+++ scummvm/trunk/engines/sci/engine/seg_manager.h	2010-07-01 16:05:10 UTC (rev 50551)
@@ -462,8 +462,6 @@
 
 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 @@
 #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;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list