diff options
author | Johannes Schickel | 2011-10-29 00:43:52 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-10-29 01:00:18 +0200 |
commit | 951cb8ea71a6fc62fd9a247cbf407559e9935ec8 (patch) | |
tree | 78f0272c93f1a2c27449435851ffe92468013db2 /engines/kyra | |
parent | 17883b913715f90c21f6831c1c0314bd46e2b55b (diff) | |
download | scummvm-rg350-951cb8ea71a6fc62fd9a247cbf407559e9935ec8.tar.gz scummvm-rg350-951cb8ea71a6fc62fd9a247cbf407559e9935ec8.tar.bz2 scummvm-rg350-951cb8ea71a6fc62fd9a247cbf407559e9935ec8.zip |
KYRA: Get rid of Sound's voiceFileIsPresent in favor of isVoicePresent.
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/kyra_hof.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/sequences_lol.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/sound.cpp | 11 | ||||
-rw-r--r-- | 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 * |