aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-23 08:40:12 +0000
committerEugene Sandulenko2010-10-12 23:16:00 +0000
commit73ae6739a586294f8b25ee82b01caaee1bb4563c (patch)
tree15b3bd53bfe4adcc6b66b708054c6a046d2a1806 /engines
parent08237f5d98f47162875ca0d25e3f10d287a3d97e (diff)
downloadscummvm-rg350-73ae6739a586294f8b25ee82b01caaee1bb4563c.tar.gz
scummvm-rg350-73ae6739a586294f8b25ee82b01caaee1bb4563c.tar.bz2
scummvm-rg350-73ae6739a586294f8b25ee82b01caaee1bb4563c.zip
SWORD25: Finally fix alpha blending.
svn-id: r53284
Diffstat (limited to 'engines')
-rw-r--r--engines/sword25/gfx/opengl/glimage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sword25/gfx/opengl/glimage.cpp b/engines/sword25/gfx/opengl/glimage.cpp
index 7a54c0b548..961215b4d4 100644
--- a/engines/sword25/gfx/opengl/glimage.cpp
+++ b/engines/sword25/gfx/opengl/glimage.cpp
@@ -229,13 +229,13 @@ bool GLImage::Blit(int PosX, int PosY, int Flipping, Common::Rect *pPartRect, un
*out++ = a;
break;
default: // alpha blending
- *out = (byte)(((b - *out) * a + *out) >> 8);
+ *out += (byte)(((b - *out) * a) >> 8);
out++;
- *out = (byte)(((g - *out) * a + *out) >> 8);
+ *out += (byte)(((g - *out) * a) >> 8);
out++;
- *out = (byte)(((r - *out) * a + *out) >> 8);
+ *out += (byte)(((r - *out) * a) >> 8);
out++;
- *out = a;
+ *out = 255;
out++;
}
}