aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-05 17:40:21 +0000
committerMartin Kiewitz2009-10-05 17:40:21 +0000
commitac5d71b57e4fd835fab6bcdcf3198d7463e47546 (patch)
treea299fca59452c7cc784c4d010bfa52a398ee362e /engines
parentd7f584166dcde5e183c89b0e9fcfa2c99ba43061 (diff)
downloadscummvm-rg350-ac5d71b57e4fd835fab6bcdcf3198d7463e47546.tar.gz
scummvm-rg350-ac5d71b57e4fd835fab6bcdcf3198d7463e47546.tar.bz2
scummvm-rg350-ac5d71b57e4fd835fab6bcdcf3198d7463e47546.zip
SCI/newgui: duplicate the color in cels into upper 4 bits on ega so they wont get dithered with black
svn-id: r44666
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gui/gui_view.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/gui/gui_view.cpp b/engines/sci/gui/gui_view.cpp
index 6d6de0f118..95947458a4 100644
--- a/engines/sci/gui/gui_view.cpp
+++ b/engines/sci/gui/gui_view.cpp
@@ -111,11 +111,12 @@ void SciGuiView::initData(GuiResourceId resourceId) {
cel->height = READ_LE_UINT16(celData + 2);
cel->displaceX = celData[4];
cel->displaceY = celData[5];
- cel->clearKey = celData[6];
if (IsEGA) {
+ cel->clearKey = celData[6] | celData[6] << 4;
cel->offsetEGA = celOffset + 7;
cel->offsetRLE = 0;
} else {
+ cel->clearKey = celData[6];
cel->offsetEGA = 0;
cel->offsetRLE = celOffset + 8;
}
@@ -242,7 +243,7 @@ void SciGuiView::unpackCel(GuiViewLoopNo loopNo, GuiViewCelNo celNo, byte *outPt
byte = *literalPtr++;
runLength = byte >> 4;
byte = _EGAMapping[byte & 0x0F];
- memset(outPtr + pixelNo, byte, MIN<uint16>(runLength, pixelCount - pixelNo));
+ memset(outPtr + pixelNo, byte | byte << 4, MIN<uint16>(runLength, pixelCount - pixelNo));
pixelNo += runLength;
}
return;