aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/script.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-05-30 20:06:50 +0000
committerFilippos Karapetis2010-05-30 20:06:50 +0000
commitdc4d61f7181edf332d426bab9d16e0055e3d0f21 (patch)
treeee1ea233302a6e4ca0b7ecf05922bf9192b1c219 /engines/sci/engine/script.cpp
parent9c2da78ba9a99145241025974c42219a673dd2a8 (diff)
downloadscummvm-rg350-dc4d61f7181edf332d426bab9d16e0055e3d0f21.tar.gz
scummvm-rg350-dc4d61f7181edf332d426bab9d16e0055e3d0f21.tar.bz2
scummvm-rg350-dc4d61f7181edf332d426bab9d16e0055e3d0f21.zip
- Merged the SCI0 scriptRelocate() and SCI11 heapRelocate() functions inside relocate(). scriptRelocate checked one more relocation entry, which seems wrong, so we're now checking for the correct number of relocations in all SCI versions
- Re-added the error when script + heap exceed 64KB (better than an assert) - this should theoretically never happen, and it never has for the games tested - Removed the relocated sanity check - again, it shouldn't occur (else something else is wrong) svn-id: r49332
Diffstat (limited to 'engines/sci/engine/script.cpp')
-rw-r--r--engines/sci/engine/script.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 99a567d1e7..aa975cc1d0 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -419,7 +419,7 @@ int script_instantiate_sci0(ResourceManager *resMan, SegManager *segMan, int scr
} while (objType != 0 && curOffset < scr->getScriptSize() - 2);
if (relocation >= 0)
- scr->scriptRelocate(make_reg(seg_id, relocation));
+ scr->relocate(make_reg(seg_id, relocation));
return seg_id; // instantiation successful
}
@@ -439,7 +439,7 @@ int script_instantiate_sci11(ResourceManager *resMan, SegManager *segMan, int sc
int heapStart = scr->getScriptSize();
segMan->scriptInitialiseLocals(make_reg(seg_id, heapStart + 4));
segMan->scriptInitialiseObjectsSci11(seg_id);
- scr->heapRelocate(make_reg(seg_id, READ_SCI11ENDIAN_UINT16(scr->_heapStart)));
+ scr->relocate(make_reg(seg_id, READ_SCI11ENDIAN_UINT16(scr->_heapStart)));
return seg_id;
}