diff options
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/console.cpp | 8 | ||||
-rw-r--r-- | engines/sci/engine/features.cpp | 10 | ||||
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index d67bd694ab..bc115341b7 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -1104,8 +1104,8 @@ bool Console::cmdVerifyScripts(int argc, const char **argv) { debugPrintf("Error: script and heap %d together are larger than 64KB (%u bytes)\n", itr->getNumber(), script->size() + heap->size()); } else { // SCI3 - if (script && script->size() > 65535) - debugPrintf("Error: script %d is larger than 64KB (%u bytes)\n", + if (script && script->size() > 0x3FFFF) + debugPrintf("Error: script %d is larger than 256KB (%u bytes)\n", itr->getNumber(), script->size()); } } @@ -1922,7 +1922,7 @@ bool Console::cmdSavedBits(int argc, const char **argv) { Common::Array<reg_t> entries = hunks->listAllDeallocatable(id); for (uint i = 0; i < entries.size(); ++i) { - uint16 offset = entries[i].getOffset(); + uint32 offset = entries[i].getOffset(); const Hunk& h = hunks->at(offset); if (strcmp(h.type, "SaveBits()") == 0) { byte* memoryPtr = (byte *)h.mem; @@ -3556,7 +3556,7 @@ void Console::printKernelCallsFound(int kernelFuncNum, bool showFoundScripts) { // Now dissassemble each method of the script object for (uint16 i = 0; i < obj->getMethodCount(); i++) { reg_t fptr = obj->getFunction(i); - uint16 offset = fptr.getOffset(); + uint32 offset = fptr.getOffset(); int16 opparams[4]; byte extOpcode; byte opcode; diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp index 1e8cc6dfb9..9251ac69e1 100644 --- a/engines/sci/engine/features.cpp +++ b/engines/sci/engine/features.cpp @@ -77,7 +77,7 @@ bool GameFeatures::autoDetectSoundType() { if (!addr.getSegment()) return false; - uint16 offset = addr.getOffset(); + uint32 offset = addr.getOffset(); Script *script = _segMan->getScript(addr.getSegment()); uint16 intParam = 0xFFFF; bool foundTarget = false; @@ -224,7 +224,7 @@ bool GameFeatures::autoDetectLofsType(Common::String gameSuperClassName, int met if (!addr.getSegment()) return false; - uint16 offset = addr.getOffset(); + uint32 offset = addr.getOffset(); Script *script = _segMan->getScript(addr.getSegment()); while (true) { @@ -323,7 +323,7 @@ bool GameFeatures::autoDetectGfxFunctionsType(int methodNum) { if (!addr.getSegment()) return false; - uint16 offset = addr.getOffset(); + uint32 offset = addr.getOffset(); Script *script = _segMan->getScript(addr.getSegment()); while (true) { @@ -485,7 +485,7 @@ bool GameFeatures::autoDetectSci21KernelType() { if (!addr.getSegment()) return false; - uint16 offset = addr.getOffset(); + uint32 offset = addr.getOffset(); Script *script = _segMan->getScript(addr.getSegment()); while (true) { @@ -620,7 +620,7 @@ bool GameFeatures::autoDetectMoveCountType() { if (!addr.getSegment()) return false; - uint16 offset = addr.getOffset(); + uint32 offset = addr.getOffset(); Script *script = _segMan->getScript(addr.getSegment()); bool foundTarget = false; diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 98c35fcb49..af4b8ff081 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -160,7 +160,7 @@ reg_t kClone(EngineState *s, int argc, reg_t *argv) { debugC(kDebugLevelMemory, "Attempting to clone from %04x:%04x", PRINT_REG(parentAddr)); - uint16 infoSelector = parentObj->getInfoSelector().getOffset(); + uint16 infoSelector = parentObj->getInfoSelector().toUint16(); cloneObj = s->_segMan->allocateClone(&cloneAddr); if (!cloneObj) { @@ -211,7 +211,7 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) { // At least kq4early relies on this behavior. The scripts clone "Sound", then set bit 1 manually // and call kDisposeClone later. In that case we may not free it, otherwise we will run into issues // later, because kIsObject would then return false and Sound object wouldn't get checked. - uint16 infoSelector = object->getInfoSelector().getOffset(); + uint16 infoSelector = object->getInfoSelector().toUint16(); if ((infoSelector & 3) == kInfoFlagClone) object->markAsFreed(); |