aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/queen/queen.cpp17
-rw-r--r--engines/queen/sound.cpp3
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) {