From 4ac8f5eae4803438ef467c8b40da768ae7d7a595 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 4 Aug 2012 03:01:17 +0000 Subject: [PATCH] - Fixed: FMultiPatchTexture::CopyTrueColorPixels() set up the alpha values backwards for blend mode BLEND_OVERLAY. SVN r3806 (trunk) --- src/textures/multipatchtexture.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index 1a884472a..5d5f61062 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -608,10 +608,11 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rota } else { - info.blendcolor[3] = b.a * FRACUNIT / 255; - info.blendcolor[0] = b.r * (FRACUNIT-info.blendcolor[3]); - info.blendcolor[1] = b.g * (FRACUNIT-info.blendcolor[3]); - info.blendcolor[2] = b.b * (FRACUNIT-info.blendcolor[3]); + fixed_t blendalpha = b.a * FRACUNIT / 255; + info.blendcolor[0] = b.r * blendalpha; + info.blendcolor[1] = b.g * blendalpha; + info.blendcolor[2] = b.b * blendalpha; + info.blendcolor[3] = FRACUNIT - blendalpha; info.blend = BLEND_OVERLAY; } }