aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui/gui_screen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/gui/gui_screen.cpp')
-rw-r--r--engines/sci/gui/gui_screen.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp
index 26a81ef833..0e0a1ed170 100644
--- a/engines/sci/gui/gui_screen.cpp
+++ b/engines/sci/gui/gui_screen.cpp
@@ -216,7 +216,7 @@ void SciGuiScreen::setPalette(GuiPalette*pal) {
}
// Currently not really done, its supposed to be possible to only dither _visualScreen
-void SciGuiScreen::dither() {
+void SciGuiScreen::dither(bool addToFlag) {
int y, x;
byte color;
byte *screenPtr = _visualScreen;
@@ -236,12 +236,16 @@ void SciGuiScreen::dither() {
}
}
} else {
+ if (!addToFlag)
+ memset(&_unditherMemorial, 0, sizeof(_unditherMemorial));
// Do dithering on visual screen and put decoded but undithered byte onto display-screen
for (y = 0; y < _height; y++) {
for (x = 0; x < _width; x++) {
color = *screenPtr;
if (color & 0xF0) {
color ^= color << 4;
+ // remember dither combination for cel-undithering
+ _unditherMemorial[color]++;
// if decoded color wants do dither with black on left side, we turn it around
// otherwise the normal ega color would get used for display
if (color & 0xF0) {
@@ -262,6 +266,13 @@ void SciGuiScreen::unditherSetState(bool flag) {
_unditherState = flag;
}
+int16 *SciGuiScreen::unditherGetMemorial() {
+ if (_unditherState)
+ return (int16 *)&_unditherMemorial;
+ else
+ return NULL;
+}
+
void SciGuiScreen::debugShowMap(int mapNo) {
switch (mapNo) {
case 0: