mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-30 00:30:38 +00:00
cl_ents.c: misc. tweaks to CL_ParsePacketEntities ()
rest: Myriad stuff. r_netgraph now recognizes and abides by the cl_hudswap Cvar. show_fps and show_time are on the same line now, and stay out of each others' way. New Draw_ function: Draw_TextBox(). It's like M_DrawTextBox(), except it doesn't screw around with the screen coordinates.
This commit is contained in:
parent
d0b1fc7816
commit
0c662b0e6a
8 changed files with 199 additions and 79 deletions
|
@ -128,7 +128,57 @@ Draw_CachePic (char *path)
|
|||
return dat;
|
||||
}
|
||||
|
||||
void
|
||||
Draw_TextBox (int x, int y, int width, int lines)
|
||||
{
|
||||
qpic_t *p;
|
||||
int cx, cy;
|
||||
int n;
|
||||
|
||||
// draw left side
|
||||
cx = x;
|
||||
cy = y;
|
||||
p = Draw_CachePic ("gfx/box_tl.lmp");
|
||||
Draw_Pic (cx, cy, p);
|
||||
p = Draw_CachePic ("gfx/box_ml.lmp");
|
||||
for (n = 0; n < lines; n++) {
|
||||
cy += 8;
|
||||
Draw_Pic (cx, cy, p);
|
||||
}
|
||||
p = Draw_CachePic ("gfx/box_bl.lmp");
|
||||
Draw_Pic (cx, cy + 8, p);
|
||||
|
||||
// draw middle
|
||||
cx += 8;
|
||||
while (width > 0) {
|
||||
cy = y;
|
||||
p = Draw_CachePic ("gfx/box_tm.lmp");
|
||||
Draw_Pic (cx, cy, p);
|
||||
p = Draw_CachePic ("gfx/box_mm.lmp");
|
||||
for (n = 0; n < lines; n++) {
|
||||
cy += 8;
|
||||
if (n == 1)
|
||||
p = Draw_CachePic ("gfx/box_mm2.lmp");
|
||||
Draw_Pic (cx, cy, p);
|
||||
}
|
||||
p = Draw_CachePic ("gfx/box_bm.lmp");
|
||||
Draw_Pic (cx, cy + 8, p);
|
||||
width -= 2;
|
||||
cx += 16;
|
||||
}
|
||||
|
||||
// draw right side
|
||||
cy = y;
|
||||
p = Draw_CachePic ("gfx/box_tr.lmp");
|
||||
Draw_Pic (cx, cy, p);
|
||||
p = Draw_CachePic ("gfx/box_mr.lmp");
|
||||
for (n = 0; n < lines; n++) {
|
||||
cy += 8;
|
||||
Draw_Pic (cx, cy, p);
|
||||
}
|
||||
p = Draw_CachePic ("gfx/box_br.lmp");
|
||||
Draw_Pic (cx, cy + 8, p);
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue