From de5ca1e472dda7cffcaf7d0938f2d29c3e027ccc Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Tue, 26 May 2009 00:03:41 +0000 Subject: SCI: Some small fixes for KQ6CD. svn-id: r40898 --- engines/sci/detection.cpp | 2 +- engines/sci/engine/kernel.cpp | 2 ++ engines/sci/engine/kgraphics.cpp | 2 +- engines/sci/engine/ksound.cpp | 10 ++++++++-- engines/sci/gfx/seq_decoder.cpp | 2 +- engines/sci/gfx/seq_decoder.h | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index c492c415eb..bf90d15604 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -1232,7 +1232,7 @@ static const struct SciGameDescription SciGameDescriptions[] = { {"resource.000", 0, "233394a5f33b475ae5975e7e9a420865", 8376352}, {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0}, 0, - SCI_VERSION_AUTODETECT, + 7, SCI_VERSION_1_1 }, diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 751ea7e6f5..10c7a3c14b 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -642,6 +642,8 @@ void vocabulary_get_knames(ResourceManager *resmgr, Common::StringList &names) { break; case SCI_VERSION_1_1: vocabulary_get_knames1(resmgr, names); + // KQ6CD calls unimplemented function 0x26 + names[0x26] = "Dummy"; break; #ifdef ENABLE_SCI32 case SCI_VERSION_32: diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 884ac346db..61a9ca4e52 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -3330,7 +3330,7 @@ reg_t kShowMovie(EngineState *s, int funct_nr, int argc, reg_t *argv) { int frameNr = 0; SeqDecoder seq; - if (!seq.loadFile(filename)) { + if (!seq.loadFile(filename) && !seq.loadFile(Common::String("SEQ/") + filename)) { warning("Failed to open movie file %s", filename); return s->r_acc; } diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp index 69e1a6cbad..1f7ece33c3 100644 --- a/engines/sci/engine/ksound.cpp +++ b/engines/sci/engine/ksound.cpp @@ -797,7 +797,8 @@ reg_t kDoSound_SCI1(EngineState *s, int funct_nr, int argc, reg_t *argv) { break; } case _K_SCI1_SOUND_GET_AUDIO_CAPABILITY : { - return make_reg(0, 1);//NULL_REG; + // Tests for digital audio support + return make_reg(0, 1); } case _K_SCI1_SOUND_PLAY_HANDLE : { int looping = GET_SEL32V(obj, loop); @@ -1051,7 +1052,12 @@ reg_t kDoAudio(EngineState *s, int funct_nr, int argc, reg_t *argv) { mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, UKPV(1)); break; case kSci1AudioLanguage: - s->sound.audioResource->setAudioLang(SKPV(1)); + if (argc == 1) { + // In SCI1.1: tests for digital audio support + return make_reg(0, 1); + } else { + s->sound.audioResource->setAudioLang(SKPV(1)); + } break; default: warning("kDoAudio: Unhandled case %d", UKPV(0)); diff --git a/engines/sci/gfx/seq_decoder.cpp b/engines/sci/gfx/seq_decoder.cpp index ac12678b09..5a1babced9 100644 --- a/engines/sci/gfx/seq_decoder.cpp +++ b/engines/sci/gfx/seq_decoder.cpp @@ -34,7 +34,7 @@ SeqDecoder::~SeqDecoder() { closeFile(); } -bool SeqDecoder::loadFile(const char *fileName) { +bool SeqDecoder::loadFile(Common::String fileName) { closeFile(); _fileStream = SearchMan.createReadStreamForMember(fileName); diff --git a/engines/sci/gfx/seq_decoder.h b/engines/sci/gfx/seq_decoder.h index 99126c056a..16574007fe 100644 --- a/engines/sci/gfx/seq_decoder.h +++ b/engines/sci/gfx/seq_decoder.h @@ -32,7 +32,7 @@ class SeqDecoder { public: SeqDecoder() : _fileStream(0), _palette(0) { } ~SeqDecoder(); - bool loadFile(const char *fileName); + bool loadFile(Common::String fileName); void closeFile(); gfx_pixmap_t *getFrame(bool &hasNext); -- cgit v1.2.3