aboutsummaryrefslogtreecommitdiff
path: root/engines/saga/interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/saga/interface.cpp')
-rw-r--r--engines/saga/interface.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 2112f5ee98..abf8094533 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -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;