diff options
| author | Filippos Karapetis | 2010-06-15 07:20:53 +0000 |
|---|---|---|
| committer | Filippos Karapetis | 2010-06-15 07:20:53 +0000 |
| commit | e93f8902a89cb969fd344e49e7086213c8609dbf (patch) | |
| tree | 945226b96275eb14163cb9b1e555fdac6ae7e5a0 /engines/sci/engine/seg_manager.cpp | |
| parent | ff66c67439ec501da5335e78e77b58943cea0972 (diff) | |
| download | scummvm-rg350-e93f8902a89cb969fd344e49e7086213c8609dbf.tar.gz scummvm-rg350-e93f8902a89cb969fd344e49e7086213c8609dbf.tar.bz2 scummvm-rg350-e93f8902a89cb969fd344e49e7086213c8609dbf.zip | |
Cleanup of the savegame code:
- Added a saveLoadWithSerializer() method to the reg_t class
- Moved SegManager::reconstructClones() inside savegame.cpp
- Moved SoundCommandParser::syncPlayList() and SoundCommandParser::reconstructPlayList() inside savegame.cpp
svn-id: r49683
Diffstat (limited to 'engines/sci/engine/seg_manager.cpp')
| -rw-r--r-- | engines/sci/engine/seg_manager.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 8d51b27099..96670b5aeb 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -476,39 +476,6 @@ Clone *SegManager::allocateClone(reg_t *addr) { return &(table->_table[offset]); } -void SegManager::reconstructClones() { - for (uint i = 0; i < _heap.size(); i++) { - if (_heap[i]) { - SegmentObj *mobj = _heap[i]; - if (mobj->getType() == SEG_TYPE_CLONES) { - CloneTable *ct = (CloneTable *)mobj; - - for (uint j = 0; j < ct->_table.size(); j++) { - // Check if the clone entry is used - uint entryNum = (uint)ct->first_free; - bool isUsed = true; - while (entryNum != ((uint) CloneTable::HEAPENTRY_INVALID)) { - if (entryNum == j) { - isUsed = false; - break; - } - entryNum = ct->_table[entryNum].next_free; - } - - if (!isUsed) - continue; - - CloneTable::Entry &seeker = ct->_table[j]; - const Object *baseObj = getObject(seeker.getSpeciesSelector()); - seeker.cloneFromObject(baseObj); - if (!baseObj) - warning("Clone entry without a base class: %d", j); - } // end for - } // end if - } // end if - } // end for -} - List *SegManager::allocateList(reg_t *addr) { ListTable *table; int offset; |
