diff options
author | Paul Gilbert | 2017-09-04 19:11:01 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-09-04 19:11:01 -0400 |
commit | 128edeebda490794d0ce78d3d6d84beab29c2246 (patch) | |
tree | c7179a0cd3cb17ffff2aa87b8880ebf337df6555 /engines/titanic/pet_control/pet_sound.cpp | |
parent | 110b4f09916d366574e5eb62114e68b68510a7a4 (diff) | |
download | scummvm-rg350-128edeebda490794d0ce78d3d6d84beab29c2246.tar.gz scummvm-rg350-128edeebda490794d0ce78d3d6d84beab29c2246.tar.bz2 scummvm-rg350-128edeebda490794d0ce78d3d6d84beab29c2246.zip |
TITANIC: Implement setup code for sound slider positions
Diffstat (limited to 'engines/titanic/pet_control/pet_sound.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_sound.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/titanic/pet_control/pet_sound.cpp b/engines/titanic/pet_control/pet_sound.cpp index a22b743782..e4fac34ee8 100644 --- a/engines/titanic/pet_control/pet_sound.cpp +++ b/engines/titanic/pet_control/pet_sound.cpp @@ -109,6 +109,24 @@ bool CPetSound::reset() { return false; } +void CPetSound::setSliders() { + CPetControl *pet = getPetControl(); + CGameManager *gameMan = pet ? pet->getGameManager() : nullptr; + + if (gameMan) { + CSoundManager &soundMan = gameMan->_sound._soundManager; + uint masterVol = soundMan.getModeVolume(VOL_NORMAL); + uint musicVol = soundMan.getMusicVolume(); + uint parrotVol = soundMan.getParrotVolume(); + uint speechVol = soundMan.getSpeechVolume(); + + _masterVolume.setSliderOffset(masterVol * 0.01); + _musicVolume.setSliderOffset(musicVol * 0.01); + _parrotVolume.setSliderOffset(parrotVol * 0.01); + _speechVolume.setSliderOffset(speechVol * 0.01); + } +} + void CPetSound::draw2(CScreenManager *screenManager) { _element.draw(screenManager); |