diff options
author | Filippos Karapetis | 2010-05-29 15:29:27 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-29 15:29:27 +0000 |
commit | a6156a680583bfd3876bcd1c6d5e550763d0a677 (patch) | |
tree | 0d7544a88ea42e40e1f8265b77aede9f15867943 /engines/sci/engine/script.cpp | |
parent | 3d09af03773d353e73b61197befa63031e99d096 (diff) | |
download | scummvm-rg350-a6156a680583bfd3876bcd1c6d5e550763d0a677.tar.gz scummvm-rg350-a6156a680583bfd3876bcd1c6d5e550763d0a677.tar.bz2 scummvm-rg350-a6156a680583bfd3876bcd1c6d5e550763d0a677.zip |
Removed the scriptRelocateExportsSci11() hack. The open spell in QFG1VGA works now (thanks to waltervn for all his help on this)
svn-id: r49311
Diffstat (limited to 'engines/sci/engine/script.cpp')
-rw-r--r-- | engines/sci/engine/script.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index e0bcd632cc..d1cbfbf551 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -200,23 +200,6 @@ void SegManager::scriptInitialiseLocals(reg_t location) { } } -void SegManager::scriptRelocateExportsSci11(SegmentId seg) { - Script *scr = getScript(seg); - for (int i = 0; i < scr->_numExports; i++) { - /* We are forced to use an ugly heuristic here to distinguish function - exports from object/class exports. The former kind points into the - script resource, the latter into the heap resource. */ - uint16 location = READ_SCI11ENDIAN_UINT16(scr->_exportTable + i); - - if ((location < scr->_heapSize - 1) && (READ_SCI11ENDIAN_UINT16(scr->_heapStart + location) == SCRIPT_OBJECT_MAGIC_NUMBER)) { - WRITE_SCI11ENDIAN_UINT16(scr->_exportTable + i, location + scr->_heapStart - scr->_buf); - } else { - // Otherwise it's probably a function export, - // and we don't need to do anything. - } - } -} - void SegManager::scriptInitialiseObjectsSci11(SegmentId seg) { Script *scr = getScript(seg); const byte *seeker = scr->_heapStart + 4 + READ_SCI11ENDIAN_UINT16(scr->_heapStart + 2) * 2; @@ -484,7 +467,6 @@ int script_instantiate_sci11(ResourceManager *resMan, SegManager *segMan, int sc segMan->scriptInitialiseLocals(make_reg(seg_id, _heapStart + 4)); - segMan->scriptRelocateExportsSci11(seg_id); segMan->scriptInitialiseObjectsSci11(seg_id); scr->heapRelocate(make_reg(seg_id, READ_SCI11ENDIAN_UINT16(heap->data))); |