From 76eee406d63b7f614bd3f6e8e5e3f70aff97c921 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 21 Jun 2009 19:00:50 +0000 Subject: Cleanup: Change LoL code to use KYRA volume handling. svn-id: r41730 --- engines/kyra/sound_lol.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'engines/kyra/sound_lol.cpp') diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp index f9bd7da206..c233e1af52 100644 --- a/engines/kyra/sound_lol.cpp +++ b/engines/kyra/sound_lol.cpp @@ -34,7 +34,7 @@ namespace Kyra { bool LoLEngine::snd_playCharacterSpeech(int id, int8 speaker, int) { - if (!_speechVolume) + if (!speechEnabled()) return false; if (speaker < 65) { @@ -304,6 +304,15 @@ int LoLEngine::snd_stopMusic() { return snd_playTrack(-1); } +int LoLEngine::convertValueToMixer(int value) { + value -= 2; + return (value * Audio::Mixer::kMaxMixerVolume) / 100; +} + +int LoLEngine::convertValueFromMixer(int value) { + return (value * 100) / Audio::Mixer::kMaxMixerVolume + 2; +} + } // end of namespace Kyra #endif // ENABLE_LOL -- cgit v1.2.3