[Scummvm-cvs-logs] SF.net SVN: scummvm:[44320] scummvm/trunk/engines/sci/gfx/palette.cpp

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Fri Sep 25 01:54:48 CEST 2009


Revision: 44320
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44320&view=rev
Author:   wjpalenstijn
Date:     2009-09-24 23:54:48 +0000 (Thu, 24 Sep 2009)

Log Message:
-----------
SCI: When setting global palette, map all unused colours to index 0.
This fixes white artifacts outside the bar in the SQ4CD intro,
but might cause regressions elsewhere.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/palette.cpp

Modified: scummvm/trunk/engines/sci/gfx/palette.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/palette.cpp	2009-09-24 23:54:30 UTC (rev 44319)
+++ scummvm/trunk/engines/sci/gfx/palette.cpp	2009-09-24 23:54:48 UTC (rev 44320)
@@ -285,6 +285,16 @@
 				_parent->_colors[i].refcount = 1;
 		} else {
 			_parent->_colors[i].refcount = 0;
+			// Force all unused colours to index 0
+			_colors[i].parent_index = 0;
+			if (_parent->_colors[0].refcount != PALENTRY_LOCKED) {
+				if (i == 0)
+					_parent->_colors[0].refcount = 1;
+				else
+					_parent->_colors[0].refcount++;
+			}
+			if (_colors[i].r || _colors[i].g || _colors[i].b)
+				warning("Non-black unused colour in pic: index %d, %02X %02X %02X", i, _colors[i].r, _colors[i].g, _colors[i].b);
 		}
 	}
 	_parent->_dirty = true;


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