diff options
author | Andrey Nazarov <skuller@skuller.net> | 2007-08-15 21:10:45 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2007-08-15 21:10:45 +0000 |
commit | 973f693af765ecfb2007398fb023a07bc4685030 (patch) | |
tree | f7610f12a0ad02ce95661d3d0757346f69308769 /source/q_shared.h | |
parent | d876b69b388528fd3236f2f05caac22345a798f4 (diff) |
Added --hard-link option to configure.
Link in assembly version of BoxOnPlaneSide.
Added simple game DLL interface for describing enhanced features.
Changed some renderer algorithms to do half of the
recurion path in simple cylce.
Diffstat (limited to 'source/q_shared.h')
-rw-r--r-- | source/q_shared.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/q_shared.h b/source/q_shared.h index 5e022db..325b518 100644 --- a/source/q_shared.h +++ b/source/q_shared.h @@ -275,7 +275,6 @@ void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]); void R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]); void AngleVectors (vec3_t angles, vec3_t forward, vec3_t right, vec3_t up); -int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *plane); static inline float LerpAngle( float a2, float a1, float frac ) { if (a1 - a2 > 180) @@ -720,6 +719,21 @@ void SetPlaneSignbits( cplane_t *plane ); int BoxOnPlaneSide( vec3_t emins, vec3_t emaxs, cplane_t *p ); +static inline int BoxOnPlaneSideFast( vec3_t emins, vec3_t emaxs, cplane_t *p ) { + // fast axial cases + if( p->type < 3 ) { + if( p->dist <= emins[p->type] ) + return 1; + if( p->dist >= emaxs[p->type] ) + return 2; + return 3; + } + + // slow generic case + return BoxOnPlaneSide( emins, emaxs, p ); +} + + typedef struct csurface_s { char name[16]; |