diff options
author | Johannes Schickel | 2006-05-29 14:30:21 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-05-29 14:30:21 +0000 |
commit | 2dd94dd247129026ca8d2b30e481052a389f4363 (patch) | |
tree | c7b8d0ba20552f8534b88381ccd21e26ffa3d038 /gui/ThemeNew.cpp | |
parent | c37d69df56a2cecce2fe0775aa838379ccf66d5b (diff) | |
download | scummvm-rg350-2dd94dd247129026ca8d2b30e481052a389f4363.tar.gz scummvm-rg350-2dd94dd247129026ca8d2b30e481052a389f4363.tar.bz2 scummvm-rg350-2dd94dd247129026ca8d2b30e481052a389f4363.zip |
Oops this reverts my last commit. :/
svn-id: r22742
Diffstat (limited to 'gui/ThemeNew.cpp')
-rw-r--r-- | gui/ThemeNew.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp index 85120bf303..724711ad26 100644 --- a/gui/ThemeNew.cpp +++ b/gui/ThemeNew.cpp @@ -1618,31 +1618,29 @@ inline OverlayColor getColorAlphaImpl(OverlayColor col1, OverlayColor col2, int } // broken implementation! -/*template<class T> +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) { - // 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 (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> |