aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-05-27 08:48:57 +0000
committerFilippos Karapetis2009-05-27 08:48:57 +0000
commit16078599fb139e2e066f899b642808e86140b7e5 (patch)
treea4d6ecf9e9b250c587f5214dba00dc6bd66c0e62 /engines
parentcd35616b84ce4e2579abc3dedfe5e0e68b53a93e (diff)
downloadscummvm-rg350-16078599fb139e2e066f899b642808e86140b7e5.tar.gz
scummvm-rg350-16078599fb139e2e066f899b642808e86140b7e5.tar.bz2
scummvm-rg350-16078599fb139e2e066f899b642808e86140b7e5.zip
Added a warning when kDoAudio is called with the new semantics (SQ4CD or newer) and fixed the detection entry for SQ4CD
svn-id: r40935
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/detection.cpp2
-rw-r--r--engines/sci/engine/ksound.cpp14
2 files changed, 11 insertions, 5 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index b928776dcb..07e1378e91 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -3072,7 +3072,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
// Space Quest 4 - English DOS CD (from the Space Quest Collection)
// Executable scanning reports "1.001.064", VERSION file reports "1.0"
- {{"sq4", "", {
+ {{"sq4", "CD", {
{"resource.map", 0, "ed90a8e3ccc53af6633ff6ab58392bae", 7054},
{"resource.000", 0, "63247e3901ab8963d4eece73747832e0", 5157378},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index e649a8818a..81db2b178e 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -1005,13 +1005,19 @@ reg_t kDoAudio(EngineState *s, int funct_nr, int argc, reg_t *argv) {
switch (UKPV(0)) {
case kSci1AudioWPlay:
- case kSci1AudioPlay: {
+ case kSci1AudioPlay:
s->sound.audioResource->stop();
- Audio::AudioStream *audioStream = s->sound.audioResource->getAudioStream(UKPV(1), &sampleLen);
+ if (argc == 2) { // KQ5CD, KQ6 floppy
+ Audio::AudioStream *audioStream = s->sound.audioResource->getAudioStream(UKPV(1), &sampleLen);
- if (audioStream)
- mixer->playInputStream(Audio::Mixer::kSpeechSoundType, s->sound.audioResource->getAudioHandle(), audioStream);
+ if (audioStream)
+ mixer->playInputStream(Audio::Mixer::kSpeechSoundType, s->sound.audioResource->getAudioHandle(), audioStream);
+ } else if (argc == 6) { // SQ4CD or newer
+ // TODO
+ warning("kDoAudio: Play called with new semantics - 5 parameters: %d %d %d %d %d", UKPV(1), UKPV(2), UKPV(3), UKPV(4), UKPV(5));
+ } else { // Hopefully, this should never happen
+ warning("kDoAudio: Play called with an unknown number of parameters (%d)", argc);
}
return make_reg(0, sampleLen); // return sample length in ticks
case kSci1AudioStop: