LOL: - minor sfx bug fix

svn-id: r39836
This commit is contained in:
Florian Kagerer 2009-04-04 12:56:49 +00:00
parent b82707463a
commit 31118416ab
2 changed files with 10 additions and 4 deletions

View File

@ -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)

View File

@ -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;
}