diff options
author | Max Horn | 2009-05-08 09:54:06 +0000 |
---|---|---|
committer | Max Horn | 2009-05-08 09:54:06 +0000 |
commit | 0223b7e490a6cdcc63aea0239cc6d079591c429f (patch) | |
tree | 51432101b0ab00afcb1721ec59e07ba4dafa46b4 /engines/sci/engine/gc.cpp | |
parent | 8d4a4271bb0cf78508f600d80893874d436e9883 (diff) | |
download | scummvm-rg350-0223b7e490a6cdcc63aea0239cc6d079591c429f.tar.gz scummvm-rg350-0223b7e490a6cdcc63aea0239cc6d079591c429f.tar.bz2 scummvm-rg350-0223b7e490a6cdcc63aea0239cc6d079591c429f.zip |
SCI: Moved findCanonicAddress from SegInterface to MemObject
svn-id: r40376
Diffstat (limited to 'engines/sci/engine/gc.cpp')
-rw-r--r-- | engines/sci/engine/gc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp index f5f9c51051..610ed853af 100644 --- a/engines/sci/engine/gc.cpp +++ b/engines/sci/engine/gc.cpp @@ -51,15 +51,15 @@ struct WorklistManager { } }; -static reg_t_hash_map *normalise_hashmap_ptrs(reg_t_hash_map &nonnormal_map, const Common::Array<SegInterface *> &interfaces) { +static reg_t_hash_map *normalise_hashmap_ptrs(SegManager *sm, reg_t_hash_map &nonnormal_map) { reg_t_hash_map *normal_map = new reg_t_hash_map(); for (reg_t_hash_map::iterator i = nonnormal_map.begin(); i != nonnormal_map.end(); ++i) { reg_t reg = i->_key; - SegInterface *interfce = (reg.segment < interfaces.size()) ? interfaces[reg.segment] : NULL; + MemObject *mobj = (reg.segment < sm->_heap.size()) ? sm->_heap[reg.segment] : NULL; - if (interfce) { - reg = interfce->findCanonicAddress(reg); + if (mobj) { + reg = mobj->findCanonicAddress(sm, reg); normal_map->setVal(reg, true); } } @@ -156,7 +156,7 @@ reg_t_hash_map *find_all_used_references(EngineState *s) { } // Normalise - normal_map = normalise_hashmap_ptrs(wm._map, interfaces); + normal_map = normalise_hashmap_ptrs(sm, wm._map); // Cleanup for (i = 1; i < sm->_heap.size(); i++) |