1
0
Fork 0
forked from fte/fteqw

small r_menutint fix

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1402 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2005-09-30 01:29:27 +00:00
parent 1460649835
commit 11fa1bfbef
2 changed files with 30 additions and 25 deletions

View file

@ -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;
}

View file

@ -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++)
{