diff options
author | athrxx | 2019-02-19 18:30:53 +0100 |
---|---|---|
committer | athrxx | 2019-03-06 20:48:23 +0100 |
commit | 30ed036f6e42d9f4caa9d0eafe343e72cc318c66 (patch) | |
tree | b7a2c5a2f9e4ba9e94b83ad85b4dd048b634968d /engines/kyra/engine | |
parent | e907965d81456c1612777499d52b253cbd7c059d (diff) | |
download | scummvm-rg350-30ed036f6e42d9f4caa9d0eafe343e72cc318c66.tar.gz scummvm-rg350-30ed036f6e42d9f4caa9d0eafe343e72cc318c66.tar.bz2 scummvm-rg350-30ed036f6e42d9f4caa9d0eafe343e72cc318c66.zip |
KYRA: (EOB1/Amiga) - fix environmental sfx
Diffstat (limited to 'engines/kyra/engine')
-rw-r--r-- | engines/kyra/engine/kyra_rpg.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/kyra/engine/kyra_rpg.cpp b/engines/kyra/engine/kyra_rpg.cpp index 46fef3fcff..616402445d 100644 --- a/engines/kyra/engine/kyra_rpg.cpp +++ b/engines/kyra/engine/kyra_rpg.cpp @@ -204,7 +204,7 @@ Common::Error KyraRpgEngine::init() { initStaticResource(); - _envSfxDistThreshold = (_flags.gameID == GI_EOB2 || _sound->getSfxType() == Sound::kAdLib || _sound->getSfxType() == Sound::kPCSpkr) ? 15 : 3; + _envSfxDistThreshold = ((_flags.gameID == GI_EOB2 && _sound->getSfxType() == Sound::kTowns) || _sound->getSfxType() == Sound::kAdLib || _sound->getSfxType() == Sound::kPCSpkr) ? 15 : (_sound->getSfxType() == Sound::kAmiga ? 4 : 3); _dialogueButtonLabelColor1 = guiSettings()->buttons.labelColor1; _dialogueButtonLabelColor2 = guiSettings()->buttons.labelColor2; @@ -367,7 +367,13 @@ bool KyraRpgEngine::snd_processEnvironmentalSoundEffect(int soundId, int block) } _environmentSfx = soundId; - _environmentSfxVol = (_flags.gameID == GI_EOB2 && _flags.platform == Common::kPlatformFMTowns) ? (dist ? (16 - dist) * 8 - 1 : 127) : ((15 - ((block || (_flags.gameID == GI_LOL && dist < 2)) ? dist : 0)) << 4); + + if (_flags.gameID == GI_EOB2 && _flags.platform == Common::kPlatformFMTowns) + _environmentSfxVol = dist ? (16 - dist) * 8 - 1 : 127; + else if (_flags.platform == Common::kPlatformAmiga) + _environmentSfxVol = dist ? (soundId != 13 ? dist : (dist >= 4) ? 4 : dist) : 1; + else + _environmentSfxVol = (15 - ((block || (_flags.gameID == GI_LOL && dist < 2)) ? dist : 0)) << 4; return true; } |