r_netgraph_alpha works again

This commit is contained in:
Bill Currie 2001-11-30 03:51:43 +00:00
parent 12a0a10d33
commit 4f2f686834
5 changed files with 9 additions and 5 deletions

View file

@ -38,7 +38,7 @@ void Draw_Init_Cvars (void);
void Draw_Character (int x, int y, int num);
void Draw_Pic (int x, int y, qpic_t *pic);
void Draw_SubPic(int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height);
void Draw_TextBox (int x, int y, int width, int lines);
void Draw_TextBox (int x, int y, int width, int lines, byte alpha);
void Draw_TransPic (int x, int y, qpic_t *pic);
void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation);
void Draw_ConsoleBackground (int lines);

View file

@ -178,12 +178,14 @@ Draw_CachePic (const char *path, qboolean alpha)
}
void
Draw_TextBox (int x, int y, int width, int lines)
Draw_TextBox (int x, int y, int width, int lines, byte alpha)
{
int cx, cy, n;
qpic_t *p;
// draw left side
color_white[3] = alpha;
qfglColor4ubv (color_white);
cx = x;
cy = y;
p = Draw_CachePic ("gfx/box_tl.lmp", true);
@ -226,6 +228,7 @@ Draw_TextBox (int x, int y, int width, int lines)
}
p = Draw_CachePic ("gfx/box_br.lmp", true);
Draw_Pic (cx, cy + 8, p);
qfglColor3ubv (color_white);
}

View file

@ -125,7 +125,7 @@ Draw_CachePic (const char *path, qboolean alpha)
void
Draw_TextBox (int x, int y, int width, int lines)
Draw_TextBox (int x, int y, int width, int lines, byte alpha)
{
qpic_t *p;
int cx, cy;

View file

@ -125,7 +125,7 @@ Draw_CachePic (const char *path, qboolean alpha)
void
Draw_TextBox (int x, int y, int width, int lines)
Draw_TextBox (int x, int y, int width, int lines, byte alpha)
{
qpic_t *p;
int cx, cy;

View file

@ -64,7 +64,8 @@ CL_NetGraph (int swap)
h = r_graphheight->int_val % 8;
Draw_TextBox (x, y, NET_TIMINGS / 8, r_graphheight->int_val / 8 + 1);
Draw_TextBox (x, y, NET_TIMINGS / 8, r_graphheight->int_val / 8 + 1,
r_netgraph_alpha->value * 255);
lost = CL_CalcNet ();
x = swap ? vid.width - (NET_TIMINGS + 8) : 8;