diff options
author | Filippos Karapetis | 2016-08-22 19:04:26 +0300 |
---|---|---|
committer | Filippos Karapetis | 2016-08-22 19:04:26 +0300 |
commit | 88cffa3220b7a0a2fa79a3315b4c7c4e31069a8e (patch) | |
tree | 34c79c76bf993bce5a3926d207af8acbadeb3a53 /engines | |
parent | 6b5e87683c4203ac180dffce384791da55d6adb0 (diff) | |
download | scummvm-rg350-88cffa3220b7a0a2fa79a3315b4c7c4e31069a8e.tar.gz scummvm-rg350-88cffa3220b7a0a2fa79a3315b4c7c4e31069a8e.tar.bz2 scummvm-rg350-88cffa3220b7a0a2fa79a3315b4c7c4e31069a8e.zip |
SCI32: Add stubs for the kPlayVMDSetPreload and kPaletteSetGamma calls
These were introduced in SCI3, and are used by RAMA. We don't preload
videos, so we don't really need kPlayVMDSetPreload, but
kPaletteSetGamma may need an implementation.
With these two stubs, the main menu of RAMA is working again
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kernel.h | 1 | ||||
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 2 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics32.cpp | 13 |
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(); |