aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/sound_lol.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-06-21 19:00:50 +0000
committerJohannes Schickel2009-06-21 19:00:50 +0000
commit76eee406d63b7f614bd3f6e8e5e3f70aff97c921 (patch)
tree62e0d722da395b1bfb048f454f830286da4fb369 /engines/kyra/sound_lol.cpp
parent5b0b0051c15ff23ed8daf801d4b56cbaadf2f101 (diff)
downloadscummvm-rg350-76eee406d63b7f614bd3f6e8e5e3f70aff97c921.tar.gz
scummvm-rg350-76eee406d63b7f614bd3f6e8e5e3f70aff97c921.tar.bz2
scummvm-rg350-76eee406d63b7f614bd3f6e8e5e3f70aff97c921.zip
Cleanup: Change LoL code to use KYRA volume handling.
svn-id: r41730
Diffstat (limited to 'engines/kyra/sound_lol.cpp')
-rw-r--r--engines/kyra/sound_lol.cpp11
1 files changed, 10 insertions, 1 deletions
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