diff options
author | Johannes Schickel | 2009-06-07 19:58:00 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-06-07 19:58:00 +0000 |
commit | c7861cb65e7bcddc8bb7e51a7df30f6419dcc105 (patch) | |
tree | 89439d6cca85062188d3f89acdde955fadd5b1db | |
parent | a6ed05740f1f46639f38ccf0afb9c444564cc84f (diff) | |
download | scummvm-rg350-c7861cb65e7bcddc8bb7e51a7df30f6419dcc105.tar.gz scummvm-rg350-c7861cb65e7bcddc8bb7e51a7df30f6419dcc105.tar.bz2 scummvm-rg350-c7861cb65e7bcddc8bb7e51a7df30f6419dcc105.zip |
Avoid warning about missing SFX file in Lands of Lore (it seems the original misses some datafiles for certain effects).
svn-id: r41350
-rw-r--r-- | engines/kyra/script_lol.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/sound_lol.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp index 56cfb9110f..6eb6ca96b6 100644 --- a/engines/kyra/script_lol.cpp +++ b/engines/kyra/script_lol.cpp @@ -1417,7 +1417,7 @@ int LoLEngine::olol_playEndSequence(EMCState *script){ _screen->hideMouse(); memset(_screen->getPalette(1), 0, 768); - showOutro(c, _monsterDifficulty == 2 ? true : false); + showOutro(c, (_monsterDifficulty == 2)); quitGame(); return 0; diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp index 8e2c2b3e45..3f87036849 100644 --- a/engines/kyra/sound_lol.cpp +++ b/engines/kyra/sound_lol.cpp @@ -186,12 +186,13 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) { } if (hasVocFile) { - _sound->voicePlay(_ingameSoundList[vocIndex], 0, volume & 0xff, true); + if (_sound->isVoicePresent(_ingameSoundList[vocIndex])) + _sound->voicePlay(_ingameSoundList[vocIndex], 0, volume & 0xff, true); } else if (_flags.platform == Common::kPlatformPC) { if (_sound->getSfxType() == Sound::kMidiMT32) - track = track < _ingameMT32SoundIndexSize ? _ingameMT32SoundIndex[track] - 1 : -1; + track = (track < _ingameMT32SoundIndexSize) ? (_ingameMT32SoundIndex[track] - 1) : -1; else if (_sound->getSfxType() == Sound::kMidiGM) - track = track < _ingameGMSoundIndexSize ? _ingameGMSoundIndex[track] - 1: -1; + track = (track < _ingameGMSoundIndexSize) ? (_ingameGMSoundIndex[track] - 1) : -1; if (track == 168) track = 167; |