[Scummvm-cvs-logs] SF.net SVN: scummvm:[49113] scummvm/trunk/engines/sci/graphics
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Thu May 20 07:48:37 CEST 2010
Revision: 49113
http://scummvm.svn.sourceforge.net/scummvm/?rev=49113&view=rev
Author: m_kiewitz
Date: 2010-05-20 05:48:37 +0000 (Thu, 20 May 2010)
Log Message:
-----------
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)
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/picture.cpp
scummvm/trunk/engines/sci/graphics/screen.h
Modified: scummvm/trunk/engines/sci/graphics/picture.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/picture.cpp 2010-05-20 00:10:53 UTC (rev 49112)
+++ scummvm/trunk/engines/sci/graphics/picture.cpp 2010-05-20 05:48:37 UTC (rev 49113)
@@ -413,6 +413,7 @@
int i;
Palette palette;
int16 pattern_Code = 0, pattern_Texture = 0;
+ bool icemanDrawFix = false;
memset(&palette, 0, sizeof(palette));
@@ -425,6 +426,14 @@
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 @@
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);
Modified: scummvm/trunk/engines/sci/graphics/screen.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/screen.h 2010-05-20 00:10:53 UTC (rev 49112)
+++ scummvm/trunk/engines/sci/graphics/screen.h 2010-05-20 05:48:37 UTC (rev 49113)
@@ -86,6 +86,9 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list