[Scummvm-cvs-logs] scummvm master -> 8aa368fe559bd19aedbbc7353b784466a0381485

dreammaster dreammaster at scummvm.org
Tue Jun 21 13:44:32 CEST 2011


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8c6ad70158 TSAGE: Disable SFX and speech volume sliders for all games
8aa368fe55 TSAGE: Fix updating the volume when changed in the Options dialog


Commit: 8c6ad70158ecdf75dd4f9e405f6afcee6dfcb982
    https://github.com/scummvm/scummvm/commit/8c6ad70158ecdf75dd4f9e405f6afcee6dfcb982
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-06-21T04:30:57-07:00

Commit Message:
TSAGE: Disable SFX and speech volume sliders for all games

Changed paths:
    engines/tsage/detection_tables.h



diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h
index 2b64222..8b80edf 100644
--- a/engines/tsage/detection_tables.h
+++ b/engines/tsage/detection_tables.h
@@ -33,7 +33,7 @@ static const tSageGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformPC,
 			ADGF_UNSTABLE,
-			Common::GUIO_NONE
+			Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
 		},
 		GType_Ringworld,
 		GF_CD | GF_ALT_REGIONS
@@ -47,7 +47,7 @@ static const tSageGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformPC,
 			ADGF_UNSTABLE,
-			Common::GUIO_NONE
+			Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
 		},
 		GType_Ringworld,
 		GF_FLOPPY
@@ -61,7 +61,7 @@ static const tSageGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformPC,
 			ADGF_DEMO,
-			Common::GUIO_NONE
+			Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
 		},
 		GType_Ringworld,
 		GF_FLOPPY | GF_DEMO
@@ -76,7 +76,7 @@ static const tSageGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformPC,
 			ADGF_DEMO,
-			Common::GUIO_NONE
+			Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
 		},
 		GType_Ringworld,
 		GF_FLOPPY | GF_DEMO | GF_ALT_REGIONS
@@ -92,7 +92,7 @@ static const tSageGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformPC,
 			ADGF_UNSTABLE,
-			Common::GUIO_NONE
+			Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
 		},
 		GType_BlueForce,
 		GF_FLOPPY
@@ -107,7 +107,7 @@ static const tSageGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformPC,
 			ADGF_NO_FLAGS,
-			Common::GUIO_NONE
+			Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
 		},
 		GType_BlueForce,
 		GF_FLOPPY
@@ -121,7 +121,7 @@ static const tSageGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformPC,
 			ADGF_NO_FLAGS,
-			Common::GUIO_NONE
+			Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
 		},
 		GType_BlueForce,
 		GF_CD


Commit: 8aa368fe559bd19aedbbc7353b784466a0381485
    https://github.com/scummvm/scummvm/commit/8aa368fe559bd19aedbbc7353b784466a0381485
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-06-21T04:42:42-07:00

Commit Message:
TSAGE: Fix updating the volume when changed in the Options dialog

Changed paths:
    engines/tsage/ringworld_demo.cpp
    engines/tsage/ringworld_logic.cpp
    engines/tsage/sound.cpp
    engines/tsage/sound.h



diff --git a/engines/tsage/ringworld_demo.cpp b/engines/tsage/ringworld_demo.cpp
index fa75118..b24fec9 100644
--- a/engines/tsage/ringworld_demo.cpp
+++ b/engines/tsage/ringworld_demo.cpp
@@ -72,6 +72,7 @@ void RingworldDemoGame::processEvent(Event &event) {
 			ConfigDialog *dlg = new ConfigDialog();
 			dlg->runModal();
 			delete dlg;
+			_globals->_soundManager.syncSounds();
 			_globals->_events.setCursorFromFlag();
 			break;
 		}
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 2b5b84a..eece4ab 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -1441,6 +1441,7 @@ void RingworldGame::processEvent(Event &event) {
 			ConfigDialog *dlg = new ConfigDialog();
 			dlg->runModal();
 			delete dlg;
+			_globals->_soundManager.syncSounds();
 			_globals->_events.setCursorFromFlag();
 			break;
 		}
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 811e272..c2e5ba7 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -43,7 +43,7 @@ SoundManager::SoundManager() {
 		_voiceTypeStructPtrs[i] = NULL;
 
 	_groupsAvail = 0;
-	_masterVol = 127;
+	_newVolume = _masterVol = 127;
 	_suspendedCount = 0;
 	_driversDetected = false;
 	_needToRethink = false;
@@ -100,18 +100,14 @@ void SoundManager::syncSounds() {
 		mute = ConfMan.getBool("mute");
 
 	bool music_mute = mute;
-	bool sfx_mute = mute;
 
 	if (!mute) {
 		music_mute = ConfMan.getBool("music_mute");
-		sfx_mute = ConfMan.getBool("sfx_mute");
 	}
 
-	// Get the new music and sfx volumes
+	// Get the new music volume
 	int musicVolume = music_mute ? 0 : MIN(255, ConfMan.getInt("music_volume"));
-	int sfxVolume = sfx_mute ? 0 : MIN(255, ConfMan.getInt("sfx_volume"));
 
-	warning("Set volume music=%d sfx=%d", musicVolume, sfxVolume);
 	this->setMasterVol(musicVolume / 2);
 }
 
@@ -251,7 +247,7 @@ bool SoundManager::isInstalled(int driverNum) const {
 }
 
 void SoundManager::setMasterVol(int volume) {
-	_sfSetMasterVol(volume);
+	_newVolume = volume;
 }
 
 int SoundManager::getMasterVol() const {
@@ -341,6 +337,10 @@ void SoundManager::_sfSoundServer() {
 		_sfDereferenceAll();
 	}
 
+	// If the master volume has changed, update it
+	if (sfManager()._newVolume != sfManager()._masterVol)
+		_sfSetMasterVol(sfManager()._newVolume);
+
 	// Handle any fading if necessary
 	_sfProcessFading();
 
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index be39241..0da54fc 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -171,6 +171,7 @@ public:
 	VoiceTypeStruct *_voiceTypeStructPtrs[SOUND_ARR_SIZE];
 	uint32 _groupsAvail;
 	int _masterVol;
+	int _newVolume;
 	Common::Mutex _serverDisabledMutex;
 	Common::Mutex _serverSuspendedMutex;
 	int _suspendedCount;






More information about the Scummvm-git-logs mailing list