mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Minor touchup to colorization code
This commit is contained in:
parent
179bb2bd8b
commit
ee60e6d76c
1 changed files with 6 additions and 2 deletions
|
|
@ -738,7 +738,7 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch,
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
// Ignore pure white & pitch black
|
// Ignore pure white & pitch black
|
||||||
if (brightness > 246 || brightness < 7)
|
if (brightness > 253 || brightness < 2)
|
||||||
{
|
{
|
||||||
cur->rgba = image->rgba;
|
cur->rgba = image->rgba;
|
||||||
cur++; image++; blendimage++;
|
cur++; image++; blendimage++;
|
||||||
|
|
@ -825,7 +825,11 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch,
|
||||||
if (skinnum == TC_RAINBOW)
|
if (skinnum == TC_RAINBOW)
|
||||||
{
|
{
|
||||||
UINT32 tempcolor;
|
UINT32 tempcolor;
|
||||||
UINT16 colorbright = 127; // an arbitrary value now, since blendcolor is always changing
|
UINT16 colorbright;
|
||||||
|
|
||||||
|
SETBRIGHTNESS(colorbright,blendcolor.s.red,blendcolor.s.green,blendcolor.s.blue);
|
||||||
|
if (colorbright == 0)
|
||||||
|
colorbright = 1; // no dividing by 0 please
|
||||||
|
|
||||||
tempcolor = (brightness * blendcolor.s.red) / colorbright;
|
tempcolor = (brightness * blendcolor.s.red) / colorbright;
|
||||||
tempcolor = min(255, tempcolor);
|
tempcolor = min(255, tempcolor);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue