[Scummvm-cvs-logs] SF.net SVN: scummvm: [22741] scummvm/trunk/gui/ThemeNew.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Mon May 29 07:22:01 CEST 2006


Revision: 22741
Author:   lordhoto
Date:     2006-05-29 07:21:07 -0700 (Mon, 29 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22741&view=rev

Log Message:
-----------
- comments out getColorAlphaImp2
- adds note in getColorAlpha about we handle negative alpha values currently (could be removed when getColorAlphaImp2 get's fixed)

Modified Paths:
--------------
    scummvm/trunk/gui/ThemeNew.cpp
Modified: scummvm/trunk/gui/ThemeNew.cpp
===================================================================
--- scummvm/trunk/gui/ThemeNew.cpp	2006-05-29 14:16:52 UTC (rev 22740)
+++ scummvm/trunk/gui/ThemeNew.cpp	2006-05-29 14:21:07 UTC (rev 22741)
@@ -1617,29 +1617,32 @@
 	return output;
 }
 
-template<class T>
+// broken implementation!
+/*template<class T>
 inline OverlayColor getColorAlphaImp2(OverlayColor col1, OverlayColor col2, int alpha) {
 	OverlayColor output = 0;
 	output |= ((alpha * ((~col1 & T::kRedMask) - (col2 & T::kRedMask)) >> 8) + (col2 & T::kRedMask)) & T::kRedMask;
 	output |= ((alpha * ((~col1 & T::kGreenMask) - (col2 & T::kGreenMask)) >> 8) + (col2 & T::kGreenMask)) & T::kGreenMask;
 	output |= ((alpha * ((~col1 & T::kBlueMask) - (col2 & T::kBlueMask)) >> 8) + (col2 & T::kBlueMask)) & T::kBlueMask;
 	return output;
-}
+}*/
 
 OverlayColor getColorAlpha(OverlayColor col1, OverlayColor col2, int alpha) {
-	if (alpha >= 0) {
+	// disbale alpha >= 0 check for now, since we are using calcDimColor in drawSurfaceMasked for negative
+	// alpha values at the moment until getColorAlphaImp2 is fixed
+	//if (alpha >= 0) {
 		if (gBitFormat == 565) {
 			return getColorAlphaImpl<ColorMasks<565> >(col1, col2, alpha);
 		} else {
 			return getColorAlphaImpl<ColorMasks<555> >(col1, col2, alpha);
 		}
-	} else {
+	/*} else {
 		if (gBitFormat == 565) {
 			return getColorAlphaImp2<ColorMasks<565> >(col1, col2, -alpha - 256);
 		} else {
 			return getColorAlphaImp2<ColorMasks<555> >(col1, col2, -alpha - 256);
 		}
-	}
+	}*/
 }
 
 template<class T>


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