From 450b6de384aae0d71d2bcfba6c967e57b37faed0 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 25 Jan 2016 21:31:21 -0600 Subject: [PATCH] cRGBT::A should return 255, not 1. Whoops. --- src/textures/bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textures/bitmap.h b/src/textures/bitmap.h index b8494efaf..15a0ffc29 100644 --- a/src/textures/bitmap.h +++ b/src/textures/bitmap.h @@ -189,7 +189,7 @@ struct cRGBT static __forceinline unsigned char R(const unsigned char * p) { return p[0]; } static __forceinline unsigned char G(const unsigned char * p) { return p[1]; } static __forceinline unsigned char B(const unsigned char * p) { return p[2]; } - static __forceinline unsigned char A(const unsigned char * p, BYTE r, BYTE g, BYTE b) { return p[0] != r || p[1] != g || p[2] != b; } + static __forceinline unsigned char A(const unsigned char * p, BYTE r, BYTE g, BYTE b) { return (p[0] != r || p[1] != g || p[2] != b) ? 255 : 0; } static __forceinline int Gray(const unsigned char * p) { return (p[0]*77 + p[1]*143 + p[2]*36)>>8; } };