diff options
-rw-r--r-- | engines/sword2/sword2.cpp | 8 | ||||
-rw-r--r-- | engines/sword2/sword2.h | 10 |
2 files changed, 13 insertions, 5 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index f1f880c11e..83235e1bde 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -307,7 +307,9 @@ void Sword2Engine::registerDefaultSettings() { ConfMan.registerDefault("reverse_stereo", false); } -void Sword2Engine::readSettings() { +void Sword2Engine::syncSoundSettings() { + // Sound settings. At the time of writing, not all of these can be set + // by the global options dialog, but it seems silly to split them up. _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); @@ -316,6 +318,10 @@ void Sword2Engine::readSettings() { _sound->muteSpeech(ConfMan.getBool("speech_mute")); _sound->muteFx(ConfMan.getBool("sfx_mute")); _sound->setReverseStereo(ConfMan.getBool("reverse_stereo")); +} + +void Sword2Engine::readSettings() { + syncSoundSettings(); _mouse->setObjectLabels(ConfMan.getBool("object_labels")); _screen->setRenderLevel(ConfMan.getInt("gfx_details")); } diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h index 172dcea35c..cb2a8d5b80 100644 --- a/engines/sword2/sword2.h +++ b/engines/sword2/sword2.h @@ -122,17 +122,19 @@ private: StartUp _startList[MAX_starts]; -public: - Sword2Engine(OSystem *syst); - ~Sword2Engine(); - +protected: // Engine APIs virtual Common::Error init(); virtual Common::Error go(); virtual GUI::Debugger *getDebugger(); virtual bool hasFeature(EngineFeature f) const; + virtual void syncSoundSettings(); virtual void pauseEngineIntern(bool pause); +public: + Sword2Engine(OSystem *syst); + ~Sword2Engine(); + int getFramesPerSecond(); void registerDefaultSettings(); |