[Scummvm-git-logs] scummvm master -> 7f83640894c16b46aaff60baff0268a6e5e951bc
bluegr
bluegr at gmail.com
Sat Sep 1 12:14:58 CEST 2018
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:
7f83640894 SCI32: Add a game option to double the videos in KQ7 by default
Commit: 7f83640894c16b46aaff60baff0268a6e5e951bc
https://github.com/scummvm/scummvm/commit/7f83640894c16b46aaff60baff0268a6e5e951bc
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2018-09-01T13:14:38+03:00
Commit Message:
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.
Changed paths:
common/gui_options.cpp
common/gui_options.h
engines/sci/detection.cpp
engines/sci/detection_tables.h
engines/sci/engine/guest_additions.cpp
engines/sci/engine/savegame.cpp
engines/sci/engine/vm.h
engines/sci/sci.h
diff --git a/common/gui_options.cpp b/common/gui_options.cpp
index 06b6c20..08ee553 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 14d4cb9..00d08cf 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 e948d2a..98b9891 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 08625dd..0e3f6a4 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 6e15a52..ed31805 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 08cfef1..6d0abf7 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 19d4dea..0e7af34 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 09b1f8f..c17eba5 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;
More information about the Scummvm-git-logs
mailing list