aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-05-20 05:48:37 +0000
committerMartin Kiewitz2010-05-20 05:48:37 +0000
commita0db16294a6ce9bdc737e60586abcef7ec7a2dec (patch)
tree7705d5e53621eea3590e68969194acc66e670dc6 /engines
parent75992f856cd4949973d7f9cc2847098887e333d7 (diff)
downloadscummvm-rg350-a0db16294a6ce9bdc737e60586abcef7ec7a2dec.tar.gz
scummvm-rg350-a0db16294a6ce9bdc737e60586abcef7ec7a2dec.tar.bz2
scummvm-rg350-a0db16294a6ce9bdc737e60586abcef7ec7a2dec.zip
SCI: adding workaround for some underwater rooms in iceman - removing visual&priority lines that appear because of non dither mode (would merge with dithered fill color combination normally)
svn-id: r49113
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/picture.cpp18
-rw-r--r--engines/sci/graphics/screen.h3
2 files changed, 21 insertions, 0 deletions
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index c7c2503eae..74f651a88a 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -413,6 +413,7 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) {
int i;
Palette palette;
int16 pattern_Code = 0, pattern_Texture = 0;
+ bool icemanDrawFix = false;
memset(&palette, 0, sizeof(palette));
@@ -425,6 +426,14 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) {
for (i = 0; i < PIC_EGAPALETTE_TOTALSIZE; i += PIC_EGAPALETTE_SIZE)
memcpy(&EGApalettes[i], &vector_defaultEGApalette, sizeof(vector_defaultEGApalette));
memcpy(&EGApriority, &vector_defaultEGApriority, sizeof(vector_defaultEGApriority));
+
+ if (strcmp(g_sci->getGameID(), "iceman") == 0) {
+ // WORKAROUND: we remove certain visual&priority lines in underwater rooms of iceman, when not dithering the
+ // picture. Normally those lines aren't shown, because they share the same color as the dithered
+ // fill color combination. When not dithering, those lines would appear and get distracting.
+ if ((_screen->getUnditherState()) && ((_resourceId >= 53 && _resourceId <= 58) || (_resourceId == 61)))
+ icemanDrawFix = true;
+ }
}
// Drawing
@@ -472,6 +481,15 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) {
break;
case PIC_OP_MEDIUM_LINES: // medium line
vectorGetAbsCoords(data, curPos, x, y);
+ if (icemanDrawFix) {
+ // WORKAROUND: remove certain lines in iceman ffs. see above
+ if ((pic_color == 1) && (pic_priority == 14)) {
+ if ((y < 100) || (!(y & 1))) {
+ pic_color = 255;
+ pic_priority = 255;
+ }
+ }
+ }
while (vectorIsNonOpcode(data[curPos])) {
oldx = x; oldy = y;
vectorGetRelCoordsMed(data, curPos, x, y);
diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h
index dff8eda29f..b2479e9735 100644
--- a/engines/sci/graphics/screen.h
+++ b/engines/sci/graphics/screen.h
@@ -86,6 +86,9 @@ public:
int getUpscaledHires() {
return _upscaledHires;
}
+ bool getUnditherState() {
+ return _unditherState;
+ }
void putKanjiChar(Graphics::FontSJIS *commonFont, int16 x, int16 y, uint16 chr, byte color);
byte getVisual(int x, int y);
byte getPriority(int x, int y);