From 951cb8ea71a6fc62fd9a247cbf407559e9935ec8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 29 Oct 2011 00:43:52 +0200 Subject: KYRA: Get rid of Sound's voiceFileIsPresent in favor of isVoicePresent. --- engines/kyra/kyra_hof.cpp | 2 +- engines/kyra/sequences_lol.cpp | 2 +- engines/kyra/sound.cpp | 11 ----------- engines/kyra/sound.h | 2 -- 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 4497ab8019..8a3229ea1f 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -1473,7 +1473,7 @@ void KyraEngine_HoF::snd_playVoiceFile(int id) { char vocFile[9]; assert(id >= 0 && id <= 9999999); sprintf(vocFile, "%07d", id); - if (_sound->voiceFileIsPresent(vocFile)) { + if (_sound->isVoicePresent(vocFile)) { snd_stopVoice(); while (!_sound->voicePlay(vocFile, &_speechHandle)) { diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp index 83d525d400..01db92c225 100644 --- a/engines/kyra/sequences_lol.cpp +++ b/engines/kyra/sequences_lol.cpp @@ -788,7 +788,7 @@ void HistoryPlayer::play() { for (; voiceFilename[3] <= '9' && !_vm->shouldQuit() && !_vm->skipFlag(); ++voiceFilename[3], voiceFilename[4] = 'a') { while (!_vm->shouldQuit() && !_vm->skipFlag()) { - if (!sound->voiceFileIsPresent(voiceFilename)) + if (!sound->isVoicePresent(voiceFilename)) break; if (data[part * 15] == voiceFilename[3] && data[part * 15 + 1] == voiceFilename[4]) { diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index e58e0c6359..e8d010480a 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -59,17 +59,6 @@ bool Sound::isPlaying() const { return false; } -bool Sound::voiceFileIsPresent(const char *file) const { - for (int i = 0; _supportedCodecs[i].fileext; ++i) { - Common::String f = file; - f += _supportedCodecs[i].fileext; - if (_vm->resource()->getFileSize(f.c_str()) > 0) - return true; - } - - return false; -} - bool Sound::isVoicePresent(const char *file) const { char filenamebuffer[25]; diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index fb1f58d154..40b34dbf42 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -163,8 +163,6 @@ public: void enableSFX(bool enable) { _sfxEnabled = enable; } bool sfxEnabled() const { return _sfxEnabled; } - virtual bool voiceFileIsPresent(const char *file) const; - /** * Checks whether a voice file with the given name is present * -- cgit v1.2.3