[Scummvm-cvs-logs] SF.net SVN: scummvm:[55255] scummvm/trunk/engines/sword25/gfx/image/ renderedimage.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Jan 16 09:15:47 CET 2011


Revision: 55255
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55255&view=rev
Author:   eriktorbjorn
Date:     2011-01-16 08:15:47 +0000 (Sun, 16 Jan 2011)

Log Message:
-----------
SWORD25: Fix main menu button text colour

In the other cases I've found in the code, the colour components are
stored in the order B, G, R and A. Assume that's the case here too. I
hope that is correct. It doesn't seem to break anything obvious.

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp

Modified: scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp	2011-01-15 23:55:35 UTC (rev 55254)
+++ scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp	2011-01-16 08:15:47 UTC (rev 55255)
@@ -269,9 +269,9 @@
 			out = outo;
 			in = ino;
 			for (int j = 0; j < img->w; j++) {
-				int r = in[0];
+				int b = in[0];
 				int g = in[1];
-				int b = in[2];
+				int r = in[2];
 				int a = in[3];
 				in += inStep;
 
@@ -284,39 +284,39 @@
 					out += 4;
 					break;
 				case 255: // Full opacity
-					if (cr != 255)
-						*out++ = (r * cr) >> 8;
+					if (cb != 255)
+						*out++ = (b * cb) >> 8;
 					else
-						*out++ = r;
+						*out++ = b;
 
 					if (cg != 255)
 						*out++ = (g * cg) >> 8;
 					else
 						*out++ = g;
 
-					if (cb != 255)
-						*out++ = (b * cb) >> 8;
+					if (cr != 255)
+						*out++ = (r * cr) >> 8;
 					else
-						*out++ = b;
+						*out++ = r;
 
 					*out++ = a;
 					break;
 
 				default: // alpha blending
-					if (cr != 255)
-						*out += ((r - *out) * a * cr) >> 16;
+					if (cb != 255)
+						*out += ((b - *out) * a * cb) >> 16;
 					else
-						*out += ((r - *out) * a) >> 8;
+						*out += ((b - *out) * a) >> 8;
 					out++;
 					if (cg != 255)
 						*out += ((g - *out) * a * cg) >> 16;
 					else
 						*out += ((g - *out) * a) >> 8;
 					out++;
-					if (cb != 255)
-						*out += ((b - *out) * a * cb) >> 16;
+					if (cr != 255)
+						*out += ((r - *out) * a * cr) >> 16;
 					else
-						*out += ((b - *out) * a) >> 8;
+						*out += ((r - *out) * a) >> 8;
 					out++;
 					*out = 255;
 					out++;


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