[Scummvm-cvs-logs] SF.net SVN: scummvm:[34981] scummvm/trunk/engines/made

john_doe at users.sourceforge.net john_doe at users.sourceforge.net
Mon Nov 10 01:19:44 CET 2008


Revision: 34981
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34981&view=rev
Author:   john_doe
Date:     2008-11-10 00:19:43 +0000 (Mon, 10 Nov 2008)

Log Message:
-----------
- Global options dialog support

Modified Paths:
--------------
    scummvm/trunk/engines/made/made.cpp
    scummvm/trunk/engines/made/made.h

Modified: scummvm/trunk/engines/made/made.cpp
===================================================================
--- scummvm/trunk/engines/made/made.cpp	2008-11-09 21:39:41 UTC (rev 34980)
+++ scummvm/trunk/engines/made/made.cpp	2008-11-10 00:19:43 UTC (rev 34981)
@@ -66,10 +66,6 @@
 
 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 @@
 	_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 @@
 		_soundRate = 8000;
 	}
 
+	syncSoundSettings();
+
 }
 
 MadeEngine::~MadeEngine() {
@@ -146,6 +138,14 @@
 	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;
 }

Modified: scummvm/trunk/engines/made/made.h
===================================================================
--- scummvm/trunk/engines/made/made.h	2008-11-09 21:39:41 UTC (rev 34980)
+++ scummvm/trunk/engines/made/made.h	2008-11-10 00:19:43 UTC (rev 34981)
@@ -87,6 +87,7 @@
 	virtual ~MadeEngine();
 
 	virtual bool hasFeature(EngineFeature f) const;
+	virtual void syncSoundSettings();
 
 	int getGameId() {
 		return _gameId;
@@ -115,8 +116,6 @@
 	int _soundRate;
 	bool _autoStopSound;
 
-	int _musicVolume;
-	
 	// 2 = LGOP2, Manhole N&E
 	// 3 = Return to Zork
 	int _engineVersion;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list