aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2009-11-20 23:37:56 +0000
committerFilippos Karapetis2009-11-20 23:37:56 +0000
commitfd116847bdb1c606a116ff133bdfd078ec03d2c7 (patch)
treebfb9a6b6c43780ff5028a0f00784de9122f743a9 /engines/sci/engine
parentece0444f9c1e1ae2485c7264214c2f29a2cfe92c (diff)
downloadscummvm-rg350-fd116847bdb1c606a116ff133bdfd078ec03d2c7.tar.gz
scummvm-rg350-fd116847bdb1c606a116ff133bdfd078ec03d2c7.tar.bz2
scummvm-rg350-fd116847bdb1c606a116ff133bdfd078ec03d2c7.zip
Fixed sound detection for Jones CD
svn-id: r46030
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/state.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 5480fc8489..1dfd2aa89a 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -516,6 +516,21 @@ SciVersion EngineState::detectDoSoundType() {
}
}
+ // Jones CD and perhaps others were in the middle of the transition from SCI1 old to SCI1 new
+ // sound code, and had some temporary selector methods in the Sound object. Check for these here,
+ // and set the doSound type to SCI1 new if they're found
+ if (getSciVersion() == SCI_VERSION_1_MIDDLE) {
+ reg_t tmp;
+ Selector slc = _kernel->findSelector("cue");
+ if (slc != -1) {
+ if (lookup_selector(_segMan, _segMan->findObjectByName("Sound"), slc, NULL, &tmp) == kSelectorMethod) {
+ // The Sound object has a temporary cue selector, therefore the game is using late
+ // SCI1 sound functions
+ _doSoundType = SCI_VERSION_1_LATE;
+ }
+ }
+ }
+
debugC(1, kDebugLevelSound, "Detected DoSound type: %s", getSciVersionDesc(_doSoundType).c_str());
}