diff options
-rw-r--r-- | common/gui_options.cpp | 3 | ||||
-rw-r--r-- | common/gui_options.h | 3 | ||||
-rw-r--r-- | engines/sci/detection.cpp | 10 | ||||
-rw-r--r-- | engines/sci/detection_tables.h | 5 | ||||
-rw-r--r-- | engines/sci/engine/guest_additions.cpp | 5 | ||||
-rw-r--r-- | engines/sci/engine/savegame.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/vm.h | 1 | ||||
-rw-r--r-- | engines/sci/sci.h | 1 |
8 files changed, 32 insertions, 2 deletions
diff --git a/common/gui_options.cpp b/common/gui_options.cpp index 06b6c20a61..08ee553ea6 100644 --- a/common/gui_options.cpp +++ b/common/gui_options.cpp @@ -85,6 +85,9 @@ const struct GameOpt { { GUIO_GAMEOPTIONS10, "gameOptionA" }, { GUIO_GAMEOPTIONS11, "gameOptionB" }, { GUIO_GAMEOPTIONS12, "gameOptionC" }, + { GUIO_GAMEOPTIONS13, "gameOptionD" }, + { GUIO_GAMEOPTIONS14, "gameOptionE" }, + { GUIO_GAMEOPTIONS15, "gameOptionF" }, { GUIO_NONE, nullptr } }; diff --git a/common/gui_options.h b/common/gui_options.h index 14d4cb9175..00d08cfea5 100644 --- a/common/gui_options.h +++ b/common/gui_options.h @@ -77,6 +77,9 @@ #define GUIO_GAMEOPTIONS10 "\061" #define GUIO_GAMEOPTIONS11 "\062" #define GUIO_GAMEOPTIONS12 "\063" +#define GUIO_GAMEOPTIONS13 "\064" +#define GUIO_GAMEOPTIONS14 "\065" +#define GUIO_GAMEOPTIONS15 "\066" #define GUIO0() (GUIO_NONE) #define GUIO1(a) (a) diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index e948d2ae7c..98b9891ca2 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -512,6 +512,16 @@ static const ADExtraGuiOptionsMap optionsList[] = { } }, + // KQ7 - Upscale videos to double their size (The in-game "Full screen" video setting) + { + GAMEOPTION_UPSCALE_VIDEOS, + { + _s("Upscale videos"), + _s("Upscale videos to double their size"), + "enable_video_upscale", + true + } + }, AD_EXTRA_GUI_OPTIONS_TERMINATOR }; diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 08625dd8de..0e3f6a4fb9 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -1834,10 +1834,11 @@ static const struct ADGameDescription SciGameDescriptions[] = { GUIO_LINKMUSICTOSFX, \ GUIO_LINKSPEECHTOSFX, \ GUIO_NOASPECT) -#define GUIO_KQ7 GUIO4(GUIO_NOASPECT, \ +#define GUIO_KQ7 GUIO5(GUIO_NOASPECT, \ GUIO_LINKMUSICTOSFX, \ GUIO_LINKSPEECHTOSFX, \ - GAMEOPTION_HQ_VIDEO) + GAMEOPTION_HQ_VIDEO, \ + GAMEOPTION_UPSCALE_VIDEOS) // King's Quest 7 - English Windows (from the King's Quest Collection) // Executable scanning reports "2.100.002", VERSION file reports "1.4" diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp index 6e15a5259e..ed318058b3 100644 --- a/engines/sci/engine/guest_additions.cpp +++ b/engines/sci/engine/guest_additions.cpp @@ -191,6 +191,11 @@ void GuestAdditions::sciEngineInitGameHook() { if (g_sci->getGameId() == GID_PHANTASMAGORIA2 && Common::checkGameGUIOption(GAMEOPTION_ENABLE_CENSORING, ConfMan.get("guioptions"))) { _state->variables[VAR_GLOBAL][kGlobalVarPhant2CensorshipFlag] = make_reg(0, ConfMan.getBool("enable_censoring")); } + + if (g_sci->getGameId() == GID_KQ7 && Common::checkGameGUIOption(GAMEOPTION_UPSCALE_VIDEOS, ConfMan.get("guioptions"))) { + uint16 value = ConfMan.getBool("enable_video_upscale") ? 32 : 0; + _state->variables[VAR_GLOBAL][kGlobalVarKQ7UpscaleVideos] = make_reg(0, value); + } } void GuestAdditions::sendSelectorHook(const reg_t sendObj, Selector &selector, reg_t *argp) { diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 08cfef14ca..6d0abf75af 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -1255,6 +1255,12 @@ void gamestate_afterRestoreFixUp(EngineState *s, int savegameId) { g_sci->_gfxMenu->kernelSetAttribute(2, 1, SCI_MENU_ATTRIBUTE_ENABLED, TRUE_REG); // Game -> Save Game break; #ifdef ENABLE_SCI32 + case GID_KQ7: + if (Common::checkGameGUIOption(GAMEOPTION_UPSCALE_VIDEOS, ConfMan.get("guioptions"))) { + uint16 value = ConfMan.getBool("enable_video_upscale") ? 32 : 0; + s->variables[VAR_GLOBAL][kGlobalVarKQ7UpscaleVideos] = make_reg(0, value); + } + break; case GID_PHANTASMAGORIA2: if (Common::checkGameGUIOption(GAMEOPTION_ENABLE_CENSORING, ConfMan.get("guioptions"))) { s->variables[VAR_GLOBAL][kGlobalVarPhant2CensorshipFlag] = make_reg(0, ConfMan.getBool("enable_censoring")); diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index 19d4dea014..0e7af34165 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -158,6 +158,7 @@ enum GlobalVar { kGlobalVarGK1Music2 = 103, // 0 to 127 kGlobalVarRamaCatalogFile = 130, kGlobalVarLSL6HiresGameFlags = 137, + kGlobalVarKQ7UpscaleVideos = 160, kGlobalVarGK1NarratorMode = 166, // 0 for text, 1 for speech kGlobalVarRamaMusicVolume = 176, // 0 to 16 kGlobalVarPhant1MusicVolume = 187, // 0 to 15 diff --git a/engines/sci/sci.h b/engines/sci/sci.h index 09b1f8f95a..c17eba5955 100644 --- a/engines/sci/sci.h +++ b/engines/sci/sci.h @@ -59,6 +59,7 @@ namespace Sci { #define GAMEOPTION_HQ_VIDEO GUIO_GAMEOPTIONS10 #define GAMEOPTION_ENABLE_CENSORING GUIO_GAMEOPTIONS11 #define GAMEOPTION_LARRYSCALE GUIO_GAMEOPTIONS12 +#define GAMEOPTION_UPSCALE_VIDEOS GUIO_GAMEOPTIONS13 struct EngineState; class Vocabulary; |