[Scummvm-cvs-logs] scummvm master -> ad68471040fe7f1c7645dd3fe957adeabd5a1bbd

m-kiewitz m_kiewitz at users.sourceforge.net
Mon Aug 15 19:09:34 CEST 2016


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:
ad68471040 SCI: Improve "force hires graphics"-option reading code


Commit: ad68471040fe7f1c7645dd3fe957adeabd5a1bbd
    https://github.com/scummvm/scummvm/commit/ad68471040fe7f1c7645dd3fe957adeabd5a1bbd
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-08-15T19:09:39+02:00

Commit Message:
SCI: Improve "force hires graphics"-option reading code

We originally used hardcoded gameIDs and checked for CD-version.
Now the game option itself is checked for.
When it's available for the currently detected game, the option
is read, otherwise it defaults to false (same behavior as before).

Changed paths:
    engines/sci/detection_tables.h
    engines/sci/sci.cpp



diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index de342a3..0779c4b 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -29,6 +29,7 @@ namespace Sci {
 #define GAMEOPTION_KQ6_WINDOWS_CURSORS      GUIO_GAMEOPTIONS5
 #define GAMEOPTION_SQ4_SILVER_CURSORS       GUIO_GAMEOPTIONS6
 #define GAMEOPTION_EGA_UNDITHER             GUIO_GAMEOPTIONS7
+// HIGH_RESOLUTION_GRAPHICS availability is checked for in SciEngine::run()
 #define GAMEOPTION_HIGH_RESOLUTION_GRAPHICS GUIO_GAMEOPTIONS8
 #define GAMEOPTION_ENABLE_BLACK_LINED_VIDEO GUIO_GAMEOPTIONS9
 
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 4c178b6..1e8eca9 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -244,7 +244,7 @@ Common::Error SciEngine::run() {
 	_scriptPatcher = new ScriptPatcher();
 	SegManager *segMan = new SegManager(_resMan, _scriptPatcher);
 
-	// Read user option for hires graphics
+	// Read user option for forcing hires graphics
 	// Only show/selectable for:
 	//  - King's Quest 6 CD
 	//  - King's Quest 6 CD demo
@@ -252,23 +252,13 @@ Common::Error SciEngine::run() {
 	//  - Police Quest 4 CD
 	// TODO: Check, if Gabriel Knight 1 floppy supports high resolution
 	// TODO: Check, if Gabriel Knight 1 on Mac supports high resolution
-	switch (getPlatform()) {
-	case Common::kPlatformDOS:
-	case Common::kPlatformWindows:
-		// Only DOS+Windows
-		switch (_gameId) {
-		case GID_KQ6:
-		case GID_GK1:
-		case GID_PQ4:
-			if (isCD())
-				_forceHiresGraphics = ConfMan.getBool("enable_high_resolution_graphics");
-			break;
-		default:
-			break;
-		}
-	default:
-		break;
-	};
+	if (Common::checkGameGUIOption(GUIO_GAMEOPTIONS8, ConfMan.get("guioptions"))) {
+		// GAMEOPTION_HIGH_RESOLUTION_GRAPHICS is available for the currently detected game,
+		// so read the user option now.
+		// We need to do this, because the option's default is "true", but we don't want "true"
+		// for any game that does not have this option.
+		_forceHiresGraphics = ConfMan.getBool("enable_high_resolution_graphics");
+	}
 
 	// Initialize the game screen
 	_gfxScreen = new GfxScreen(_resMan);






More information about the Scummvm-git-logs mailing list