mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 10:51:42 +00:00
Fix warning relating to max 0 with an unsigned variable
I've looked at the code above and can't see anything that would try to lower the value below 0 as it's mostly just addition and dividing
This commit is contained in:
parent
8750feb196
commit
23d9d1c26c
1 changed files with 3 additions and 3 deletions
|
|
@ -1228,13 +1228,13 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch,
|
||||||
colorbright = (blendcolor.s.red+blendcolor.s.green+blendcolor.s.blue)/3;
|
colorbright = (blendcolor.s.red+blendcolor.s.green+blendcolor.s.blue)/3;
|
||||||
|
|
||||||
tempcolor = (finalbright*blendcolor.s.red)/colorbright;
|
tempcolor = (finalbright*blendcolor.s.red)/colorbright;
|
||||||
tempcolor = min(255, max(0, tempcolor));
|
tempcolor = min(255, tempcolor);
|
||||||
cur->s.red = (UINT8)tempcolor;
|
cur->s.red = (UINT8)tempcolor;
|
||||||
tempcolor = (finalbright*blendcolor.s.green)/colorbright;
|
tempcolor = (finalbright*blendcolor.s.green)/colorbright;
|
||||||
tempcolor = min(255, max(0, tempcolor));
|
tempcolor = min(255, tempcolor);
|
||||||
cur->s.green = (UINT8)tempcolor;
|
cur->s.green = (UINT8)tempcolor;
|
||||||
tempcolor = (finalbright*blendcolor.s.blue)/colorbright;
|
tempcolor = (finalbright*blendcolor.s.blue)/colorbright;
|
||||||
tempcolor = min(255, max(0, tempcolor));
|
tempcolor = min(255, tempcolor);
|
||||||
cur->s.blue = (UINT8)tempcolor;
|
cur->s.blue = (UINT8)tempcolor;
|
||||||
cur->s.alpha = image->s.alpha;
|
cur->s.alpha = image->s.alpha;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue