mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-08 03:47:32 +00:00
LOL: - minor sfx bug fix
svn-id: r39836
This commit is contained in:
parent
b82707463a
commit
31118416ab
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user