From: rambetter Date: Wed, 12 Jan 2011 03:21:31 +0000 (+0000) Subject: Renaming #define constants: X-Git-Tag: xonotic-v0.7.0~16^2~12^2~17 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3b0589dd8bc8a97c1ad47f77a24b8bb33c9f37b1;p=xonotic%2Fnetradiant.git Renaming #define constants: EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES -> Q3MAP2_EXPERIMENTAL_HIGH_PRECISION_MATH_FIXES EXPERIMENTAL_SNAP_NORMAL_FIX -> Q3MAP2_EXPERIMENTAL_SNAP_NORMAL_FIX EXPERIMENTAL_SNAP_PLANE_FIX -> Q3MAP2_EXPERIMENTAL_SNAP_PLANE_FIX git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@423 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- diff --git a/tools/quake3/q3map2/brush.c b/tools/quake3/q3map2/brush.c index 12754085..1093be3b 100644 --- a/tools/quake3/q3map2/brush.c +++ b/tools/quake3/q3map2/brush.c @@ -458,7 +458,7 @@ returns false if the brush doesn't enclose a valid volume qboolean CreateBrushWindings( brush_t *brush ) { int i, j; -#if EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES +#if Q3MAP2_EXPERIMENTAL_HIGH_PRECISION_MATH_FIXES winding_accu_t *w; #else winding_t *w; @@ -475,7 +475,7 @@ qboolean CreateBrushWindings( brush_t *brush ) plane = &mapplanes[ side->planenum ]; /* make huge winding */ -#if EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES +#if Q3MAP2_EXPERIMENTAL_HIGH_PRECISION_MATH_FIXES w = BaseWindingForPlaneAccu(plane->normal, plane->dist); #else w = BaseWindingForPlane( plane->normal, plane->dist ); @@ -491,14 +491,14 @@ qboolean CreateBrushWindings( brush_t *brush ) if( brush->sides[ j ].bevel ) continue; plane = &mapplanes[ brush->sides[ j ].planenum ^ 1 ]; -#if EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES +#if Q3MAP2_EXPERIMENTAL_HIGH_PRECISION_MATH_FIXES ChopWindingInPlaceAccu(&w, plane->normal, plane->dist, 0); #else ChopWindingInPlace( &w, plane->normal, plane->dist, 0 ); // CLIP_EPSILON ); #endif /* ydnar: fix broken windings that would generate trifans */ -#if EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES +#if Q3MAP2_EXPERIMENTAL_HIGH_PRECISION_MATH_FIXES // I think it's better to FixWindingAccu() once after we chop with all planes // so that error isn't multiplied. There is nothing natural about welding // the points unless they are the final endpoints. ChopWindingInPlaceAccu() @@ -509,7 +509,7 @@ qboolean CreateBrushWindings( brush_t *brush ) } /* set side winding */ -#if EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES +#if Q3MAP2_EXPERIMENTAL_HIGH_PRECISION_MATH_FIXES if (w != NULL) { FixWindingAccu(w); diff --git a/tools/quake3/q3map2/map.c b/tools/quake3/q3map2/map.c index 330e2de5..4ec5a381 100644 --- a/tools/quake3/q3map2/map.c +++ b/tools/quake3/q3map2/map.c @@ -160,7 +160,7 @@ Returns qtrue if and only if the normal was adjusted. qboolean SnapNormal( vec3_t normal ) { -#if EXPERIMENTAL_SNAP_NORMAL_FIX +#if Q3MAP2_EXPERIMENTAL_SNAP_NORMAL_FIX int i; qboolean adjusted = qfalse; @@ -338,7 +338,7 @@ int FindFloatPlane( vec3_t normal, vec_t dist, int numPoints, vec3_t *points ) vec_t d; -#if EXPERIMENTAL_SNAP_PLANE_FIX +#if Q3MAP2_EXPERIMENTAL_SNAP_PLANE_FIX SnapPlaneImproved(normal, &dist, numPoints, (const vec3_t *) points); #else SnapPlane( normal, &dist ); @@ -389,7 +389,7 @@ int FindFloatPlane( vec3_t normal, vec_t dist, int numPoints, vec3_t *points ) int i; plane_t *p; -#if EXPERIMENTAL_SNAP_PLANE_FIX +#if Q3MAP2_EXPERIMENTAL_SNAP_PLANE_FIX SnapPlaneImproved(normal, &dist, numPoints, (const vec3_t *) points); #else SnapPlane( normal, &dist ); @@ -417,7 +417,7 @@ takes 3 points and finds the plane they lie in int MapPlaneFromPoints( vec3_t *p ) { -#if EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES +#if Q3MAP2_EXPERIMENTAL_HIGH_PRECISION_MATH_FIXES vec3_accu_t paccu[3]; vec3_accu_t t1, t2, normalAccu; vec3_t normal; diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index 0199d653..7b907365 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -124,9 +124,9 @@ constants /* temporary hacks and tests (please keep off in SVN to prevent anyone's legacy map from screwing up) */ /* 2011-01-10 TTimo says we should turn these on in SVN, so turning on now */ -#define EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES 1 -#define EXPERIMENTAL_SNAP_NORMAL_FIX 1 -#define EXPERIMENTAL_SNAP_PLANE_FIX 1 +#define Q3MAP2_EXPERIMENTAL_HIGH_PRECISION_MATH_FIXES 1 +#define Q3MAP2_EXPERIMENTAL_SNAP_NORMAL_FIX 1 +#define Q3MAP2_EXPERIMENTAL_SNAP_PLANE_FIX 1 /* general */ #define MAX_QPATH 64 @@ -1931,7 +1931,7 @@ Q_EXTERN qboolean debugSurfaces Q_ASSIGN( qfalse ); Q_EXTERN qboolean debugInset Q_ASSIGN( qfalse ); Q_EXTERN qboolean debugPortals Q_ASSIGN( qfalse ); -#if EXPERIMENTAL_SNAP_NORMAL_FIX +#if Q3MAP2_EXPERIMENTAL_SNAP_NORMAL_FIX // Increasing the normalEpsilon to compensate for new logic in SnapNormal(), where // this epsilon is now used to compare against 0 components instead of the 1 or -1 // components. Unfortunately, normalEpsilon is also used in PlaneEqual(). So changing @@ -1942,7 +1942,7 @@ Q_EXTERN double normalEpsilon Q_ASSIGN(0.00005); Q_EXTERN double normalEpsilon Q_ASSIGN( 0.00001 ); #endif -#if EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES +#if Q3MAP2_EXPERIMENTAL_HIGH_PRECISION_MATH_FIXES // NOTE: This distanceEpsilon is too small if parts of the map are at maximum world // extents (in the range of plus or minus 2^16). The smallest epsilon at values // close to 2^16 is about 0.007, which is greater than distanceEpsilon. Therefore,