SCI/newgui: Implemented trick to get dithering going after drawing picture w/o destroying statusbar

svn-id: r44681
This commit is contained in:
Martin Kiewitz 2009-10-05 22:42:41 +00:00
parent 20125b51c4
commit 30596adec2
2 changed files with 11 additions and 4 deletions

View file

@ -321,8 +321,11 @@ void SciGuiPicture::drawVectorData(byte *data, int dataSize) {
//warning("%X at %d", data[curPos], curPos);
switch (pic_op = data[curPos++]) {
case PIC_OP_SET_COLOR:
byte = data[curPos++];
pic_color = isEGA ? EGApalette[byte] : byte;
pic_color = data[curPos++];
if (isEGA) {
pic_color = EGApalette[pic_color];
pic_color ^= pic_color << 4;
}
break;
case PIC_OP_DISABLE_VISUAL:
pic_color = 0xFF;

View file

@ -204,8 +204,12 @@ void SciGuiScreen::dither() {
for (y = 0; y < _height; y++) {
for (x = 0; x < _width; x++) {
color = *screenPtr;
color = ((x^y) & 1) ? color >> 4 : color & 0x0F;
*screenPtr++ = color; *displayPtr++ = color;
if (color & 0xF0) {
color ^= color << 4;
color = ((x^y) & 1) ? color >> 4 : color & 0x0F;
*screenPtr = color; *displayPtr = color;
}
screenPtr++; displayPtr++;
}
}
}