From 385552ceab18ed968f12f6612159452510415048 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 27 Jul 2012 21:04:00 +0100 Subject: [PATCH] Correct blending of SetPixel without alpha channel --- src/graphics/Graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/Graphics.cpp b/src/graphics/Graphics.cpp index 2b12b1d38..ac6878c24 100644 --- a/src/graphics/Graphics.cpp +++ b/src/graphics/Graphics.cpp @@ -73,7 +73,7 @@ TPT_INLINE void VideoBuffer::SetPixel(int x, int y, int r, int g, int b, int a) #ifdef PIX32OGL Buffer[y*(Width)+x] = PIXRGBA(r,g,b,a); #else - Buffer[y*(Width)+x] = PIXRGB(r,g,b); + Buffer[y*(Width)+x] = PIXRGB((r*a)>>8, (g*a)>>8, (b*a)>>8); #endif }