diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/detection.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/ksound.cpp | 14 |
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: |