From 66efb750a0ccaa3c2ff8b77f60544a345328da8b Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Sat, 20 May 2017 19:21:24 -0500 Subject: SCI: Add more support for >16-bit SCI3 offsets Basically just grepped for getOffset calls being assigned to uint16s and expanded those to uint32 when they looked trivial. While some of these changes seem superfluous, at least for the US/English SCI3 games where potentially impacted game scripts are not large enough to have a problem with 16-bit offsets (e.g. when feature detecting the sound type), at least some of these changes are necessary for correct operation of the find_callk debugger command in SCI3 games. There should not be a reason why any of these variables need to be kept as uint16, in any case. --- engines/sci/engine/features.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/sci/engine/features.cpp') 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; -- cgit v1.2.3