- 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
This commit is contained in:
parent
9c2da78ba9
commit
dc4d61f718
3 changed files with 38 additions and 56 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue