diff options
author | Kawa | 2019-06-23 00:46:53 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-06-23 01:46:53 +0300 |
commit | 9aadb2726732e1fcd517088bdcaff60a8a49710d (patch) | |
tree | 75a2b0d25058ad47cf8bd523ffa471dc1b3900f7 /engines/sci/graphics | |
parent | 536db4d7e72a0c775be4fbab5d560f8012b019c1 (diff) | |
download | scummvm-rg350-9aadb2726732e1fcd517088bdcaff60a8a49710d.tar.gz scummvm-rg350-9aadb2726732e1fcd517088bdcaff60a8a49710d.tar.bz2 scummvm-rg350-9aadb2726732e1fcd517088bdcaff60a8a49710d.zip |
SCI: Add some more SCI11+ features
Also gate them behind the presence of a 184.VOC resource instead of GID_CATDATE. This should not matter with regards to the remap effects -- the 2015 and 2016 demos had none, and the first that did has an unknown release status. Only the 2017 demo would fall, which would be easily fixed by dropping in a valid 184.VOC patch file.
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/view.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index 5924571660..c387a58573 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -838,8 +838,14 @@ void GfxView::draw(const Common::Rect &rect, const Common::Rect &clipRect, const if (g_sci->_gfxRemap16 && g_sci->_gfxRemap16->isRemapped(outputColor)) outputColor = g_sci->_gfxRemap16->remapColor(outputColor, _screen->getVisual(x2, y2)); // SCI11+ remapping (Catdate) - if ((scaleSignal & 0x200) && g_sci->_gfxRemap16) - outputColor = g_sci->_gfxRemap16->remapColor(253, outputColor); + if ((scaleSignal & 0xFF00) && g_sci->_gfxRemap16 && _resMan->testResource(ResourceId(kResourceTypeVocab, 184))) { + if ((scaleSignal >> 8) == 1) // all black + outputColor = 0; + else if ((scaleSignal >> 8) == 2) // darken + outputColor = g_sci->_gfxRemap16->remapColor(253, outputColor); + else if ((scaleSignal >> 8) == 3) // shadow + outputColor = g_sci->_gfxRemap16->remapColor(253, _screen->getVisual(x2, y2)); + } _screen->putPixel(x2, y2, drawMask, outputColor, priority, 0); } } @@ -932,8 +938,14 @@ void GfxView::drawScaled(const Common::Rect &rect, const Common::Rect &clipRect, if (g_sci->_gfxRemap16 && g_sci->_gfxRemap16->isRemapped(outputColor)) outputColor = g_sci->_gfxRemap16->remapColor(outputColor, _screen->getVisual(x2, y2)); // SCI11+ remapping (Catdate) - if ((scaleSignal & 0x200) && g_sci->_gfxRemap16) - outputColor = g_sci->_gfxRemap16->remapColor(253, outputColor); + if ((scaleSignal & 0xFF00) && g_sci->_gfxRemap16 && _resMan->testResource(ResourceId(kResourceTypeVocab, 184))) { + if ((scaleSignal >> 8) == 1) // all black + outputColor = 0; + else if ((scaleSignal >> 8) == 2) // darken + outputColor = g_sci->_gfxRemap16->remapColor(253, outputColor); + else if ((scaleSignal >> 8) == 3) // shadow + outputColor = g_sci->_gfxRemap16->remapColor(253, _screen->getVisual(x2, y2)); + } _screen->putPixel(x2, y2, drawMask, outputColor, priority, 0); } } |