X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=model_brush.h;h=906594ad4c893db4dc623ca2e12c10151c435070;hb=2000fe0dea529231a494c63436f171829cbf43e5;hp=ab2a5121833d813747eddf2cd3e0d625a0d1d255;hpb=f2467d484c38a13d23bb92f91c19a9d6a71f7bec;p=xonotic%2Fdarkplaces.git diff --git a/model_brush.h b/model_brush.h index ab2a5121..906594ad 100644 --- a/model_brush.h +++ b/model_brush.h @@ -116,6 +116,8 @@ mplane_t; #define MATERIALFLAG_TRANSDEPTH 33554432 // like refraction, but doesn't distort etc. #define MATERIALFLAG_CAMERA 67108864 +// disable rtlight on surface, use R_LightPoint instead +#define MATERIALFLAG_NORTLIGHT 134217728 // 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 @@ -703,9 +705,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