aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWalter van Niftrik2010-04-24 22:02:31 +0000
committerWalter van Niftrik2010-04-24 22:02:31 +0000
commit725fb248ea17245f71e1e8c81f82f29fc8f1bdbc (patch)
treed50b015f2c414d0044904033d9db0fcd4a2b25ca /engines
parent194bdd9b8375ae6612ef8ee2c733b6349c12d0fe (diff)
downloadscummvm-rg350-725fb248ea17245f71e1e8c81f82f29fc8f1bdbc.tar.gz
scummvm-rg350-725fb248ea17245f71e1e8c81f82f29fc8f1bdbc.tar.bz2
scummvm-rg350-725fb248ea17245f71e1e8c81f82f29fc8f1bdbc.zip
SCI: Don't error() out when autodetection fails
svn-id: r48790
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/features.cpp15
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;