aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorFlorian Kagerer2009-04-04 12:56:49 +0000
committerFlorian Kagerer2009-04-04 12:56:49 +0000
commit31118416ab2bcd10513fcec1da73d14cd8d4a688 (patch)
tree3855465ea20273cb7932238e01c93d8b00182c0d /engines/kyra
parentb82707463accf9f7e988ceb19ab01cd6645686f4 (diff)
downloadscummvm-rg350-31118416ab2bcd10513fcec1da73d14cd8d4a688.tar.gz
scummvm-rg350-31118416ab2bcd10513fcec1da73d14cd8d4a688.tar.bz2
scummvm-rg350-31118416ab2bcd10513fcec1da73d14cd8d4a688.zip
LOL: - minor sfx bug fix
svn-id: r39836
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/lol.cpp12
-rw-r--r--engines/kyra/script_lol.cpp2
2 files changed, 10 insertions, 4 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index efa17305e7..18d24569f6 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -1548,15 +1548,21 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {
if (volIndex > 0)
volume = (volIndex * volume) >> 8;
- else
+ else if (volIndex < 0)
volume = -volIndex;
// volume TODO
volume = 254 - volume;
int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
- if (vocIndex != -1
-) {
+
+ bool hasVocFile = false;
+ if (vocIndex != -1) {
+ if (scumm_stricmp(_ingameSoundList[vocIndex], "EMPTY"))
+ hasVocFile = true;
+ }
+
+ if (hasVocFile) {
_sound->voicePlay(_ingameSoundList[vocIndex], volume & 0xff, true);
} else if (_flags.platform == Common::kPlatformPC) {
if (_sound->getSfxType() == Sound::kMidiMT32)
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index 582e99d4b0..94ccef3909 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -1023,7 +1023,7 @@ int LoLEngine::olol_loadLangFile(EMCState *script) {
int LoLEngine::olol_playSoundEffect(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_playSoundEffect(%p) (%d)", (const void *)script, stackPos(0));
- snd_playSoundEffect(stackPos(0), 255);
+ snd_playSoundEffect(stackPos(0), -1);
return 1;
}