Hopefully fixed the chaos with the SAGA volume values. This also fixes the broken volume introduced with the introduction of the RTL code in the engine

svn-id: r34349
This commit is contained in:
Filippos Karapetis 2008-09-05 13:02:03 +00:00
parent 531ff7b33c
commit 6d4900ad06
4 changed files with 19 additions and 16 deletions

View file

@ -1646,13 +1646,15 @@ void Interface::setOption(PanelButton *panelButton) {
}
break;
case kTextMusic:
_vm->_musicVolume = (_vm->_musicVolume + 1) % 11;
_vm->_music->setVolume(_vm->_musicVolume == 10 ? -1 : _vm->_musicVolume * 25, 1);
ConfMan.setInt("music_volume", _vm->_musicVolume * 25);
_vm->_musicVolume = _vm->_musicVolume + 25;
if (_vm->_musicVolume > 255) _vm->_musicVolume = 0;
_vm->_music->setVolume(_vm->_musicVolume, 1);
ConfMan.setInt("music_volume", _vm->_musicVolume);
break;
case kTextSound:
_vm->_soundVolume = (_vm->_soundVolume + 1) % 11;
ConfMan.setInt("sfx_volume", _vm->_soundVolume * 25);
_vm->_soundVolume = _vm->_soundVolume + 25;
if (_vm->_soundVolume > 255) _vm->_soundVolume = 0;
ConfMan.setInt("sound_volume", _vm->_soundVolume);
_vm->_sound->setVolume();
break;
case kTextVoices:
@ -1672,8 +1674,9 @@ void Interface::setOption(PanelButton *panelButton) {
_vm->_voicesEnabled = false;
}
_vm->_speechVolume = (_vm->_speechVolume + 1) % 11;
ConfMan.setInt("speech_volume", _vm->_speechVolume * 25);
_vm->_speechVolume = _vm->_speechVolume + 25;
if (_vm->_speechVolume > 255) _vm->_speechVolume = 0;
ConfMan.setInt("speech_volume", _vm->_speechVolume);
_vm->_sound->setVolume();
ConfMan.setBool("subtitles", _vm->_subtitlesEnabled);
@ -2275,13 +2278,13 @@ void Interface::drawPanelButtonText(Surface *ds, InterfacePanel *panel, PanelBut
break;
case kTextMusic:
if (_vm->_musicVolume)
textId = kText10Percent + _vm->_musicVolume - 1;
textId = kText10Percent + _vm->_musicVolume / 25 - 1;
else
textId = kTextOff;
break;
case kTextSound:
if (_vm->_soundVolume)
textId = kText10Percent + _vm->_soundVolume - 1;
textId = kText10Percent + _vm->_soundVolume / 25 - 1;
else
textId = kTextOff;
break;