aboutsummaryrefslogtreecommitdiff
path: root/gui/newgui.cpp
diff options
context:
space:
mode:
authorMax Horn2002-12-13 23:17:47 +0000
committerMax Horn2002-12-13 23:17:47 +0000
commite1b29ce16ce1e58d2dc8abf81ef410b201ffdf9e (patch)
treee08995b2b4d80795b00738ef542171ea2869b21e /gui/newgui.cpp
parentdbb6c8495a80cc3ca0e0c9097989d6ed281605b9 (diff)
downloadscummvm-rg350-e1b29ce16ce1e58d2dc8abf81ef410b201ffdf9e.tar.gz
scummvm-rg350-e1b29ce16ce1e58d2dc8abf81ef410b201ffdf9e.tar.bz2
scummvm-rg350-e1b29ce16ce1e58d2dc8abf81ef410b201ffdf9e.zip
playing a bit with the alpha level
svn-id: r5941
Diffstat (limited to 'gui/newgui.cpp')
-rw-r--r--gui/newgui.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 4eed45e9df..8b191b2077 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -317,18 +317,22 @@ void NewGui::line(int x, int y, int x2, int y2, int16 color)
void NewGui::blendRect(int x, int y, int w, int h, int16 color)
{
+ #define ALPHA_LEVEL 2
uint8 r, g, b;
uint8 ar, ag, ab;
_system->colorToRBG(color, r, g, b);
- r *= 3;
- g *= 3;
- b *= 3;
+
+ r *= ALPHA_LEVEL;
+ g *= ALPHA_LEVEL;
+ b *= ALPHA_LEVEL;
int16 *ptr = getBasePtr(x, y);
while (h--) {
for (int i = 0; i < w; i++) {
_system->colorToRBG(ptr[i], ar, ag, ab);
- ptr[i] = _system->RBGToColor((ar+r)/4, (ag+g)/4, (ab+b)/4);
+ ptr[i] = _system->RBGToColor((ar+r)/(ALPHA_LEVEL+1),
+ (ag+g)/(ALPHA_LEVEL+1),
+ (ab+b)/(ALPHA_LEVEL+1));
}
ptr += _screenPitch;
}