DRAGONS: Update engine volumes after returning from options menu #11585
This commit is contained in:
parent
70a191ae0a
commit
76ca773ff1
4 changed files with 15 additions and 0 deletions
|
@ -1797,6 +1797,11 @@ void DragonsEngine::clearAllText() {
|
||||||
_fontManager->clearText();
|
_fontManager->clearText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DragonsEngine::syncSoundSettings() {
|
||||||
|
Engine::syncSoundSettings();
|
||||||
|
_sound->syncSoundSettings();
|
||||||
|
}
|
||||||
|
|
||||||
void (*DragonsEngine::getSceneUpdateFunction())() {
|
void (*DragonsEngine::getSceneUpdateFunction())() {
|
||||||
return _sceneUpdateFunction;
|
return _sceneUpdateFunction;
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,6 +245,7 @@ public:
|
||||||
bool canLoadGameStateCurrently() override;
|
bool canLoadGameStateCurrently() override;
|
||||||
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave) override;
|
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave) override;
|
||||||
bool canSaveGameStateCurrently() override;
|
bool canSaveGameStateCurrently() override;
|
||||||
|
void syncSoundSettings() override;
|
||||||
|
|
||||||
void updateActorSequences();
|
void updateActorSequences();
|
||||||
void setFlags(uint32 flags);
|
void setFlags(uint32 flags);
|
||||||
|
|
|
@ -538,4 +538,12 @@ void SoundManager::playMusic(int16 song) {
|
||||||
delete seq;
|
delete seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SoundManager::syncSoundSettings() {
|
||||||
|
_musicVolume = CLIP<int>(ConfMan.getInt("music_volume"), 0, 255);
|
||||||
|
_sfxVolume = CLIP<int>(ConfMan.getInt("sfx_volume"), 0, 255);
|
||||||
|
_speechVolume = CLIP<int>(ConfMan.getInt("speech_volume"), 0, 255);
|
||||||
|
|
||||||
|
_midiPlayer->setVolume(_musicVolume);
|
||||||
|
}
|
||||||
|
|
||||||
} // End of namespace Dragons
|
} // End of namespace Dragons
|
||||||
|
|
|
@ -59,6 +59,7 @@ public:
|
||||||
void playSpeech(uint32 textIndex);
|
void playSpeech(uint32 textIndex);
|
||||||
bool isSpeechPlaying();
|
bool isSpeechPlaying();
|
||||||
void resumeMusic();
|
void resumeMusic();
|
||||||
|
void syncSoundSettings();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
uint16 _dat_8006bb60_sound_related;
|
uint16 _dat_8006bb60_sound_related;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue