diff options
author | Johannes Schickel | 2006-05-30 16:48:15 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-05-30 16:48:15 +0000 |
commit | 94272b6ba8e9199bb314ca04521b5a4d5c1cc87a (patch) | |
tree | f213aa015c9746d79c05e6e3695fc68306b47801 /gui/ThemeNew.cpp | |
parent | 0612e74116754184689689df7835362464611cc0 (diff) | |
download | scummvm-rg350-94272b6ba8e9199bb314ca04521b5a4d5c1cc87a.tar.gz scummvm-rg350-94272b6ba8e9199bb314ca04521b5a4d5c1cc87a.tar.bz2 scummvm-rg350-94272b6ba8e9199bb314ca04521b5a4d5c1cc87a.zip |
Should fix drawing on systems with alpha mask.
svn-id: r22773
Diffstat (limited to 'gui/ThemeNew.cpp')
-rw-r--r-- | gui/ThemeNew.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp index 9fc9c06eda..5d533035aa 100644 --- a/gui/ThemeNew.cpp +++ b/gui/ThemeNew.cpp @@ -1638,6 +1638,7 @@ inline OverlayColor getColorAlphaImpl(OverlayColor col1, OverlayColor col2, int 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; + output |= ~(T::kRedMask | T::kGreenMask | T::kBlueMask); return output; } @@ -1648,6 +1649,7 @@ inline OverlayColor getColorAlphaImp2(OverlayColor col1, OverlayColor col2, int 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; + output |= ~(T::kRedMask | T::kGreenMask | T::kBlueMask); return output; } @@ -1673,6 +1675,7 @@ inline OverlayColor calcGradient(OverlayColor start, OverlayColor end, int pos) output |= (start + ((((end & T::kRedMask) - (start & T::kRedMask))) * pos >> 12)) & T::kRedMask; output |= (start + ((((end & T::kGreenMask) - (start & T::kGreenMask))) * pos >> 12)) & T::kGreenMask; output |= (start + ((((end & T::kBlueMask) - (start & T::kBlueMask))) * pos >> 12)) & T::kBlueMask; + output |= ~(T::kRedMask | T::kGreenMask | T::kBlueMask); return output; } |