[Scummvm-cvs-logs] SF.net SVN: scummvm:[36238] scummvm/branches/branch-0-13-0/engines

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sat Feb 7 07:47:56 CET 2009


Revision: 36238
          http://scummvm.svn.sourceforge.net/scummvm/?rev=36238&view=rev
Author:   Kirben
Date:     2009-02-07 06:47:56 +0000 (Sat, 07 Feb 2009)

Log Message:
-----------
Make the subtitle settings in Options section of the global main menu optional, and enable only for game engines where subtitles settings are synced.

Modified Paths:
--------------
    scummvm/branches/branch-0-13-0/engines/dialogs.cpp
    scummvm/branches/branch-0-13-0/engines/dialogs.h
    scummvm/branches/branch-0-13-0/engines/engine.h
    scummvm/branches/branch-0-13-0/engines/queen/queen.cpp
    scummvm/branches/branch-0-13-0/engines/scumm/detection.cpp
    scummvm/branches/branch-0-13-0/engines/sword2/sword2.cpp
    scummvm/branches/branch-0-13-0/engines/touche/detection.cpp

Modified: scummvm/branches/branch-0-13-0/engines/dialogs.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/engines/dialogs.cpp	2009-02-07 06:47:19 UTC (rev 36237)
+++ scummvm/branches/branch-0-13-0/engines/dialogs.cpp	2009-02-07 06:47:56 UTC (rev 36238)
@@ -109,7 +109,7 @@
 	new GUI::ButtonWidget(this, "GlobalMenu.Quit", "Quit", kQuitCmd, 'Q');
 
 	_aboutDialog = new GUI::AboutDialog();
-	_optionsDialog = new ConfigDialog();
+	_optionsDialog = new ConfigDialog(_engine->hasFeature(Engine::kSupportsSubtitleOptions));
 	_loadDialog = new GUI::SaveLoadChooser("Load game:", "Load");
 	_loadDialog->setSaveMode(false);
 	_saveDialog = new GUI::SaveLoadChooser("Save game:", "Save");
@@ -269,7 +269,7 @@
 // These changes will achieve two things at once: Allow us to get rid of using
 //  "" as value for the domain, and in fact provide a somewhat better user
 // experience at the same time.
-ConfigDialog::ConfigDialog()
+ConfigDialog::ConfigDialog(bool subtitleControls)
 	: GUI::OptionsDialog("", "ScummConfig") {
 
 	//
@@ -279,11 +279,13 @@
 	addVolumeControls(this, "ScummConfig.");
 
 	//
-	// Some misc options
+	// Subtitle speed and toggle controllers
 	//
 
-	// SCUMM has a talkspeed range of 0-9
-	addSubtitleControls(this, "ScummConfig.", 9);
+	if (subtitleControls) {
+		// Global talkspeed range of 0-255
+		addSubtitleControls(this, "ScummConfig.", 255);
+	}
 
 	//
 	// Add the buttons

Modified: scummvm/branches/branch-0-13-0/engines/dialogs.h
===================================================================
--- scummvm/branches/branch-0-13-0/engines/dialogs.h	2009-02-07 06:47:19 UTC (rev 36237)
+++ scummvm/branches/branch-0-13-0/engines/dialogs.h	2009-02-07 06:47:56 UTC (rev 36238)
@@ -66,7 +66,7 @@
 #endif
 
 public:
-	ConfigDialog();
+	ConfigDialog(bool subtitleControls);
 	~ConfigDialog();
 
 	virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);

Modified: scummvm/branches/branch-0-13-0/engines/engine.h
===================================================================
--- scummvm/branches/branch-0-13-0/engines/engine.h	2009-02-07 06:47:19 UTC (rev 36237)
+++ scummvm/branches/branch-0-13-0/engines/engine.h	2009-02-07 06:47:56 UTC (rev 36238)
@@ -103,6 +103,12 @@
 	 */
 	enum EngineFeature {
 		/**
+		 * Enables the subtitle speed and toggle items in the Options section
+		 * of the global main menu.
+		 */
+		kSupportsSubtitleOptions,
+
+		/**
 		 * 'Return to launcher' feature is supported, i.e., EVENT_RTL is handled
 		 * either directly, or indirectly (that is, the engine calls and honors
 		 * the result of the Engine::shouldQuit() method appropriately).

Modified: scummvm/branches/branch-0-13-0/engines/queen/queen.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/engines/queen/queen.cpp	2009-02-07 06:47:19 UTC (rev 36237)
+++ scummvm/branches/branch-0-13-0/engines/queen/queen.cpp	2009-02-07 06:47:56 UTC (rev 36238)
@@ -85,7 +85,8 @@
 
 bool Queen::QueenEngine::hasFeature(EngineFeature f) const {
 	return
-		(f == kSupportsRTL);
+		(f == kSupportsRTL) ||
+		(f == kSupportsSubtitleOptions);
 }
 
 GameList QueenMetaEngine::getSupportedGames() const {

Modified: scummvm/branches/branch-0-13-0/engines/scumm/detection.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/engines/scumm/detection.cpp	2009-02-07 06:47:19 UTC (rev 36237)
+++ scummvm/branches/branch-0-13-0/engines/scumm/detection.cpp	2009-02-07 06:47:56 UTC (rev 36238)
@@ -711,7 +711,8 @@
 	return
 		(f == kSupportsRTL) ||
 		(f == kSupportsLoadingDuringRuntime) ||
-		(f == kSupportsSavingDuringRuntime);
+		(f == kSupportsSavingDuringRuntime) ||
+		(f == kSupportsSubtitleOptions);
 }
 
 GameList ScummMetaEngine::getSupportedGames() const {

Modified: scummvm/branches/branch-0-13-0/engines/sword2/sword2.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/engines/sword2/sword2.cpp	2009-02-07 06:47:19 UTC (rev 36237)
+++ scummvm/branches/branch-0-13-0/engines/sword2/sword2.cpp	2009-02-07 06:47:56 UTC (rev 36238)
@@ -100,7 +100,8 @@
 
 bool Sword2::Sword2Engine::hasFeature(EngineFeature f) const {
 	return
-		(f == kSupportsRTL);
+		(f == kSupportsRTL) ||
+		(f == kSupportsSubtitleOptions);
 }
 
 GameList Sword2MetaEngine::getSupportedGames() const {

Modified: scummvm/branches/branch-0-13-0/engines/touche/detection.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/engines/touche/detection.cpp	2009-02-07 06:47:19 UTC (rev 36237)
+++ scummvm/branches/branch-0-13-0/engines/touche/detection.cpp	2009-02-07 06:47:56 UTC (rev 36238)
@@ -155,7 +155,8 @@
 	return
 		(f == kSupportsRTL) ||
 		(f == kSupportsLoadingDuringRuntime) ||
-		(f == kSupportsSavingDuringRuntime);
+		(f == kSupportsSavingDuringRuntime) ||
+		(f == kSupportsSubtitleOptions);
 }
 
 bool ToucheMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {


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