aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2018-09-01 13:05:02 +0300
committerFilippos Karapetis2018-09-01 13:14:38 +0300
commit7f83640894c16b46aaff60baff0268a6e5e951bc (patch)
tree54fd18b8d12670fce77531bfc298111b6b3620f0 /engines/sci/engine
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.
Diffstat (limited to 'engines/sci/engine')
-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
3 files changed, 12 insertions, 0 deletions
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