diff options
Diffstat (limited to 'engines/sci/engine/kgraphics32.cpp')
| -rw-r--r-- | engines/sci/engine/kgraphics32.cpp | 75 |
1 files changed, 31 insertions, 44 deletions
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 019a06930c..9270c81c02 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -54,7 +54,6 @@ #include "sci/graphics/frameout.h" #include "sci/graphics/paint32.h" #include "sci/graphics/palette32.h" -#include "sci/graphics/remap32.h" #include "sci/graphics/text32.h" #endif @@ -926,69 +925,57 @@ reg_t kPalCycle(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } -reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { +reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { if (!s) return make_reg(0, getSciVersion()); error("not supposed to call this"); } -reg_t kRemapColorsOff(EngineState *s, int argc, reg_t *argv) { - if (argc == 0) { - g_sci->_gfxRemap32->remapAllOff(); - } else { - const uint8 color = argv[0].toUint16(); - g_sci->_gfxRemap32->remapOff(color); - } +reg_t kRemapOff(EngineState *s, int argc, reg_t *argv) { + byte color = (argc >= 1) ? argv[0].toUint16() : 0; + g_sci->_gfxRemap32->remapOff(color); return s->r_acc; } -reg_t kRemapColorsByRange(EngineState *s, int argc, reg_t *argv) { - const uint8 color = argv[0].toUint16(); - const int16 from = argv[1].toSint16(); - const int16 to = argv[2].toSint16(); - const int16 base = argv[3].toSint16(); - // NOTE: There is an optional last parameter after `base` - // which was only used by the priority map debugger, which - // does not exist in release versions of SSCI - g_sci->_gfxRemap32->remapByRange(color, from, to, base); +reg_t kRemapByRange(EngineState *s, int argc, reg_t *argv) { + byte color = argv[0].toUint16(); + byte from = argv[1].toUint16(); + byte to = argv[2].toUint16(); + byte base = argv[3].toUint16(); + // The last parameter, depth, is unused + g_sci->_gfxRemap32->setRemappingRange(color, from, to, base); return s->r_acc; } -reg_t kRemapColorsByPercent(EngineState *s, int argc, reg_t *argv) { - const uint8 color = argv[0].toUint16(); - const int16 percent = argv[1].toSint16(); - // NOTE: There is an optional last parameter after `percent` - // which was only used by the priority map debugger, which - // does not exist in release versions of SSCI - g_sci->_gfxRemap32->remapByPercent(color, percent); +reg_t kRemapByPercent(EngineState *s, int argc, reg_t *argv) { + byte color = argv[0].toUint16(); + byte percent = argv[1].toUint16(); + // The last parameter, depth, is unused + g_sci->_gfxRemap32->setRemappingPercent(color, percent); return s->r_acc; } -reg_t kRemapColorsToGray(EngineState *s, int argc, reg_t *argv) { - const uint8 color = argv[0].toUint16(); - const int16 gray = argv[1].toSint16(); - // NOTE: There is an optional last parameter after `gray` - // which was only used by the priority map debugger, which - // does not exist in release versions of SSCI - g_sci->_gfxRemap32->remapToGray(color, gray); +reg_t kRemapToGray(EngineState *s, int argc, reg_t *argv) { + byte color = argv[0].toUint16(); + byte gray = argv[1].toUint16(); + // The last parameter, depth, is unused + g_sci->_gfxRemap32->setRemappingToGray(color, gray); return s->r_acc; } -reg_t kRemapColorsToPercentGray(EngineState *s, int argc, reg_t *argv) { - const uint8 color = argv[0].toUint16(); - const int16 gray = argv[1].toSint16(); - const int16 percent = argv[2].toSint16(); - // NOTE: There is an optional last parameter after `percent` - // which was only used by the priority map debugger, which - // does not exist in release versions of SSCI - g_sci->_gfxRemap32->remapToPercentGray(color, gray, percent); +reg_t kRemapToPercentGray(EngineState *s, int argc, reg_t *argv) { + byte color = argv[0].toUint16(); + byte gray = argv[1].toUint16(); + byte percent = argv[2].toUint16(); + // The last parameter, depth, is unused + g_sci->_gfxRemap32->setRemappingToPercentGray(color, gray, percent); return s->r_acc; } -reg_t kRemapColorsBlockRange(EngineState *s, int argc, reg_t *argv) { - const uint8 from = argv[0].toUint16(); - const uint8 count = argv[1].toUint16(); - g_sci->_gfxRemap32->blockRange(from, count); +reg_t kRemapSetNoMatchRange(EngineState *s, int argc, reg_t *argv) { + byte from = argv[0].toUint16(); + byte count = argv[1].toUint16(); + g_sci->_gfxRemap32->setNoMatchRange(from, count); return s->r_acc; } |
