diff options
author | Filippos Karapetis | 2016-03-08 20:20:19 +0200 |
---|---|---|
committer | Filippos Karapetis | 2016-03-08 20:36:02 +0200 |
commit | aa69563f8afc0f7eba14fcce57de5552ca15ea57 (patch) | |
tree | 2860c24c89720116e4fd3222dc3820b66e0233e1 | |
parent | 6958aa989011e785f1c28de8c2975acff70fad74 (diff) | |
download | scummvm-rg350-aa69563f8afc0f7eba14fcce57de5552ca15ea57.tar.gz scummvm-rg350-aa69563f8afc0f7eba14fcce57de5552ca15ea57.tar.bz2 scummvm-rg350-aa69563f8afc0f7eba14fcce57de5552ca15ea57.zip |
SCI32: Disable kRemapColors32, as SCI32 remapping is still incomplete
-rw-r--r-- | engines/sci/engine/kgraphics32.cpp | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 3a59ea5037..9c5d214488 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -914,6 +914,8 @@ reg_t kPalCycle(EngineState *s, int argc, reg_t *argv) { } reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { + // TODO +#if 0 uint16 operation = argv[0].toUint16(); switch (operation) { @@ -924,57 +926,57 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { if (g_sci->getGameId() == GID_QFG4 && s->currentRoomNumber() == 140) return s->r_acc; - int16 base = (argc >= 2) ? argv[1].toSint16() : 0; - if (base > 0) - warning("kRemapColors(0) called with base %d", base); - g_sci->_gfxPalette32->resetRemapping(); + int16 color = (argc >= 2) ? argv[1].toSint16() : 0; + if (color > 0) + warning("kRemapColors(0) called with base %d", color); + //g_sci->_gfxPalette32->resetRemapping(); } break; case 1: { // remap by range uint16 color = argv[1].toUint16(); uint16 from = argv[2].toUint16(); uint16 to = argv[3].toUint16(); - uint16 base = argv[4].toUint16(); - uint16 unk5 = (argc >= 6) ? argv[5].toUint16() : 0; - if (unk5 > 0) - warning("kRemapColors(1) called with 6 parameters, unknown parameter is %d", unk5); - g_sci->_gfxPalette32->setRemappingRange(color, from, to, base); + uint16 delta = argv[4].toUint16(); + uint16 depth = (argc >= 6) ? argv[5].toUint16() : 0; + if (depth > 0) + warning("kRemapColors(1) called with 6 parameters, depth is %d", depth); + //g_sci->_gfxPalette32->setRemappingRange(color, from, to, delta); } break; case 2: { // remap by percent uint16 color = argv[1].toUint16(); uint16 percent = argv[2].toUint16(); // 0 - 100 - if (argc >= 4) - warning("RemapByPercent called with 4 parameters, unknown parameter is %d", argv[3].toUint16()); - g_sci->_gfxPalette32->setRemappingPercent(color, percent); + uint16 depth = (argc >= 4) ? argv[3].toUint16() : 0; + if (depth >= 0) + warning("RemapByPercent called with 4 parameters, depth is %d", depth); + //g_sci->_gfxPalette32->setRemappingPercent(color, percent); } break; case 3: { // remap to gray // Example call: QFG4 room 490 (Baba Yaga's hut) - params are color 253, 75% and 0. // In this room, it's used for the cloud before Baba Yaga appears. - int16 color = argv[1].toSint16(); - int16 percent = argv[2].toSint16(); // 0 - 100 - if (argc >= 4) - warning("RemapToGray called with 4 parameters, unknown parameter is %d", argv[3].toUint16()); - g_sci->_gfxPalette32->setRemappingPercentGray(color, percent); + uint16 color = argv[1].toUint16(); + uint16 percent = argv[2].toUint16(); // 0 - 100 + uint16 depth = (argc >= 4) ? argv[3].toUint16() : 0; + if (depth >= 0) + warning("RemapToGray called with 4 parameters, depth is %d", depth); + //g_sci->_gfxPalette32->setRemappingPercentGray(color, percent); } break; case 4: { // remap to percent gray // Example call: QFG4 rooms 530/535 (swamp) - params are 253, 100%, 200 - int16 color = argv[1].toSint16(); - int16 percent = argv[2].toSint16(); // 0 - 100 - // argv[3] is unknown (a number, e.g. 200) - start color, perhaps? + uint16 color = argv[1].toUint16(); + uint16 percent = argv[2].toUint16(); // 0 - 100 + uint16 grayPercent = argv[3].toUint16(); + uint16 depth = (argc >= 5) ? argv[4].toUint16() : 0; if (argc >= 5) - warning("RemapToGrayPercent called with 5 parameters, unknown parameter is %d", argv[4].toUint16()); - g_sci->_gfxPalette32->setRemappingPercentGray(color, percent); + warning("RemapToGrayPercent called with 5 parameters, depth is %d", depth); + //g_sci->_gfxPalette32->setRemappingPercentGray(color, percent); } break; case 5: { // don't map to range - //int16 mapping = argv[1].toSint16(); - uint16 intensity = argv[2].toUint16(); - // HACK for PQ4 - if (g_sci->getGameId() == GID_PQ4) - g_sci->_gfxPalette32->kernelSetIntensity(0, 255, intensity, true); + //uint16 start = argv[1].toSint16(); + //uint16 count = argv[2].toUint16(); kStub(s, argc, argv); } @@ -982,6 +984,7 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { default: break; } +#endif return s->r_acc; } |