From e5979f2bc181e8eaffe4e2573e85a4f592cb3b29 Mon Sep 17 00:00:00 2001 From: p989 Date: Sun, 12 Jul 2009 04:55:58 +0000 Subject: [PATCH] fixed a blending bug --- desmume/src/aggdraw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/aggdraw.cpp b/desmume/src/aggdraw.cpp index e45850b97..a329014e0 100644 --- a/desmume/src/aggdraw.cpp +++ b/desmume/src/aggdraw.cpp @@ -87,9 +87,9 @@ namespace agg calc_type b = (rgb >> 10) & 31; calc_type g = (rgb >> 5) & 31; calc_type r = (rgb ) & 31; - b = ((r+1)*(alpha+1) + (cb)*(cover)-1)>>8; + b = ((b+1)*(alpha+1) + (cb)*(cover)-1)>>8; g = ((g+1)*(alpha+1) + (cg)*(cover)-1)>>8; - r = ((b+1)*(alpha+1) + (cr)*(cover)-1)>>8; + r = ((r+1)*(alpha+1) + (cr)*(cover)-1)>>8; *p = (b<<10)|(g<<5)|r; }