------------------------------------------------------------------------------- */
+/* 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 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
/* convert_ase.c */
int ConvertBSPToASE( char *bspName );
+/* convert_obj.c */
+int ConvertBSPToOBJ( char *bspName );
+
/* brush.c */
sideRef_t *AllocSideRef( side_t *side, sideRef_t *next );
int EmitShader( const char *shader, int *contentFlags, int *surfaceFlags );
void BeginBSPFile( void );
-void EndBSPFile( void );
+void EndBSPFile( qboolean do_write );
void EmitBrushes( brush_t *brushes, int *firstBrush, int *numBrushes );
void EmitFogs( void );
,
#include "game_qfusion.h" /* qfusion game */
,
+ #include "game_reaction.h" /* must be after game_quake3.h */
+ ,
#include "game_darkplaces.h" /* vortex: darkplaces q1 engine */
,
#include "game_dq.h" /* vortex: deluxe quake game ( darkplaces q1 engine) */
Q_EXTERN qboolean debugPortals Q_ASSIGN( qfalse );
Q_EXTERN qboolean lightmapTriangleCheck Q_ASSIGN(qfalse);
Q_EXTERN qboolean lightmapExtraVisClusterNudge Q_ASSIGN(qfalse);
+Q_EXTERN qboolean lightmapFill Q_ASSIGN(qfalse);
+
+#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
+// this will affect anything that calls PlaneEqual() as well (which are, at the time
+// of this writing, FindFloatPlane() and AddBrushBevels()).
+Q_EXTERN double normalEpsilon Q_ASSIGN(0.00005);
+#else
Q_EXTERN double normalEpsilon Q_ASSIGN( 0.00001 );
+#endif
+
+#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,
+// maps should be constrained to about 2^15, otherwise slightly undesirable effects
+// may result. The 0.01 distanceEpsilon used previously is just too coarse in my
+// opinion. The real fix for this problem is to have 64 bit distances and then make
+// this epsilon even smaller, or to constrain world coordinates to plus minus 2^15
+// (or even 2^14).
+Q_EXTERN double distanceEpsilon Q_ASSIGN(0.005);
+#else
Q_EXTERN double distanceEpsilon Q_ASSIGN( 0.01 );
+#endif
/* bsp */
Q_EXTERN vec3_t floodlightRGB;
Q_EXTERN float floodlightIntensity Q_ASSIGN( 512.0f );
Q_EXTERN float floodlightDistance Q_ASSIGN( 1024.0f );
+Q_EXTERN float floodlightDirectionScale Q_ASSIGN( 1.0f );
Q_EXTERN qboolean dump Q_ASSIGN( qfalse );
Q_EXTERN qboolean debug Q_ASSIGN( qfalse );
// for .ase conversion
Q_EXTERN qboolean shadersAsBitmap Q_ASSIGN( qfalse );
+Q_EXTERN qboolean lightmapsAsTexcoord Q_ASSIGN( qfalse );
Q_EXTERN light_t *lights;
Q_EXTERN int numPointLights;