diff options
author | Martin Kiewitz | 2009-10-07 18:00:49 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-07 18:00:49 +0000 |
commit | 7f78a7c6beedf1750f859dba89de03d01bf5dd96 (patch) | |
tree | 9715baea4fd24ff9d264eb7fe380e940392bedd0 /engines/sci/gui | |
parent | 0e3b634ecbd7210af60f0ca112bd7e5e9e4711a8 (diff) | |
download | scummvm-rg350-7f78a7c6beedf1750f859dba89de03d01bf5dd96.tar.gz scummvm-rg350-7f78a7c6beedf1750f859dba89de03d01bf5dd96.tar.bz2 scummvm-rg350-7f78a7c6beedf1750f859dba89de03d01bf5dd96.zip |
SCI/newgui: undithering of picture now possible (just follow instructions in gui_screen.cpp)
svn-id: r44742
Diffstat (limited to 'engines/sci/gui')
-rw-r--r-- | engines/sci/gui/gui_palette.cpp | 8 | ||||
-rw-r--r-- | engines/sci/gui/gui_screen.cpp | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/engines/sci/gui/gui_palette.cpp b/engines/sci/gui/gui_palette.cpp index b9f75e464a..d979491d1d 100644 --- a/engines/sci/gui/gui_palette.cpp +++ b/engines/sci/gui/gui_palette.cpp @@ -144,6 +144,7 @@ bool SciGuiPalette::setAmiga() { void SciGuiPalette::setEGA() { int i; + byte color1, color2; _sysPalette.colors[1].r = 0x000; _sysPalette.colors[1].g = 0x000; _sysPalette.colors[1].b = 0x0AA; _sysPalette.colors[2].r = 0x000; _sysPalette.colors[2].g = 0x0AA; _sysPalette.colors[2].b = 0x000; _sysPalette.colors[3].r = 0x000; _sysPalette.colors[3].g = 0x0AA; _sysPalette.colors[3].b = 0x0AA; @@ -162,9 +163,14 @@ void SciGuiPalette::setEGA() { for (i = 0; i <= 15; i++) { _sysPalette.colors[i].used = 1; } + // Now setting colors 16-254 to the correct mix colors that occur when not doing a dithering run on + // finished pictures for (i = 16; i <= 254; i++) { - _sysPalette.colors[i].r = 200; _sysPalette.colors[i].used = 1; + color1 = i & 0x0F; color2 = i >> 4; + _sysPalette.colors[i].r = (_sysPalette.colors[color1].r >> 1) + (_sysPalette.colors[color2].r >> 1); + _sysPalette.colors[i].g = (_sysPalette.colors[color1].g >> 1) + (_sysPalette.colors[color2].g >> 1); + _sysPalette.colors[i].b = (_sysPalette.colors[color1].b >> 1) + (_sysPalette.colors[color2].b >> 1); } setOnScreen(); } diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp index 6f1b278739..d7933c0535 100644 --- a/engines/sci/gui/gui_screen.cpp +++ b/engines/sci/gui/gui_screen.cpp @@ -232,8 +232,12 @@ void SciGuiScreen::dither() { color = *screenPtr; if (color & 0xF0) { color ^= color << 4; +// remove remark to enable undithering +// *displayPtr = color; + // do the actual dithering color = ((x^y) & 1) ? color >> 4 : color & 0x0F; - *screenPtr = color; *displayPtr = color; + *screenPtr = color; + *displayPtr = color; // put remark here to enable unditherung } screenPtr++; displayPtr++; } |