X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=model_brush.h;h=cec784638b5c7b608c11b92476399fe4f71b83bd;hb=9c8b4bcf2b8614917b5a79f5cf7f4c30e76d7e85;hp=0463d74d1eedc3a8fe65f79ff5143f250b77dda5;hpb=c7ba733816742fa1a2ed54c278a504394b679227;p=xonotic%2Fdarkplaces.git diff --git a/model_brush.h b/model_brush.h index 0463d74d..cec78463 100644 --- a/model_brush.h +++ b/model_brush.h @@ -62,6 +62,8 @@ mplane_t; //#define SURF_PLANEBACK 2 +// indicates that all triangles of the surface should be added to the BIH collision system +#define MATERIALFLAG_MESHCOLLISIONS 1 // use alpha blend on this material #define MATERIALFLAG_ALPHA 2 // use additive blend on this material @@ -112,6 +114,8 @@ mplane_t; #define MATERIALFLAG_CUSTOMSURFACE 16777216 // causes MATERIALFLAG_BLENDED to render a depth pass before rendering, hiding backfaces and other hidden geometry #define MATERIALFLAG_TRANSDEPTH 33554432 +// like refraction, but doesn't distort etc. +#define MATERIALFLAG_CAMERA 67108864 // combined mask of all attributes that require depth sorted rendering #define MATERIALFLAGMASK_DEPTHSORTED (MATERIALFLAG_BLENDED | MATERIALFLAG_NODEPTHTEST) // combined mask of all attributes that cause some sort of transparency @@ -699,9 +703,10 @@ typedef struct q3mbrushside_s } q3mbrushside_t; -#define CHECKPVSBIT(pvs,b) ((b) >= 0 ? ((pvs)[(b) >> 3] & (1 << ((b) & 7))) : false) -#define SETPVSBIT(pvs,b) ((b) >= 0 ? ((pvs)[(b) >> 3] |= (1 << ((b) & 7))) : false) -#define CLEARPVSBIT(pvs,b) ((b) >= 0 ? ((pvs)[(b) >> 3] &= ~(1 << ((b) & 7))) : false) +// the first cast is to shut up a stupid warning by clang, the second cast is to make both sides have the same type +#define CHECKPVSBIT(pvs,b) ((b) >= 0 ? (unsigned char) ((pvs)[(b) >> 3] & (1 << ((b) & 7))) : (unsigned char) false) +#define SETPVSBIT(pvs,b) (void) ((b) >= 0 ? (unsigned char) ((pvs)[(b) >> 3] |= (1 << ((b) & 7))) : (unsigned char) false) +#define CLEARPVSBIT(pvs,b) (void) ((b) >= 0 ? (unsigned char) ((pvs)[(b) >> 3] &= ~(1 << ((b) & 7))) : (unsigned char) false) #endif