- 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.
This commit is contained in:
Christoph Oelckers 2016-12-09 00:41:34 +01:00
commit 5536184bee
5 changed files with 7 additions and 35 deletions

View file

@ -2701,6 +2701,11 @@ void R_DrawParticle_C (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,
@ -2840,7 +2845,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;