- fixed: blood decals are now red.

This commit is contained in:
Rachael Alexanderson 2016-12-19 05:02:44 -05:00
parent 1e9d48216c
commit 42fbe63584
2 changed files with 9 additions and 9 deletions

View file

@ -1462,9 +1462,9 @@ namespace swrenderer
{
uint32_t val = source[frac >> FRACBITS];
int r = (palette[*dest].r * (255-val)) >> 10;
int g = (palette[*dest].g * (255-val)) >> 10;
int b = (palette[*dest].b * (255-val)) >> 10;
int r = (palette[*dest].r * (255-val) + palette[_color].r * val) >> 10;
int g = (palette[*dest].g * (255-val) + palette[_color].g * val) >> 10;
int b = (palette[*dest].b * (255-val) + palette[_color].b * val) >> 10;
*dest = RGB256k.RGB[clamp(r,0,63)][clamp(g,0,63)][clamp(b,0,63)];
dest += pitch;

View file

@ -516,9 +516,9 @@ namespace swrenderer
do {
uint32_t val = *source;
int r = (palette[*dest].r * (255-val)) >> 10;
int g = (palette[*dest].g * (255-val)) >> 10;
int b = (palette[*dest].b * (255-val)) >> 10;
int r = (palette[*dest].r * (255-val) + palette[_color].r * val) >> 10;
int g = (palette[*dest].g * (255-val) + palette[_color].g * val) >> 10;
int b = (palette[*dest].b * (255-val) + palette[_color].b * val) >> 10;
*dest = RGB256k.RGB[clamp(r,0,63)][clamp(g,0,63)][clamp(b,0,63)];
source += 4;
dest += pitch;
@ -550,9 +550,9 @@ namespace swrenderer
for (int ks = 0; ks < 4; ks++)
{
val = source[ks];
int r = (palette[dest[ks]].r * (255-val)) >> 10;
int g = (palette[dest[ks]].g * (255-val)) >> 10;
int b = (palette[dest[ks]].b * (255-val)) >> 10;
int r = (palette[dest[ks]].r * (255-val) + palette[_color].r * val) >> 10;
int g = (palette[dest[ks]].g * (255-val) + palette[_color].g * val) >> 10;
int b = (palette[dest[ks]].b * (255-val) + palette[_color].b * val) >> 10;
dest[ks] = RGB256k.RGB[clamp(r,0,63)][clamp(g,0,63)][clamp(b,0,63)];
}