X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=model_brush.h;h=511c56f0c75f5eecf554f3942de80e266dc9d382;hb=9e0a39f4d5add83a1c31892e0d523098979c5612;hp=7fe0a591d82325360ae24f4d966ecfe8e61d2435;hpb=f9d8bc7ea04ff91fcbd90fe50a299b37724b349b;p=xonotic%2Fdarkplaces.git diff --git a/model_brush.h b/model_brush.h index 7fe0a591..511c56f0 100644 --- a/model_brush.h +++ b/model_brush.h @@ -63,8 +63,6 @@ mplane_t; //#define SURF_PLANEBACK 2 -// set for anything to be transparent sorted -#define MATERIALFLAG_TRANSPARENT 1 // use alpha blend on this material #define MATERIALFLAG_ALPHA 2 // use additive blend on this material @@ -86,6 +84,23 @@ mplane_t; #define MATERIALFLAG_NODRAW 512 // probably used only on q1bsp water #define MATERIALFLAG_LIGHTBOTHSIDES 1024 +// use alpha test on this material +#define MATERIALFLAG_ALPHATEST 2048 +// treat this material as a blended transparency (as opposed to an alpha test +// transparency), this causes special fog behavior, and disables glDepthMask +#define MATERIALFLAG_BLENDED 4096 +// render using a custom blendfunc +#define MATERIALFLAG_CUSTOMBLEND 8192 +// do not cast shadows from this material +#define MATERIALFLAG_NOSHADOW 16384 +// render using vertex alpha (q3bsp) as texture blend parameter between foreground (normal) skinframe and background skinframe +#define MATERIALFLAG_VERTEXTEXTUREBLEND 32768 +// disables GL_CULL_FACE on this texture (making it double sided) +#define MATERIALFLAG_NOCULLFACE 65536 +// render after the normal scene +#define MATERIALFLAG_VIEWMODEL 131072 +// combined mask of all attributes that require depth sorted rendering +#define MATERIALFLAGMASK_DEPTHSORTED (MATERIALFLAG_BLENDED | MATERIALFLAG_NODEPTHTEST | MATERIALFLAG_VIEWMODEL) typedef struct medge_s { @@ -106,6 +121,8 @@ typedef struct mnode_s // for bounding box culling vec3_t mins; vec3_t maxs; + // supercontents from all brushes inside this node or leaf + int combinedsupercontents; // this part unique to node struct mnode_s *children[2]; @@ -125,16 +142,19 @@ typedef struct mleaf_s // for bounding box culling vec3_t mins; vec3_t maxs; + // supercontents from all brushes inside this node or leaf + int combinedsupercontents; // this part unique to leaf // common int clusterindex; // -1 is not in pvs, >= 0 is pvs bit number int areaindex; // q3bsp + int containscollisionsurfaces; // indicates whether the leafsurfaces contains q3 patches int numleafsurfaces; int *firstleafsurface; int numleafbrushes; // q3bsp int *firstleafbrush; // q3bsp - qbyte ambient_sound_level[NUM_AMBIENTS]; // q1bsp + unsigned char ambient_sound_level[NUM_AMBIENTS]; // q1bsp int contents; // q1bsp: // TODO: remove (only used temporarily during loading when making collision hull 0) int portalmarkid; // q1bsp // used by see-polygon-through-portals visibility checker } @@ -174,43 +194,6 @@ typedef struct svbspmesh_s } svbspmesh_t; -typedef struct mlight_s -{ - // location of light - vec3_t origin; - // distance attenuation scale (smaller is a larger light) - float falloff; - // color and brightness combined - vec3_t light; - // brightness bias, used for limiting radius without a hard edge - float subtract; - // spotlight direction - vec3_t spotdir; - // cosine of spotlight cone angle (or 0 if not a spotlight) - float spotcone; - // distance bias (larger value is softer and darker) - float distbias; - // light style controlling this light - int style; - // maximum extent of the light for shading purposes - float lightradius; - // maximum extent of the light for culling purposes - float cullradius; - float cullradius2; - /* - // surfaces this shines on - int numsurfaces; - msurface_t **surfaces; - // lit area - vec3_t mins, maxs; - // precomputed shadow volume meshs - //svbspmesh_t *shadowvolume; - //vec3_t shadowvolumemins, shadowvolumemaxs; - shadowmesh_t *shadowvolume; - */ -} -mlight_t; - // Q2 bsp stuff #define Q2BSPVERSION 38 @@ -245,7 +228,7 @@ typedef struct q2dheader_s { int ident; int version; - lump_t lumps[HEADER_LUMPS]; + lump_t lumps[Q2HEADER_LUMPS]; } q2dheader_t; typedef struct q2dmodel_s @@ -419,7 +402,7 @@ typedef struct q3dheader_s { int ident; int version; - lump_t lumps[HEADER_LUMPS]; + lump_t lumps[Q3HEADER_LUMPS]; } q3dheader_t; typedef struct q3dtexture_s @@ -660,15 +643,17 @@ q3dpvs_t; #define Q3SURFACEPARM_TRANS 16777216 #define Q3SURFACEPARM_WATER 33554432 #define Q3SURFACEPARM_POINTLIGHT 67108864 +#define Q3SURFACEPARM_HINT 134217728 +#define Q3SURFACEPARM_DUST 268435456 +#define Q3SURFACEPARM_BOTCLIP 536870912 +#define Q3SURFACEPARM_LIGHTGRID 1073741824 +#define Q3SURFACEPARM_ANTIPORTAL 2147483648u -// various flags from shaders +// various flags from shaders, used for special effects not otherwise classified #define Q3TEXTUREFLAG_TWOSIDED 1 -#define Q3TEXTUREFLAG_ADDITIVE 2 -#define Q3TEXTUREFLAG_NOMIPMAPS 4 -#define Q3TEXTUREFLAG_NOPICMIP 8 -#define Q3TEXTUREFLAG_AUTOSPRITE 16 -#define Q3TEXTUREFLAG_AUTOSPRITE2 32 -#define Q3TEXTUREFLAG_ALPHATEST 64 +#define Q3TEXTUREFLAG_AUTOSPRITE 2 +#define Q3TEXTUREFLAG_AUTOSPRITE2 4 +#define Q3TEXTUREFLAG_NOPICMIP 16 typedef struct q3mbrush_s {