[Scummvm-cvs-logs] scummvm master -> 5ecfc1e48f6990d084ec5cbda993e96f49c74744

dreammaster dreammaster at scummvm.org
Sat Oct 19 22:03:27 CEST 2013


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

Summary:
5ecfc1e48f TSAGE: Fixes for allowing selecting speech in the ScummVM options dialog


Commit: 5ecfc1e48f6990d084ec5cbda993e96f49c74744
    https://github.com/scummvm/scummvm/commit/5ecfc1e48f6990d084ec5cbda993e96f49c74744
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2013-10-19T13:02:51-07:00

Commit Message:
TSAGE: Fixes for allowing selecting speech in the ScummVM options dialog

Changed paths:
    engines/tsage/detection.cpp
    engines/tsage/globals.cpp
    engines/tsage/sound.cpp



diff --git a/engines/tsage/detection.cpp b/engines/tsage/detection.cpp
index a35d663..5eae755 100644
--- a/engines/tsage/detection.cpp
+++ b/engines/tsage/detection.cpp
@@ -75,7 +75,6 @@ class TSageMetaEngine : public AdvancedMetaEngine {
 public:
 	TSageMetaEngine() : AdvancedMetaEngine(TsAGE::gameDescriptions, sizeof(TsAGE::tSageGameDescription), tSageGameTitles) {
 		_singleid = "tsage";
-		_guioptions = GUIO1(GUIO_NOSPEECH);
 	}
 
 	virtual const char *getName() const {
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index ece6ae3..b7724f0 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -369,6 +369,7 @@ namespace Ringworld2 {
 
 Ringworld2Globals::Ringworld2Globals() {
 	_scannerDialog = new ScannerDialog();
+	_speechSubtitles = SPEECH_TEXT;
 }
 
 Ringworld2Globals::~Ringworld2Globals() {
@@ -480,7 +481,6 @@ void Ringworld2Globals::reset() {
 	_s1550PlayerArea[R2_QUINN] = Common::Point(27, 4);
 	_s1550PlayerArea[R2_SEEKER] = Common::Point(27, 4);
 	Common::fill(&_scannerFrequencies[0], &_scannerFrequencies[MAX_CHARACTERS], 1);
-	_speechSubtitles = SPEECH_VOICE | SPEECH_TEXT;
 	_insetUp = 0;
 	_frameEdgeColor = 2;
 	Common::fill(&_stripManager_lookupList[0], &_stripManager_lookupList[12], 0);
@@ -539,10 +539,7 @@ void Ringworld2Globals::synchronize(Serializer &s) {
 	s.syncAsSint16LE(_v5780E);
 	s.syncAsSint16LE(_v57810);
 	s.syncAsSint16LE(_v57C2C);
-	s.syncAsSint16LE(_speechSubtitles);
 
-	byte temp = 0;
-	s.syncAsByte(temp);
 	s.syncAsByte(_s1550PlayerArea[R2_QUINN].x);
 	s.syncAsByte(_s1550PlayerArea[R2_SEEKER].x);
 	s.syncAsByte(_s1550PlayerArea[R2_QUINN].y);
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 90ce66c..80e6b69 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -120,17 +120,31 @@ void SoundManager::syncSounds() {
 	bool mute = false;
 	if (ConfMan.hasKey("mute"))
 		mute = ConfMan.getBool("mute");
+	bool subtitles = ConfMan.hasKey("subtitles") ? ConfMan.getBool("subtitles") : true;
 
 	bool music_mute = mute;
+	bool voice_mute = mute;
 
 	if (!mute) {
 		music_mute = ConfMan.getBool("music_mute");
+		voice_mute = ConfMan.getBool("speech_mute");
 	}
 
 	// Get the new music volume
 	int musicVolume = music_mute ? 0 : MIN(255, ConfMan.getInt("music_volume"));
 
 	this->setMasterVol(musicVolume / 2);
+
+	// Return to Ringworld voice settings
+	if (g_vm->getGameID() == GType_Ringworld2) {
+		// If we don't have voice, then ensure that text is turned on
+		if (voice_mute)
+			subtitles = true;
+
+		R2_GLOBALS._speechSubtitles = 
+			(voice_mute ? 0 : SPEECH_VOICE) | 
+			(!subtitles ? 0 : SPEECH_TEXT);
+	}
 }
 
 void SoundManager::update() {






More information about the Scummvm-git-logs mailing list