diff options
author | dhewg | 2011-03-19 15:04:58 +0100 |
---|---|---|
committer | dhewg | 2011-03-19 16:04:55 +0100 |
commit | b5af156839c3fc7704e3f49879b8e8dec8e5ece1 (patch) | |
tree | 29401214b63f275268828c9fe4064e59b266672e /engines | |
parent | 5b6479c55aca2103f7442e9b07ebfd5ae83eb40c (diff) | |
download | scummvm-rg350-b5af156839c3fc7704e3f49879b8e8dec8e5ece1.tar.gz scummvm-rg350-b5af156839c3fc7704e3f49879b8e8dec8e5ece1.tar.bz2 scummvm-rg350-b5af156839c3fc7704e3f49879b8e8dec8e5ece1.zip |
QUEEN: Init volume levels on startup
And cleanup syncSoundSettings()
Also, respect global mute settings
Diffstat (limited to 'engines')
-rw-r--r-- | engines/queen/queen.cpp | 17 | ||||
-rw-r--r-- | engines/queen/sound.cpp | 3 |
2 files changed, 13 insertions, 7 deletions
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index 74bb52f574..a3692195de 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -240,14 +240,20 @@ void QueenEngine::checkOptionSettings() { } void QueenEngine::syncSoundSettings() { + Engine::syncSoundSettings(); + readOptionSettings(); } void QueenEngine::readOptionSettings() { + bool mute = false; + if (ConfMan.hasKey("mute")) + mute = ConfMan.getBool("mute"); + _sound->setVolume(ConfMan.getInt("music_volume")); - _sound->musicToggle(!ConfMan.getBool("music_mute")); - _sound->sfxToggle(!ConfMan.getBool("sfx_mute")); - _sound->speechToggle(!ConfMan.getBool("speech_mute")); + _sound->musicToggle(!(mute || ConfMan.getBool("music_mute"))); + _sound->sfxToggle(!(mute || ConfMan.getBool("sfx_mute"))); + _sound->speechToggle(!(mute || !ConfMan.getBool("speech_mute"))); _talkSpeed = (ConfMan.getInt("talkspeed") * (MAX_TEXT_SPEED - MIN_TEXT_SPEED) + 255 / 2) / 255 + MIN_TEXT_SPEED; _subtitles = ConfMan.getBool("subtitles"); checkOptionSettings(); @@ -470,11 +476,14 @@ Common::Error QueenEngine::run() { } _sound = Sound::makeSoundInstance(_mixer, this, _resource->getCompression()); + _walk = new Walk(this); //_talkspeedScale = (MAX_TEXT_SPEED - MIN_TEXT_SPEED) / 255.0; registerDefaultSettings(); - readOptionSettings(); + + // Setup mixer + syncSoundSettings(); _logic->start(); if (ConfMan.hasKey("save_slot") && canLoadOrSave()) { diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp index 6eb7362338..6a9254da81 100644 --- a/engines/queen/sound.cpp +++ b/engines/queen/sound.cpp @@ -193,9 +193,6 @@ Sound *Sound::makeSoundInstance(Audio::Mixer *mixer, QueenEngine *vm, uint8 comp void Sound::setVolume(int vol) { _musicVolume = vol; - _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, _musicVolume); - _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); - _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); } void Sound::saveState(byte *&ptr) { |