diff options
| author | Matthew Hoops | 2011-05-03 17:17:27 -0400 |
|---|---|---|
| committer | Matthew Hoops | 2011-05-03 17:25:41 -0400 |
| commit | 9cb600099f4c29298707787cafad2741a1cd6686 (patch) | |
| tree | fb1930fa56b611317831d66442cba19b18d2e57a /engines/sci/engine/features.cpp | |
| parent | 3b2283daf850605ca897002afbafe44489c35473 (diff) | |
| parent | 95a6098f672191dc0792bd4f9bfa18706bbe8e3a (diff) | |
| download | scummvm-rg350-9cb600099f4c29298707787cafad2741a1cd6686.tar.gz scummvm-rg350-9cb600099f4c29298707787cafad2741a1cd6686.tar.bz2 scummvm-rg350-9cb600099f4c29298707787cafad2741a1cd6686.zip | |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/sci/engine/features.cpp')
| -rw-r--r-- | engines/sci/engine/features.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp index 206624f87e..964097f57d 100644 --- a/engines/sci/engine/features.cpp +++ b/engines/sci/engine/features.cpp @@ -285,20 +285,16 @@ SciVersion GameFeatures::detectLofsType() { } // Find a function of the "Game" object (which is the game super class) which invokes lofsa/lofss - reg_t gameSuperClass = g_sci->getGameSuperClassAddress(); + const Object *gameObject = _segMan->getObject(g_sci->getGameObject()); + const Object *gameSuperObject = _segMan->getObject(gameObject->getSuperClassSelector()); bool found = false; - if (!gameSuperClass.isNull()) { - Common::String gameSuperClassName = _segMan->getObjectName(gameSuperClass); - const Object *gameSuperObject = _segMan->getObject(gameSuperClass); + if (gameSuperObject) { + Common::String gameSuperClassName = _segMan->getObjectName(gameObject->getSuperClassSelector()); - if (gameSuperObject) { - for (uint m = 0; m < gameSuperObject->getMethodCount(); m++) { - found = autoDetectLofsType(gameSuperClassName, m); - if (found) - break; - } - } else { - warning("detectLofsType(): Could not get superclass object"); + for (uint m = 0; m < gameSuperObject->getMethodCount(); m++) { + found = autoDetectLofsType(gameSuperClassName, m); + if (found) + break; } } else { warning("detectLofsType(): Could not find superclass of game object"); |
