From 11fa1bfbef891aa33552e902414e417d2749df3c Mon Sep 17 00:00:00 2001 From: TimeServ Date: Fri, 30 Sep 2005 01:29:27 +0000 Subject: [PATCH] small r_menutint fix git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1402 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_draw.c | 48 ++++++++++++++++++++++++--------------------- engine/sw/sw_draw.c | 7 ++++--- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/engine/gl/gl_draw.c b/engine/gl/gl_draw.c index f630e8c4e..dc4511ba8 100644 --- a/engine/gl/gl_draw.c +++ b/engine/gl/gl_draw.c @@ -1925,35 +1925,39 @@ void GLDraw_FadeScreen (void) t = strstr(t+1, " "); if (t) fadecolor[2] = atof(t+1); + else + faderender = 0; } + else + faderender = 0; // bounds check and inverse check - if (fadecolor[0] < 0) + if (faderender) { - faderender = GL_ONE_MINUS_DST_COLOR; - fadecolor[0] = -(fadecolor[0]); - } - if (fadecolor[0] > 1) - fadecolor[0] = 1; + if (fadecolor[0] < 0) + { + faderender = GL_ONE_MINUS_DST_COLOR; + fadecolor[0] = -(fadecolor[0]); + } + if (fadecolor[0] > 1) + fadecolor[0] = 1; - if (fadecolor[1] < 0) - { - faderender = GL_ONE_MINUS_DST_COLOR; - fadecolor[1] = -(fadecolor[1]); - } - if (fadecolor[1] > 1) - fadecolor[1] = 1; + if (fadecolor[1] < 0) + { + faderender = GL_ONE_MINUS_DST_COLOR; + fadecolor[1] = -(fadecolor[1]); + } + if (fadecolor[1] > 1) + fadecolor[1] = 1; - if (fadecolor[2] < 0) - { - faderender = GL_ONE_MINUS_DST_COLOR; - fadecolor[2] = -(fadecolor[2]); + if (fadecolor[2] < 0) + { + faderender = GL_ONE_MINUS_DST_COLOR; + fadecolor[2] = -(fadecolor[2]); + } + if (fadecolor[2] > 1) + fadecolor[2] = 1; } - if (fadecolor[2] > 1) - fadecolor[2] = 1; - - if (faderender == GL_DST_COLOR && fadecolor[0] == 1 && fadecolor[1] == 1 && fadecolor[2] == 1) - faderender = 0; fademodified = r_menutint.modified; } diff --git a/engine/sw/sw_draw.c b/engine/sw/sw_draw.c index 61c0bc5d6..5ba4f9225 100644 --- a/engine/sw/sw_draw.c +++ b/engine/sw/sw_draw.c @@ -2407,7 +2407,11 @@ void SWDraw_FadeScreen (void) t = strstr(t+1, " "); if (t) b = atof(t+1); + else + fsnodraw = 1; } + else + fsnodraw = 1; // bounds check and inverse check if (r < 0) @@ -2434,9 +2438,6 @@ void SWDraw_FadeScreen (void) if (b > 1) b = 1; - if (!invmask && r == 1 && g == 1 && b == 1) - fsnodraw = 1; - // generate colormap for (x = 0; x < 256; x++) {