[Scummvm-cvs-logs] SF.net SVN: scummvm: [22233] scummvm/trunk/engines/scumm
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Apr 29 16:10:03 CEST 2006
Revision: 22233
Author: fingolfin
Date: 2006-04-29 16:09:40 -0700 (Sat, 29 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22233&view=rev
Log Message:
-----------
Renamed updateVolumes to updateSoundSettings -- now it also handles subtitles/speech_mute settings. Also changed the ConfigDialog accordingly
Modified Paths:
--------------
scummvm/trunk/engines/scumm/dialogs.cpp
scummvm/trunk/engines/scumm/input.cpp
scummvm/trunk/engines/scumm/saveload.cpp
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/scumm/scumm.h
Modified: scummvm/trunk/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.cpp 2006-04-29 23:09:20 UTC (rev 22232)
+++ scummvm/trunk/engines/scumm/dialogs.cpp 2006-04-29 23:09:40 UTC (rev 22233)
@@ -733,18 +733,7 @@
if (getResult()) {
// Subtitles
ConfMan.setBool("subtitles", _subtitlesCheckbox->getState(), _domain);
-
- // Sync with current setting
- if (!_speechCheckbox->getState()) {
- ConfMan.setBool("speech_mute", true, _domain);
- _vm->_voiceMode = 2;
- } else {
- ConfMan.setBool("speech_mute", false, _domain);
- _vm->_voiceMode = _subtitlesCheckbox->getState();
- }
-
- if (_vm->_game.version >= 7)
- _vm->VAR(_vm->VAR_VOICE_MODE) = _vm->_voiceMode;
+ ConfMan.setBool("speech_mute", !_speechCheckbox->getState(), _domain);
}
GUI_OptionsDialog::close();
Modified: scummvm/trunk/engines/scumm/input.cpp
===================================================================
--- scummvm/trunk/engines/scumm/input.cpp 2006-04-29 23:09:20 UTC (rev 22232)
+++ scummvm/trunk/engines/scumm/input.cpp 2006-04-29 23:09:40 UTC (rev 22233)
@@ -435,7 +435,7 @@
vol = Audio::Mixer::kMaxMixerVolume;
ConfMan.setInt("music_volume", vol);
- updateVolumes();
+ updateSoundSettings();
} else if (_lastKeyHit == '-' || _lastKeyHit == '+') { // Change text speed
if (_lastKeyHit == '+' && _defaultTalkDelay > 0)
_defaultTalkDelay--;
Modified: scummvm/trunk/engines/scumm/saveload.cpp
===================================================================
--- scummvm/trunk/engines/scumm/saveload.cpp 2006-04-29 23:09:20 UTC (rev 22232)
+++ scummvm/trunk/engines/scumm/saveload.cpp 2006-04-29 23:09:40 UTC (rev 22233)
@@ -270,7 +270,7 @@
delete in;
// Update volume settings
- updateVolumes();
+ updateSoundSettings();
// Init NES costume data
if (_game.platform == Common::kPlatformNES) {
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2006-04-29 23:09:20 UTC (rev 22232)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2006-04-29 23:09:40 UTC (rev 22233)
@@ -1471,10 +1471,10 @@
}
}
- updateVolumes();
+ updateSoundSettings();
}
-void ScummEngine::updateVolumes() {
+void ScummEngine::updateSoundSettings() {
// Sync the engine with the config manager
int soundVolumeMusic = ConfMan.getInt("music_volume");
@@ -1488,6 +1488,15 @@
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolumeSfx);
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, soundVolumeSpeech);
+
+
+ if (ConfMan.getBool("speech_mute"))
+ _voiceMode = 2;
+ else
+ _voiceMode = ConfMan.getBool("subtitles");
+
+ if (VAR_VOICE_MODE != 0xFF)
+ VAR(VAR_VOICE_MODE) = _voiceMode;
}
@@ -2059,7 +2068,7 @@
if (!_mainMenuDialog)
_mainMenuDialog = new MainMenuDialog(this);
runDialog(*_mainMenuDialog);
- updateVolumes();
+ updateSoundSettings();
}
void ScummEngine::confirmExitDialog() {
Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h 2006-04-29 23:09:20 UTC (rev 22232)
+++ scummvm/trunk/engines/scumm/scumm.h 2006-04-29 23:09:40 UTC (rev 22233)
@@ -469,7 +469,7 @@
virtual void loadLanguageBundle() {}
void loadCJKFont();
void setupMusic(int midi);
- void updateVolumes();
+ void updateSoundSettings();
protected:
// Scumm main loop & helper functions.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list