From 225c332ba310adef15fb3c150e02fa5d2bd3bbb2 Mon Sep 17 00:00:00 2001 From: damdoum Date: Sun, 7 Jan 2007 11:46:34 +0000 Subject: [PATCH] alpha blending corrected (?) --- desmume/src/GPU.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desmume/src/GPU.c b/desmume/src/GPU.c index 2383ec8d7..fed165d1e 100644 --- a/desmume/src/GPU.c +++ b/desmume/src/GPU.c @@ -579,9 +579,9 @@ INLINE void renderline_setFinalColor(GPU *gpu,u32 passing,u8 bgnum,u8 *dst,u16 c u16 sourceG = (((color>>5) & 0x1F) * sourceFraction) >> 4 ; u16 sourceB = (((color>>10) & 0x1F) * sourceFraction) >> 4 ; color = T2ReadWord(dst, passing) ; - u16 targetR = ((color & 0x1F) * sourceFraction) >> 4 ; - u16 targetG = (((color>>5) & 0x1F) * sourceFraction) >> 4 ; - u16 targetB = (((color>>10) & 0x1F) * sourceFraction) >> 4 ; + u16 targetR = ((color & 0x1F) * targetFraction) >> 4 ; + u16 targetG = (((color>>5) & 0x1F) * targetFraction) >> 4 ; + u16 targetB = (((color>>10) & 0x1F) * targetFraction) >> 4 ; targetR = min(0x1F,targetR+sourceR) ; targetG = min(0x1F,targetG+sourceG) ; targetB = min(0x1F,targetB+sourceB) ;