aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBenjamin Haisch2008-11-10 00:19:43 +0000
committerBenjamin Haisch2008-11-10 00:19:43 +0000
commit8709acb6def6fac43dd81ebfa226363ae37afdcc (patch)
tree76e72d09a50b3c4f9e299395e67ca5616840263c /engines
parent03a0046b1ca870568df31288cab634f12561a0cf (diff)
downloadscummvm-rg350-8709acb6def6fac43dd81ebfa226363ae37afdcc.tar.gz
scummvm-rg350-8709acb6def6fac43dd81ebfa226363ae37afdcc.tar.bz2
scummvm-rg350-8709acb6def6fac43dd81ebfa226363ae37afdcc.zip
- Global options dialog support
svn-id: r34981
Diffstat (limited to 'engines')
-rw-r--r--engines/made/made.cpp20
-rw-r--r--engines/made/made.h3
2 files changed, 11 insertions, 12 deletions
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index b907603c76..ae1b09b6e2 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -66,10 +66,6 @@ static const GameSettings madeSettings[] = {
MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
- // Setup mixer
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
-
const GameSettings *g;
const char *gameid = ConfMan.get("gameid").c_str();
@@ -110,12 +106,6 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
_music->setNativeMT32(native_mt32);
//_music->setAdlib(adlib);
- _musicVolume = ConfMan.getInt("music_volume");
-
- if (!_musicVolume) {
- debug(1, "Music disabled.");
- }
-
// Set default sound frequency
// Return to Zork sets it itself via a script funtion
if (getGameID() == GID_MANHOLE || getGameID() == GID_RODNEY) {
@@ -124,6 +114,8 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
_soundRate = 8000;
}
+ syncSoundSettings();
+
}
MadeEngine::~MadeEngine() {
@@ -146,6 +138,14 @@ Common::Error MadeEngine::init() {
return Common::kNoError;
}
+void MadeEngine::syncSoundSettings() {
+ _music->setVolume(ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+}
+
int16 MadeEngine::getTicks() {
return g_system->getMillis() * 30 / 1000;
}
diff --git a/engines/made/made.h b/engines/made/made.h
index e874193c3e..786ba0eed7 100644
--- a/engines/made/made.h
+++ b/engines/made/made.h
@@ -87,6 +87,7 @@ public:
virtual ~MadeEngine();
virtual bool hasFeature(EngineFeature f) const;
+ virtual void syncSoundSettings();
int getGameId() {
return _gameId;
@@ -115,8 +116,6 @@ public:
int _soundRate;
bool _autoStopSound;
- int _musicVolume;
-
// 2 = LGOP2, Manhole N&E
// 3 = Return to Zork
int _engineVersion;