aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2018-09-01 13:05:02 +0300
committerFilippos Karapetis2018-09-01 13:14:38 +0300
commit7f83640894c16b46aaff60baff0268a6e5e951bc (patch)
tree54fd18b8d12670fce77531bfc298111b6b3620f0
parent3c8a0a3d2ea4cf67960a23b77460e6cf95c64d60 (diff)
downloadscummvm-rg350-7f83640894c16b46aaff60baff0268a6e5e951bc.tar.gz
scummvm-rg350-7f83640894c16b46aaff60baff0268a6e5e951bc.tar.bz2
scummvm-rg350-7f83640894c16b46aaff60baff0268a6e5e951bc.zip
SCI32: Add a game option to double the videos in KQ7 by default
Scaling works correctly with the Windows variant, which uses AVI files, but the DOS variant uses Robot videos, and the way scaling is done there is different, and is not working yet with KQ7 DOS. Nonetheless, both versions are included in the game, so it's not a major issue.
-rw-r--r--common/gui_options.cpp3
-rw-r--r--common/gui_options.h3
-rw-r--r--engines/sci/detection.cpp10
-rw-r--r--engines/sci/detection_tables.h5
-rw-r--r--engines/sci/engine/guest_additions.cpp5
-rw-r--r--engines/sci/engine/savegame.cpp6
-rw-r--r--engines/sci/engine/vm.h1
-rw-r--r--engines/sci/sci.h1
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;