- Fixed problems with FillSub and FillRevSub drawers.

This commit is contained in:
Rachael Alexanderson 2016-12-26 08:05:04 -05:00
parent 5d6d75385e
commit 80228562b3

View file

@ -1610,9 +1610,9 @@ namespace swrenderer
int src_g = ((_srccolor >> 0) & 0xff) * _srcalpha;
int src_b = ((_srccolor >> 8) & 0xff) * _srcalpha;
int bg = *dest;
int r = MAX((src_r * _srcalpha - palette[bg].r * _destalpha)>>18, 0);
int g = MAX((src_g * _srcalpha - palette[bg].g * _destalpha)>>18, 0);
int b = MAX((src_b * _srcalpha - palette[bg].b * _destalpha)>>18, 0);
int r = MAX((-src_r + palette[bg].r * _destalpha)>>18, 0);
int g = MAX((-src_g + palette[bg].g * _destalpha)>>18, 0);
int b = MAX((-src_b + palette[bg].b * _destalpha)>>18, 0);
*dest = RGB256k.RGB[r][g][b];
dest += pitch;
@ -1667,9 +1667,9 @@ namespace swrenderer
int src_g = ((_srccolor >> 0) & 0xff) * _srcalpha;
int src_b = ((_srccolor >> 8) & 0xff) * _srcalpha;
int bg = *dest;
int r = MAX((src_r * _srcalpha - palette[bg].r * _destalpha)>>18, 0);
int g = MAX((src_g * _srcalpha - palette[bg].g * _destalpha)>>18, 0);
int b = MAX((src_b * _srcalpha - palette[bg].b * _destalpha)>>18, 0);
int r = MAX((src_r - palette[bg].r * _destalpha)>>18, 0);
int g = MAX((src_g - palette[bg].g * _destalpha)>>18, 0);
int b = MAX((src_b - palette[bg].b * _destalpha)>>18, 0);
*dest = RGB256k.RGB[r][g][b];
dest += pitch;