From 73ae6739a586294f8b25ee82b01caaee1bb4563c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 23 Aug 2010 08:40:12 +0000 Subject: SWORD25: Finally fix alpha blending. svn-id: r53284 --- engines/sword25/gfx/opengl/glimage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/sword25/gfx') 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++; } } -- cgit v1.2.3