{-0.587785, -0.425325, -0.688191}, {-0.688191, -0.587785, -0.425325},
};
+#if 0
qbyte NormalToByte(const vec3_t n)
{
int i, best;
return y * (1.5f - (number * 0.5f * y * y));
}
-
// assumes "src" is normalized
void PerpendicularVector( vec3_t dst, const vec3_t src )
{
dst[2] = 0;
}
}
+#endif
// LordHavoc: like AngleVectors, but taking a forward vector instead of angles, useful!
/*-----------------------------------------------------------------*/
-void BoxOnPlaneSideClassify(mplane_t *p)
-{
- p->signbits = 0;
- if (p->normal[0] < 0) // 1
- p->signbits |= 1;
- if (p->normal[1] < 0) // 2
- p->signbits |= 2;
- if (p->normal[2] < 0) // 4
- p->signbits |= 4;
-}
-
void PlaneClassify(mplane_t *p)
{
+ // for optimized plane comparisons
if (p->normal[0] == 1)
p->type = 0;
else if (p->normal[1] == 1)
p->type = 2;
else
p->type = 3;
- BoxOnPlaneSideClassify(p);
+ // for BoxOnPlaneSide
+ p->signbits = 0;
+ if (p->normal[0] < 0) // 1
+ p->signbits |= 1;
+ if (p->normal[1] < 0) // 2
+ p->signbits |= 2;
+ if (p->normal[2] < 0) // 4
+ p->signbits |= 4;
}
int BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, const mplane_t *p)
}
}
+#if 0
void AngleMatrix (const vec3_t angles, const vec3_t translate, vec_t matrix[][4])
{
double angle, sr, sp, sy, cr, cp, cy;
matrix[2][2] = cr*cp;
matrix[2][3] = translate[2];
}
+#endif
// LordHavoc: renamed this to Length, and made the normal one a #define
palette_font[255] = 0;
}
-
+#if 0
void BuildGammaTable8(float prescale, float gamma, float scale, float base, qbyte *out)
{
int i, adjusted;
}
}
}
+#endif
void BuildGammaTable16(float prescale, float gamma, float scale, float base, unsigned short *out)
{