Permalink
Browse files

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.
  • Loading branch information...
bluegr committed Sep 1, 2018
1 parent 3c8a0a3 commit 7f83640894c16b46aaff60baff0268a6e5e951bc
View
@@ -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 }
};
View
@@ -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)
View
@@ -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
};
@@ -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"
@@ -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) {
@@ -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"));
View
@@ -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
View
@@ -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;

0 comments on commit 7f83640

Please sign in to comment.