aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/script.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-14 20:45:00 +0000
committerFilippos Karapetis2010-06-14 20:45:00 +0000
commit1fde7f1abceb5f7c52982e9b2bf18188037b63d5 (patch)
tree0ce987d7607048099598eee49c89e01c2cceabb1 /engines/sci/engine/script.cpp
parent86878450ee26cbf2b4f79e5e54787fe5cce2a10e (diff)
downloadscummvm-rg350-1fde7f1abceb5f7c52982e9b2bf18188037b63d5.tar.gz
scummvm-rg350-1fde7f1abceb5f7c52982e9b2bf18188037b63d5.tar.bz2
scummvm-rg350-1fde7f1abceb5f7c52982e9b2bf18188037b63d5.zip
Removed the code used for tracking script code block relocations in SCI0-SCI1 games, as we don't actually relocate these blocks, and it was used solely for verification of the exports table. The issue that this warning was created for should no longer occur
svn-id: r49669
Diffstat (limited to 'engines/sci/engine/script.cpp')
-rw-r--r--engines/sci/engine/script.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index c1810df679..cb112a90f9 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -179,7 +179,10 @@ void SegManager::scriptInitialiseLocals(SegmentId segmentId) {
void SegManager::scriptInitialiseObjectsSci11(SegmentId seg) {
Script *scr = getScript(seg);
- const byte *seeker = scr->_heapStart + 4 + READ_SCI11ENDIAN_UINT16(scr->_heapStart + 2) * 2;
+ const byte *seeker = scr->_heapStart;;
+ uint16 entrySize = READ_SCI11ENDIAN_UINT16(seeker + 2) * 2;
+ seeker += entrySize; // skip first entry
+ seeker += 4; // skip header
while (READ_SCI11ENDIAN_UINT16(seeker) == SCRIPT_OBJECT_MAGIC_NUMBER) {
if (READ_SCI11ENDIAN_UINT16(seeker + 14) & kInfoFlagClass) { // -info- selector
@@ -251,10 +254,6 @@ void script_instantiate_sci0(Script *scr, int segmentId, SegManager *segMan) {
addr = make_reg(segmentId, curOffset);;
switch (objType) {
- case SCI_OBJ_CODE:
- if (pass == 0)
- scr->scriptAddCodeBlock(addr);
- break;
case SCI_OBJ_OBJECT:
case SCI_OBJ_CLASS:
if (pass == 0 && objType == SCI_OBJ_CLASS) {