#define BSP_LUXEL_SIZE 3
#define RAD_LUXEL_SIZE 3
#define SUPER_LUXEL_SIZE 4
+#define SUPER_FLAG_SIZE 4
+#define FLAG_FORCE_SUBSAMPLING 1
+#define FLAG_ALREADY_SUBSAMPLED 2
#define SUPER_ORIGIN_SIZE 3
#define SUPER_NORMAL_SIZE 4
#define SUPER_DELUXEL_SIZE 3
#define BSP_LUXEL( s, x, y ) (lm->bspLuxels[ s ] + ((((y) * lm->w) + (x)) * BSP_LUXEL_SIZE))
#define RAD_LUXEL( s, x, y ) (lm->radLuxels[ s ] + ((((y) * lm->w) + (x)) * RAD_LUXEL_SIZE))
#define SUPER_LUXEL( s, x, y ) (lm->superLuxels[ s ] + ((((y) * lm->sw) + (x)) * SUPER_LUXEL_SIZE))
+#define SUPER_FLAG( x, y ) (lm->superFlags + ((((y) * lm->sw) + (x)) * SUPER_FLAG_SIZE))
#define SUPER_DELUXEL( x, y ) (lm->superDeluxels + ((((y) * lm->sw) + (x)) * SUPER_DELUXEL_SIZE))
#define BSP_DELUXEL( x, y ) (lm->bspDeluxels + ((((y) * lm->w) + (x)) * BSP_DELUXEL_SIZE))
#define SUPER_CLUSTER( x, y ) (lm->superClusters + (((y) * lm->sw) + (x)))
}
remap_t;
+typedef struct skinfile_s
+{
+ struct skinfile_s *next;
+ char name[ 1024 ];
+ char to[ MAX_QPATH ];
+}
+skinfile_t;
+
/* wingdi.h hack, it's the same: 0 */
#undef CM_NONE
qb_t noFog; /* ydnar: supress fogging */
qb_t clipModel; /* ydnar: solid model hack */
qb_t noVertexLight; /* ydnar: leave vertex color alone */
-
+ qb_t noDirty; /* jal: do not apply the dirty pass to this surface */
+
byte styleMarker; /* ydnar: light styles hack */
float vertexScale; /* vertex light scale */
int compileFlags; /* for determining surface compile flags traced through */
qboolean passSolid;
qboolean opaque;
+ vec_t forceSubsampling; /* needs subsampling (alphashadow), value = max color contribution possible from it */
/* working data */
int numTestNodes;
float *bspLuxels[ MAX_LIGHTMAPS ];
float *radLuxels[ MAX_LIGHTMAPS ];
float *superLuxels[ MAX_LIGHTMAPS ];
+ unsigned char *superFlags;
float *superOrigins;
float *superNormals;
int *superClusters;
/* model.c */
void PicoPrintFunc( int level, const char *str );
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, int lightmapSampleSize, float shadeAngle );
+picoModel_t *FindModel( const char *name, int frame );
+picoModel_t *LoadModel( const char *name, int frame );
+void InsertModel( const char *name, int skin, 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 );
,
#include "game_nexuiz.h"/* most be after game_quake3.h as they share defines! */
,
+ #include "game_xonotic.h"/* most be after game_quake3.h as they share defines! */
+ ,
#include "game_tremulous.h" /*LinuxManMikeC: must be after game_quake3.h, depends on #define's set in it */
,
#include "game_tenebrae.h"
Q_EXTERN qboolean skyFixHack Q_ASSIGN( qfalse ); /* ydnar */
Q_EXTERN qboolean bspAlternateSplitWeights Q_ASSIGN( qfalse ); /* 27 */
Q_EXTERN qboolean deepBSP Q_ASSIGN( qfalse ); /* div0 */
+Q_EXTERN qboolean maxAreaFaceSurface Q_ASSIGN( qfalse ); /* divVerent */
Q_EXTERN int patchSubdivisions Q_ASSIGN( 8 ); /* ydnar: -patchmeta subdivisions */
Q_EXTERN int numSurfacesByType[ NUM_SURFACE_TYPES ];
Q_EXTERN int numClearedSurfaces;
Q_EXTERN int numStripSurfaces;
+Q_EXTERN int numMaxAreaSurfaces;
Q_EXTERN int numFanSurfaces;
Q_EXTERN int numMergedSurfaces;
Q_EXTERN int numMergedVerts;
Q_EXTERN float shadeAngleDegrees Q_ASSIGN( 0.0f );
Q_EXTERN int superSample Q_ASSIGN( 0 );
Q_EXTERN int lightSamples Q_ASSIGN( 1 );
+Q_EXTERN qboolean lightRandomSamples Q_ASSIGN( qfalse );
+Q_EXTERN int lightSamplesSearchBoxSize Q_ASSIGN( 1 );
Q_EXTERN qboolean filter Q_ASSIGN( qfalse );
Q_EXTERN qboolean dark Q_ASSIGN( qfalse );
Q_EXTERN qboolean sunOnly Q_ASSIGN( qfalse );
allocated = def; \
while(reqitem >= allocated && allocated) \
allocated *= 2; \
- if(!allocated || allocated > 2147483647 / sizeof(*ptr)) \
+ if(!allocated || allocated > 2147483647 / (int)sizeof(*ptr)) \
{ \
Error(#ptr " over 2 GB"); \
} \