mirror of
https://github.com/DrBeef/Quake2Quest.git
synced 2024-12-02 17:02:46 +00:00
Fixed alpha on vignette
Also improved location of inventory and other items
This commit is contained in:
parent
ac910f7ce0
commit
84fc216125
3 changed files with 17 additions and 12 deletions
|
@ -103,7 +103,7 @@ void CL_DrawInventory (float separation)
|
|||
top = 0;
|
||||
|
||||
x = (viddef.width-256)/2;
|
||||
y = (viddef.height-240)/2;
|
||||
y = viddef.height/2;
|
||||
|
||||
// repaint everything next frame
|
||||
SCR_DirtyScreen ();
|
||||
|
|
|
@ -278,7 +278,7 @@ void SCR_DrawCenterString (void)
|
|||
start = scr_centerstring;
|
||||
|
||||
if (scr_center_lines <= 4)
|
||||
y = viddef.height*0.35;
|
||||
y = viddef.height*0.4;
|
||||
else
|
||||
y = 48;
|
||||
|
||||
|
@ -1060,7 +1060,7 @@ void SCR_ExecuteLayoutString (char *s,float separation)
|
|||
if (!strcmp(token, "yt"))
|
||||
{
|
||||
token = COM_Parse (&s);
|
||||
y = atoi(token);
|
||||
y = viddef.height/3 + atoi(token);
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(token, "yb"))
|
||||
|
@ -1072,7 +1072,7 @@ void SCR_ExecuteLayoutString (char *s,float separation)
|
|||
if (!strcmp(token, "yv"))
|
||||
{
|
||||
token = COM_Parse (&s);
|
||||
y = viddef.height/2 - 120 + atoi(token);
|
||||
y = viddef.height/2 + atoi(token);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1098,7 +1098,7 @@ void SCR_ExecuteLayoutString (char *s,float separation)
|
|||
token = COM_Parse (&s);
|
||||
x = viddef.width/2 - 160 + atoi(token);
|
||||
token = COM_Parse (&s);
|
||||
y = viddef.height/2 - 120 + atoi(token);
|
||||
y = viddef.height/2 + atoi(token);
|
||||
SCR_AddDirtyPoint (x+offset_stereo, y);
|
||||
SCR_AddDirtyPoint (x+offset_stereo+159, y+31);
|
||||
|
||||
|
@ -1137,7 +1137,7 @@ void SCR_ExecuteLayoutString (char *s,float separation)
|
|||
token = COM_Parse (&s);
|
||||
x = viddef.width/2 - 160 + atoi(token);
|
||||
token = COM_Parse (&s);
|
||||
y = viddef.height/2 - 120 + atoi(token);
|
||||
y = viddef.height/2 + atoi(token);
|
||||
SCR_AddDirtyPoint (x+offset_stereo, y);
|
||||
SCR_AddDirtyPoint (x+offset_stereo+159, y+31);
|
||||
|
||||
|
|
|
@ -146,10 +146,14 @@ void Draw_StretchPic (int x, int y, int w, int h, char *pic)
|
|||
if (scrap_dirty)
|
||||
Scrap_Upload ();
|
||||
|
||||
if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( gl_config.renderer & GL_RENDERER_RENDITION ) ) && !gl->has_alpha)
|
||||
qglDisable (GL_ALPHA_TEST);
|
||||
else
|
||||
qglEnable (GL_ALPHA_TEST); // make sure alpha is enabled
|
||||
|
||||
if (gl->has_alpha)
|
||||
{
|
||||
glEnable(GL_BLEND);
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
GL_Bind (gl->texnum);
|
||||
qglBegin (GL_QUADS);
|
||||
|
@ -163,8 +167,9 @@ void Draw_StretchPic (int x, int y, int w, int h, char *pic)
|
|||
qglVertex2f (x, y+h);
|
||||
qglEnd ();
|
||||
|
||||
if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( gl_config.renderer & GL_RENDERER_RENDITION ) ) && !gl->has_alpha)
|
||||
qglEnable (GL_ALPHA_TEST);
|
||||
//Restore
|
||||
glDisable( GL_BLEND );
|
||||
glEnable( GL_ALPHA_TEST );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue