#include "vfs.h"
#include "png.h"
#include "md4.h"
-
+#include "radiant_jpeglib.h"
#include <stdlib.h>
/* bsp */
#define MAX_PATCH_SIZE 32
#define MAX_BRUSH_SIDES 1024
-#define MAX_BUILD_SIDES 300
+#define MAX_BUILD_SIDES 1024
#define MAX_EXPANDED_AXIS 128
#define PORTALFILE "PRT1"
-#define MAX_PORTALS 32768
+#define MAX_PORTALS 0x20000 /* same as MAX_MAP_PORTALS */
#define MAX_SEPERATORS MAX_POINTS_ON_WINDING
#define MAX_POINTS_ON_FIXED_WINDING 24 /* ydnar: increased this from 12 at the expense of more memory */
#define MAX_PORTALS_ON_LEAF 1024
}
surfaceParm_t;
+typedef enum
+{
+ MINIMAP_MODE_GRAY,
+ MINIMAP_MODE_BLACK,
+ MINIMAP_MODE_WHITE
+}
+miniMapMode_t;
typedef struct game_s
{
float lightmapCompensate; /* default lightmap compensate value */
float gridScale; /* vortex: default lightgrid scale (affects both directional and ambient spectres) */
float gridAmbientScale; /* vortex: default lightgrid ambient spectre scale */
+ qboolean lightAngleHL; /* jal: use half-lambert curve for light angle attenuation */
qboolean noStyles; /* use lightstyles hack or not */
qboolean keepLights; /* keep light entities on bsp */
int patchSubdivisions; /* default patch subdivisions tolerance */
qboolean patchShadows; /* patch casting enabled */
qboolean deluxeMap; /* compile deluxemaps */
int deluxeMode; /* deluxemap mode (0 - modelspace, 1 - tangentspace with renormalization, 2 - tangentspace without renormalization) */
+ int miniMapSize; /* minimap size */
+ float miniMapSharpen; /* minimap sharpening coefficient */
+ float miniMapBorder; /* minimap border amount */
+ qboolean miniMapKeepAspect; /* minimap keep aspect ratio by letterboxing */
+ miniMapMode_t miniMapMode; /* minimap mode */
+ char *miniMapNameFormat; /* minimap name format */
char *bspIdent; /* 4-letter bsp file prefix */
int bspVersion; /* bsp version to use */
qboolean lumpSwap; /* cod-style len/ofs order */
shaderInfo_t *celShader; /* :) */
/* ydnar: gs mods */
+ int lightmapSampleSize; /* jal : entity based _lightmapsamplesize */
float lightmapScale;
+ float shadeAngleDegrees; /* jal : entity based _shadeangle */
vec3_t eMins, eMaxs;
indexMap_t *im;
shaderInfo_t *celShader; /* :) */
/* ydnar: gs mods */
+ int lightmapSampleSize; /* jal : entity based _lightmapsamplesize */
float lightmapScale;
vec3_t eMins, eMaxs;
indexMap_t *im;
/* ydnar: per-surface (per-entity, actually) lightmap sample size scaling */
float lightmapScale;
+
+ /* jal: per-surface (per-entity, actually) shadeangle */
+ float shadeAngleDegrees;
/* ydnar: surface classification */
vec3_t mins, maxs;
shaderInfo_t *si;
side_t *side;
int entityNum, surfaceNum, planeNum, fogNum, sampleSize, castShadows, recvShadows;
+ float shadeAngleDegrees;
vec4_t plane;
vec3_t lightmapAxis;
int indexes[ 3 ];
int firstBrush, numBrushes; /* only valid during BSP compile */
epair_t *epairs;
vec3_t originbrush_origin;
- qboolean forceNormalSmoothing; /* vortex: true if entity has _smoothnormals/_sn/_smooth key */
}
entity_t;
float radiusByDist; /* for spotlights */
float fade; /* ydnar: from wolf, for linear lights */
float angleScale; /* ydnar: stolen from vlight for K */
+ float extraDist; /* "extra dimension" distance of the light, to kill hot spots */
float add; /* ydnar: used for area lights */
float envelope; /* ydnar: units until falloff < tolerance */
/* input and output */
vec3_t color; /* starts out at full color, may be reduced if transparent surfaces are crossed */
vec3_t colorNoShadow; /* result color with no shadow casting */
+ vec3_t directionContribution; /* result contribution to the deluxe map */
/* output */
vec3_t hit;
void PicoLoadFileFunc( char *name, byte **buffer, int *bufSize );
picoModel_t *FindModel( char *name, int frame );
picoModel_t *LoadModel( char *name, int frame );
-void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shaderInfo_t *celShader, int eNum, int castShadows, int recvShadows, int spawnFlags, float lightmapScale );
+void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shaderInfo_t *celShader, int eNum, int castShadows, int recvShadows, int spawnFlags, float lightmapScale, int lightmapSampleSize, float shadeAngle );
void AddTriangleModels( entity_t *e );
Q_EXTERN char inbase[ MAX_QPATH ];
Q_EXTERN char globalCelShader[ MAX_QPATH ];
-/* other bits */
-Q_EXTERN int totalvis;
-
Q_EXTERN float farPlaneDist; /* rr2do2, rf, mre, ydnar all contributed to this one... */
Q_EXTERN int numportals;
/* commandline arguments */
Q_EXTERN qboolean wolfLight Q_ASSIGN( qfalse );
+Q_EXTERN float extraDist Q_ASSIGN( 0.0f );
Q_EXTERN qboolean loMem Q_ASSIGN( qfalse );
Q_EXTERN qboolean noStyles Q_ASSIGN( qfalse );
Q_EXTERN qboolean keepLights Q_ASSIGN( qfalse );
Q_EXTERN qboolean sunOnly Q_ASSIGN( qfalse );
Q_EXTERN int approximateTolerance Q_ASSIGN( 0 );
Q_EXTERN qboolean noCollapse Q_ASSIGN( qfalse );
+Q_EXTERN int lightmapSearchBlockSize Q_ASSIGN( 0 );
Q_EXTERN qboolean exportLightmaps Q_ASSIGN( qfalse );
Q_EXTERN qboolean externalLightmaps Q_ASSIGN( qfalse );
Q_EXTERN int lmCustomSize Q_ASSIGN( LIGHTMAP_WIDTH );
Q_EXTERN char * lmCustomDir Q_ASSIGN( NULL );
+Q_EXTERN int lmLimitSize Q_ASSIGN( 0 );
Q_EXTERN qboolean dirty Q_ASSIGN( qfalse );
Q_EXTERN qboolean dirtDebug Q_ASSIGN( qfalse );
Q_EXTERN float areaScale Q_ASSIGN( 0.25f );
Q_EXTERN float skyScale Q_ASSIGN( 1.0f );
Q_EXTERN float bounceScale Q_ASSIGN( 0.25f );
+
+/* jal: alternative angle attenuation curve */
+Q_EXTERN qboolean lightAngleHL Q_ASSIGN( qfalse );
/* vortex: gridscale and gridambientscale */
Q_EXTERN float gridScale Q_ASSIGN( 1.0f );
Q_EXTERN float gridAmbientScale Q_ASSIGN( 1.0f );
+Q_EXTERN float gridDirectionality Q_ASSIGN( 1.0f );
+Q_EXTERN float gridAmbientDirectionality Q_ASSIGN( 0.0f );
+Q_EXTERN qboolean inGrid Q_ASSIGN(0);
/* ydnar: lightmap gamma/compensation */
Q_EXTERN float lightmapGamma Q_ASSIGN( 1.0f );
Q_EXTERN bspShader_t* bspShaders Q_ASSIGN(0);
Q_EXTERN int bspEntDataSize Q_ASSIGN( 0 );
-Q_EXTERN char bspEntData[ MAX_MAP_ENTSTRING ];
+Q_EXTERN int allocatedBSPEntData Q_ASSIGN( 0 );
+Q_EXTERN char *bspEntData Q_ASSIGN(0);
Q_EXTERN int numBSPLeafs Q_ASSIGN( 0 );
Q_EXTERN bspLeaf_t bspLeafs[ MAX_MAP_LEAFS ];