From: divverent Date: Mon, 20 Feb 2012 14:54:40 +0000 (+0000) Subject: fix broken use of + and | in drawflags X-Git-Tag: xonotic-v0.8.0~96^2~312 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=93d7dc6abc91b90c5ee8787fc0f48eba37516d89;p=xonotic%2Fdarkplaces.git fix broken use of + and | in drawflags git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11707 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/draw.h b/draw.h index 9b34dec1..1daa5eb0 100644 --- a/draw.h +++ b/draw.h @@ -99,7 +99,7 @@ DRAWFLAG_MASK = 0xFF, // ONLY R_BeginPolygon() DRAWFLAG_MIPMAP = 0x100, // ONLY R_BeginPolygon() DRAWFLAG_NOGAMMA = 0x200 // ONLY R_DrawQSuperPic() }; -#define DRAWFLAGS_BLEND (DRAWFLAG_ADDITIVE + DRAWFLAG_MODULATE + DRAWFLAG_2XMODULATE + DRAWFLAG_SCREEN) +#define DRAWFLAGS_BLEND 0xFF /* this matches all blending flags */ typedef struct ft2_settings_s { diff --git a/gl_draw.c b/gl_draw.c index 189ddd18..581ef1a2 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -1931,10 +1931,10 @@ void DrawQ_SuperPic(float x, float y, cachepic_t *pic, float width, float height width = pic->width; if (height == 0) height = pic->height; - R_SetupShader_Generic(Draw_GetPicTexture(pic), NULL, GL_MODULATE, 1, (flags & (DRAWFLAGS_BLEND+DRAWFLAG_NOGAMMA)) ? false : true, true, false); + R_SetupShader_Generic(Draw_GetPicTexture(pic), NULL, GL_MODULATE, 1, (flags & (DRAWFLAGS_BLEND | DRAWFLAG_NOGAMMA)) ? false : true, true, false); } else - R_SetupShader_Generic_NoTexture((flags & (DRAWFLAGS_BLEND+DRAWFLAG_NOGAMMA)) ? false : true, true); + R_SetupShader_Generic_NoTexture((flags & (DRAWFLAGS_BLEND | DRAWFLAG_NOGAMMA)) ? false : true, true); floats[2] = floats[5] = floats[8] = floats[11] = 0; floats[0] = floats[9] = x;