aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kgraphics.cpp
diff options
context:
space:
mode:
authorKawa2018-12-02 21:56:19 +0100
committerFilippos Karapetis2018-12-02 22:56:19 +0200
commitca2209cb5fd3c9548946d69cc7444431d3cce863 (patch)
treef481787dc05e169213fce48d13ce28e02d9709fb /engines/sci/engine/kgraphics.cpp
parentbbbd40477d1afe62df63b222193e016d1e9fdd7d (diff)
downloadscummvm-rg350-ca2209cb5fd3c9548946d69cc7444431d3cce863.tar.gz
scummvm-rg350-ca2209cb5fd3c9548946d69cc7444431d3cce863.tar.bz2
scummvm-rg350-ca2209cb5fd3c9548946d69cc7444431d3cce863.zip
SCI: Add support for The Dating Pool (#1403)
Diffstat (limited to 'engines/sci/engine/kgraphics.cpp')
-rw-r--r--engines/sci/engine/kgraphics.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 3c23cd515f..ee9212bd47 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -1278,4 +1278,33 @@ reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
+// Later SCI32-style kRemapColors, but in SCI11+.
+reg_t kRemapColorsKawa(EngineState *s, int argc, reg_t *argv) {
+ uint16 operation = argv[0].toUint16();
+
+ switch (operation) {
+ case 0: // off
+ break;
+ case 1: { // remap by percent
+ uint16 from = argv[1].toUint16();
+ uint16 percent = argv[2].toUint16();
+ g_sci->_gfxRemap16->resetRemapping();
+ g_sci->_gfxRemap16->setRemappingPercent(from, percent);
+ }
+ break;
+ case 2: { // remap by range
+ uint16 from = argv[1].toUint16();
+ uint16 to = argv[2].toUint16();
+ uint16 base = argv[3].toUint16();
+ g_sci->_gfxRemap16->resetRemapping();
+ g_sci->_gfxRemap16->setRemappingRange(254, from, to, base);
+ }
+ break;
+ default:
+ error("Unsupported SCI32-style kRemapColors(%d) has been called", operation);
+ break;
+ }
+ return s->r_acc;
+}
+
} // End of namespace Sci