- got rid of ksgn.
Because every bit of Build code that can be removed is a good thing.
This was only used in two places, one of which could be done better, the other one in the voxel drawer setup now uses a local C-inline version.
(cherry picked from commit 5536184bee)
This commit is contained in:
parent
b7d5110a49
commit
5d210c64e0
5 changed files with 7 additions and 35 deletions
|
|
@ -2907,6 +2907,11 @@ void R_DrawParticle_rgba(vissprite_t *vis)
|
|||
|
||||
extern double BaseYaspectMul;;
|
||||
|
||||
inline int sgn(int v)
|
||||
{
|
||||
return v < 0 ? -1 : v > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
void R_DrawVoxel(const FVector3 &globalpos, FAngle viewangle,
|
||||
const FVector3 &dasprpos, DAngle dasprang,
|
||||
fixed_t daxscale, fixed_t dayscale, FVoxel *voxobj,
|
||||
|
|
@ -3048,7 +3053,7 @@ void R_DrawVoxel(const FVector3 &globalpos, FAngle viewangle,
|
|||
xe += xi; ye += yi;
|
||||
}
|
||||
|
||||
i = ksgn(ys-backy)+ksgn(xs-backx)*3+4;
|
||||
i = sgn(ys - backy) + sgn(xs - backx) * 3 + 4;
|
||||
switch(i)
|
||||
{
|
||||
case 6: case 7: x1 = 0; y1 = 0; break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue