diff options
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/features.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp index 83358684fa..e51867332a 100644 --- a/engines/sci/engine/features.cpp +++ b/engines/sci/engine/features.cpp @@ -71,6 +71,9 @@ bool GameFeatures::autoDetectSoundType() { // Look up the script address reg_t addr = getDetectionAddr("Sound", _kernel->_selectorCache.play); + if (!addr.segment) + return false; + uint16 offset = addr.offset; Script *script = _segMan->getScript(addr.segment); uint16 intParam = 0xFFFF; @@ -206,6 +209,9 @@ bool GameFeatures::autoDetectLofsType(int methodNum) { // Look up the script address reg_t addr = getDetectionAddr("Game", -1, methodNum); + if (!addr.segment) + return false; + uint16 offset = addr.offset; Script *script = _segMan->getScript(addr.segment); @@ -289,6 +295,9 @@ bool GameFeatures::autoDetectGfxFunctionsType(int methodNum) { // Look up the script address reg_t addr = getDetectionAddr("Rm", _kernel->_selectorCache.overlay, methodNum); + if (!addr.segment) + return false; + uint16 offset = addr.offset; Script *script = _segMan->getScript(addr.segment); @@ -379,6 +388,9 @@ bool GameFeatures::autoDetectSci21KernelType() { // Look up the script address reg_t addr = getDetectionAddr("Sound", _kernel->_selectorCache.play); + if (!addr.segment) + return false; + uint16 offset = addr.offset; Script *script = _segMan->getScript(addr.segment); @@ -428,6 +440,9 @@ bool GameFeatures::autoDetectMoveCountType() { // Look up the script address reg_t addr = getDetectionAddr("Motion", _kernel->_selectorCache.doit); + if (!addr.segment) + return false; + uint16 offset = addr.offset; Script *script = _segMan->getScript(addr.segment); bool foundTarget = false; |