From de145064c89c71c9ed9dba79aae0dc1129ff31f0 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 10 Jan 2016 20:07:03 +0000 Subject: [PATCH] fix #2 git-svn-id: svn://kolibrios.org@6052 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/lib/patterns/rgb.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/programs/cmm/lib/patterns/rgb.h b/programs/cmm/lib/patterns/rgb.h index 869e840ffd..a837aa736c 100644 --- a/programs/cmm/lib/patterns/rgb.h +++ b/programs/cmm/lib/patterns/rgb.h @@ -4,7 +4,7 @@ struct _rgb byte r,g,b; void DwordToRgb(); dword RgbToDword(); -}; +} rgb; void _rgb::DwordToRgb(dword _dword) { @@ -21,9 +21,9 @@ dword _rgb::RgbToDword() return _b + _g + r; } -dword MixColors(dword _base, _overlying, byte a) +:dword MixColors(dword _base, _overlying, byte a) { - _rgb rgb1, rgb2, rgb; + _rgb rgb1, rgb2, rgb_final; byte n_a; rgb1.DwordToRgb(_base); @@ -31,9 +31,9 @@ dword MixColors(dword _base, _overlying, byte a) n_a = 255 - a; - rgb.b = calc(rgb1.b*a/255) + calc(rgb2.b*n_a/255); - rgb.g = calc(rgb1.g*a/255) + calc(rgb2.g*n_a/255); - rgb.r = calc(rgb1.r*a/255) + calc(rgb2.r*n_a/255); + rgb_final.b = calc(rgb1.b*a/255) + calc(rgb2.b*n_a/255); + rgb_final.g = calc(rgb1.g*a/255) + calc(rgb2.g*n_a/255); + rgb_final.r = calc(rgb1.r*a/255) + calc(rgb2.r*n_a/255); - return rgb.RgbToDword(); + return rgb_final.RgbToDword(); }