diff options
-rw-r--r-- | engines/kyra/kyra_hof.cpp | 17 | ||||
-rw-r--r-- | engines/kyra/kyra_mr.cpp | 10 |
2 files changed, 19 insertions, 8 deletions
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index b642248665..33a8af91f1 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -1510,15 +1510,19 @@ void KyraEngine_HoF::openTalkFile(int newFile) { _oldTalkFile = -1; } - if (newFile == 0) { + if (newFile == 0) strcpy(talkFilename, "ANYTALK.TLK"); - _res->loadPakFile(talkFilename); - } else { + else sprintf(talkFilename, "CH%dVOC.TLK", newFile); - _res->loadPakFile(talkFilename); - } _oldTalkFile = newFile; + + if (!_res->loadPakFile(talkFilename)) { + if (speechEnabled()) { + warning("Couldn't load file '%s' falling back to text only mode", talkFilename); + _configVoice = 0; + } + } } void KyraEngine_HoF::snd_playVoiceFile(int id) { @@ -1554,7 +1558,8 @@ void KyraEngine_HoF::playVoice(int high, int low) { if (!_flags.isTalkie) return; int vocFile = high * 10000 + low * 10; - snd_playVoiceFile(vocFile); + if (speechEnabled()) + snd_playVoiceFile(vocFile); } void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) { diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index a4e5b58364..a61253199b 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -508,7 +508,8 @@ void KyraEngine_MR::snd_playVoiceFile(int file) { char filename[16]; snprintf(filename, 16, "%.08u", (uint)file); - _voiceSoundChannel = _soundDigital->playSound(filename, 0xFE, Audio::Mixer::kSpeechSoundType, 255); + if (speechEnabled()) + _voiceSoundChannel = _soundDigital->playSound(filename, 0xFE, Audio::Mixer::kSpeechSoundType, 255); } bool KyraEngine_MR::snd_voiceIsPlaying() { @@ -802,7 +803,12 @@ void KyraEngine_MR::openTalkFile(int file) { } _currentTalkFile = file; - _res->loadPakFile(talkFilename); + if (!_res->loadPakFile(talkFilename)) { + if (speechEnabled()) { + warning("Couldn't load file '%s' falling back to text only mode", talkFilename); + _configVoice = 0; + } + } } #pragma mark - |