mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
organize conditions in a more optimized way
the most common condition (correct drawing) shouldn't be last, however it can't be first without making the conditions longer anyway. it's a nitpicky thing, but this is the renderer we're talking about here.
This commit is contained in:
parent
5e8be250a7
commit
ce4b5db494
1 changed files with 8 additions and 8 deletions
16
src/r_segs.c
16
src/r_segs.c
|
@ -1025,11 +1025,11 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
|
||||
#ifdef ESLOPE
|
||||
if (top_frac > (INT64)CLAMPMAX) sprtopscreen = windowtop = CLAMPMAX;
|
||||
else if (top_frac < (INT64)CLAMPMIN) sprtopscreen = windowtop = CLAMPMIN;
|
||||
else sprtopscreen = windowtop = (fixed_t)top_frac;
|
||||
else if (top_frac > (INT64)CLAMPMIN) sprtopscreen = windowtop = (fixed_t)top_frac;
|
||||
else sprtopscreen = windowtop = CLAMPMIN;
|
||||
if (bottom_frac > (INT64)CLAMPMAX) sprbotscreen = windowbottom = CLAMPMAX;
|
||||
else if (bottom_frac < (INT64)CLAMPMIN) sprbotscreen = windowbottom = CLAMPMIN;
|
||||
else sprbotscreen = windowbottom = (fixed_t)bottom_frac;
|
||||
else if (bottom_frac > (INT64)CLAMPMIN) sprbotscreen = windowbottom = (fixed_t)bottom_frac;
|
||||
else sprbotscreen = windowbottom = CLAMPMIN;
|
||||
|
||||
top_frac += top_step;
|
||||
bottom_frac += bottom_step;
|
||||
|
@ -1176,11 +1176,11 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
|
||||
#ifdef ESLOPE
|
||||
if (top_frac > (INT64)CLAMPMAX) sprtopscreen = windowtop = CLAMPMAX;
|
||||
else if (top_frac < (INT64)CLAMPMIN) sprtopscreen = windowtop = CLAMPMIN;
|
||||
else sprtopscreen = windowtop = (fixed_t)top_frac;
|
||||
else if (top_frac > (INT64)CLAMPMIN) sprtopscreen = windowtop = (fixed_t)top_frac;
|
||||
else sprtopscreen = windowtop = CLAMPMIN;
|
||||
if (bottom_frac > (INT64)CLAMPMAX) sprbotscreen = windowbottom = CLAMPMAX;
|
||||
else if (bottom_frac < (INT64)CLAMPMIN) sprbotscreen = windowbottom = CLAMPMIN;
|
||||
else sprbotscreen = windowbottom = (fixed_t)bottom_frac;
|
||||
else if (bottom_frac > (INT64)CLAMPMIN) sprbotscreen = windowbottom = (fixed_t)bottom_frac;
|
||||
else sprbotscreen = windowbottom = CLAMPMIN;
|
||||
|
||||
top_frac += top_step;
|
||||
bottom_frac += bottom_step;
|
||||
|
|
Loading…
Reference in a new issue