aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2016-10-15 17:54:45 -0500
committerColin Snover2016-10-15 18:00:37 -0500
commitf35fafa52569abac058ffb1f7f2e2806919c43eb (patch)
tree7d515e33332794815de12fd03ad3b1021fbc1d2c /engines
parentaf2027ddd19b7ac14b3671e80fd6eca1a2a6b12d (diff)
downloadscummvm-rg350-f35fafa52569abac058ffb1f7f2e2806919c43eb.tar.gz
scummvm-rg350-f35fafa52569abac058ffb1f7f2e2806919c43eb.tar.bz2
scummvm-rg350-f35fafa52569abac058ffb1f7f2e2806919c43eb.zip
SCI32: Fix kPalVary(SetVary) in SCI2.1early games
Game scripts pass an extra argument which is never used in SSCI. This happens e.g. when warping from room 620 to room 860 in LSL6hires. Adding a signature for kPalVarySetVary for SCI2.1early games only does not work because KQ7 1.51 is detected as SCI2.1early but the interpreter includes kPalVary code that matches SCI2.1mid. Fixes Trac#9611.
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel_tables.h2
-rw-r--r--engines/sci/engine/kgraphics32.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 0f1210e0e1..09f9beeca9 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -278,7 +278,7 @@ static const SciKernelMapSubEntry kPalVary_subops[] = {
{ SIG_SCI16, 5, MAP_CALL(PalVaryChangeTicks), "i", NULL },
{ SIG_SCI16, 6, MAP_CALL(PalVaryPauseResume), "i", NULL },
#ifdef ENABLE_SCI32
- { SIG_SCI32, 0, MAP_CALL(PalVarySetVary), "i(i)(i)(ii)", NULL },
+ { SIG_SCI32, 0, MAP_CALL(PalVarySetVary), "i(i)(i)(i)(i)", NULL },
{ SIG_SCI32, 1, MAP_CALL(PalVarySetPercent), "(i)(i)", kPalVarySetPercent_workarounds },
{ SIG_SCI32, 2, MAP_CALL(PalVaryGetPercent), "", NULL },
{ SIG_SCI32, 3, MAP_CALL(PalVaryOff), "", NULL },
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index e5b8da4620..039373c387 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -972,7 +972,9 @@ reg_t kPalVarySetVary(EngineState *s, int argc, reg_t *argv) {
int16 fromColor;
int16 toColor;
- if (argc > 4) {
+ if ((getSciVersion() >= SCI_VERSION_2_1_MIDDLE || g_sci->getGameId() == GID_KQ7)
+ && argc > 4) {
+
fromColor = argv[3].toSint16();
toColor = argv[4].toSint16();
} else {