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).
This commit is contained in:
Martin Kiewitz 2016-08-15 19:09:39 +02:00
parent b95ce5c95b
commit ad68471040
2 changed files with 9 additions and 18 deletions

View File

@ -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

View File

@ -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);