From d2082448e80ddacb581073bbd67a17b70ab829d4 Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 20 Feb 2012 14:54:40 +0000 Subject: [PATCH] fix broken use of + and | in drawflags git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11707 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=93d7dc6abc91b90c5ee8787fc0f48eba37516d89 --- draw.h | 2 +- gl_draw.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.39.2