aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kernel_tables.h2
-rw-r--r--engines/sci/engine/kgraphics32.cpp13
3 files changed, 16 insertions, 0 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 90f582c291..45477e1153 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -583,6 +583,7 @@ reg_t kSetScroll(EngineState *s, int argc, reg_t *argv);
reg_t kPaletteSetFromResource32(EngineState *s, int argc, reg_t *argv);
reg_t kPaletteFindColor32(EngineState *s, int argc, reg_t *argv);
reg_t kPaletteSetFade(EngineState *s, int argc, reg_t *argv);
+reg_t kPaletteSetGamma(EngineState *s, int argc, reg_t *argv);
reg_t kPalCycle(EngineState *s, int argc, reg_t *argv);
reg_t kPalCycleSetCycle(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index acd1adf6ec..023a2c024b 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -303,6 +303,7 @@ static const SciKernelMapSubEntry kPalette_subops[] = {
{ SIG_SCI32, 1, MAP_CALL(PaletteSetFromResource32), "i(i)", NULL },
{ SIG_SCI32, 2, MAP_CALL(PaletteSetFade), "iii", NULL },
{ SIG_SCI32, 3, MAP_CALL(PaletteFindColor32), "iii", NULL },
+ { SIG_SCI3, 4, MAP_CALL(PaletteSetGamma), "i", NULL },
#endif
SCI_SUBOPENTRY_TERMINATOR
};
@@ -465,6 +466,7 @@ static const SciKernelMapSubEntry kPlayVMD_subops[] = {
{ SIG_SINCE_SCI21, 18, MAP_DUMMY(PlayVMDStopBlobs), "", NULL },
{ SIG_SINCE_SCI21, 21, MAP_CALL(PlayVMDSetBlackoutArea), "iiii", NULL },
{ SIG_SINCE_SCI21, 23, MAP_CALL(PlayVMDRestrictPalette), "ii", NULL },
+ { SIG_SCI3, 28, MAP_EMPTY(PlayVMDSetPreload), "i", NULL },
SCI_SUBOPENTRY_TERMINATOR
};
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index 13a209ea55..f3eec59eaf 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -901,6 +901,19 @@ reg_t kPaletteFindColor32(EngineState *s, int argc, reg_t *argv) {
return make_reg(0, g_sci->_gfxPalette32->matchColor(r, g, b));
}
+/*
+ * Used in SCI3. SCI3 contains 6 gamma look-up tables, with the first
+ * table (gamma = 0) being the default one.
+ */
+reg_t kPaletteSetGamma(EngineState *s, int argc, reg_t *argv) {
+ const uint8 gamma = argv[0].toUint16();
+ assert(gamma >= 0 && gamma <= 6);
+
+ warning("TODO: kPaletteSetGamma(%d)", gamma);
+
+ return s->r_acc;
+}
+
reg_t kPaletteSetFade(EngineState *s, int argc, reg_t *argv) {
uint16 fromColor = argv[0].toUint16();
uint16 toColor = argv[1].toUint16();