SCI/newgui: Implemented trick to get dithering going after drawing picture w/o destroying statusbar
svn-id: r44681
This commit is contained in:
parent
20125b51c4
commit
30596adec2
2 changed files with 11 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue