From 70cd69363ac0c6796edc00ab8d63c73bf68b03b3 Mon Sep 17 00:00:00 2001 From: Alex Marshall Date: Thu, 19 Aug 2010 22:39:15 -0700 Subject: Small issue in RGB5A3's toBitMap function that caused alpha degradation --- zetsubou/tpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zetsubou') diff --git a/zetsubou/tpl.c b/zetsubou/tpl.c index 893ad3b..42fa542 100644 --- a/zetsubou/tpl.c +++ b/zetsubou/tpl.c @@ -268,7 +268,7 @@ int TPL_ConvertRGB5A3ToBitMap(u8* tplbuf, u32 tplsize, u32 tplpoint, u8** bitmap (*(u32**)bitmapdata)[x + (y * width)] = rgba; }else{ // RGB4A3 - u8 a = (((oldpixel >> 12) & 0x7) * 64) / 7; + u8 a = (((oldpixel >> 12) & 0x7) * 255) / 7; u8 r = (((oldpixel >> 8) & 0xF) * 255) / 15; u8 g = (((oldpixel >> 4) & 0xF) * 255) / 15; u8 b = (((oldpixel >> 0) & 0xF) * 255) / 15; -- cgit v1.3.1