vkQuake2 doxygen  1.0 dev
cl_scrn.c File Reference
#include "client.h"
#include <inttypes.h>

Go to the source code of this file.

Classes

struct  dirty_t
 
struct  graphsamp_t
 

Macros

#define STAT_MINUS   10
 
#define ICON_WIDTH   24
 
#define ICON_HEIGHT   24
 
#define CHAR_WIDTH   16 * vid_hudscale->value
 
#define ICON_SPACE   8
 
#define STAT_LAYOUTS   13
 

Functions

void SCR_TimeRefresh_f (void)
 
void SCR_Loading_f (void)
 
void CL_AddNetgraph (void)
 
void SCR_DebugGraph (float value, int color)
 
void SCR_DrawDebugGraph (void)
 
void SCR_CenterPrint (char *str)
 
void SCR_DrawCenterString (void)
 
void SCR_CheckDrawCenterString (void)
 
static void SCR_CalcVrect (void)
 
void SCR_SizeUp_f (void)
 
void SCR_SizeDown_f (void)
 
void SCR_Sky_f (void)
 
void SCR_Init (void)
 
void SCR_DrawNet (void)
 
void SCR_DrawPause (void)
 
void SCR_DrawLoading (void)
 
void SCR_RunConsole (void)
 
void SCR_DrawConsole (void)
 
void SCR_BeginLoadingPlaque (void)
 
void SCR_EndLoadingPlaque (void)
 
int entitycmpfnc (const entity_t *a, const entity_t *b)
 
void SCR_AddDirtyPoint (int x, int y)
 
void SCR_DirtyScreen (void)
 
void SCR_TileClear (void)
 
void SizeHUDString (char *string, int *w, int *h)
 
void DrawHUDString (char *string, int x, int y, int centerwidth, int xor)
 
void SCR_DrawField (int x, int y, int color, int width, int value)
 
void SCR_TouchPics (void)
 
void SCR_ExecuteLayoutString (char *s)
 
void SCR_DrawStats (void)
 
void SCR_DrawLayout (void)
 
void SCR_UpdateScreen (void)
 

Variables

float scr_con_current
 
float scr_conlines
 
qboolean scr_initialized
 
int scr_draw_loading
 
vrect_t scr_vrect
 
cvar_tscr_viewsize
 
cvar_tscr_conspeed
 
cvar_tscr_centertime
 
cvar_tscr_showturtle
 
cvar_tscr_showpause
 
cvar_tscr_printspeed
 
cvar_tscr_netgraph
 
cvar_tscr_timegraph
 
cvar_tscr_debuggraph
 
cvar_tscr_graphheight
 
cvar_tscr_graphscale
 
cvar_tscr_graphshift
 
cvar_tscr_drawall
 
cvar_tvid_hudscale
 
cvar_tvid_ref
 
dirty_t scr_dirty
 
dirty_t scr_old_dirty [2]
 
char crosshair_pic [MAX_QPATH]
 
int crosshair_width
 
int crosshair_height
 
static int current
 
static graphsamp_t values [1024]
 
char scr_centerstring [1024]
 
float scr_centertime_start
 
float scr_centertime_off
 
int scr_center_lines
 
int scr_erase_center
 
char * sb_nums [2][11]
 

Macro Definition Documentation

◆ CHAR_WIDTH

#define CHAR_WIDTH   16 * vid_hudscale->value

Definition at line 737 of file cl_scrn.c.

◆ ICON_HEIGHT

#define ICON_HEIGHT   24

Definition at line 736 of file cl_scrn.c.

◆ ICON_SPACE

#define ICON_SPACE   8

Definition at line 738 of file cl_scrn.c.

◆ ICON_WIDTH

#define ICON_WIDTH   24

Definition at line 735 of file cl_scrn.c.

◆ STAT_LAYOUTS

#define STAT_LAYOUTS   13

Definition at line 1196 of file cl_scrn.c.

◆ STAT_MINUS

#define STAT_MINUS   10

Definition at line 726 of file cl_scrn.c.

Function Documentation

◆ CL_AddNetgraph()

void CL_AddNetgraph ( void  )

Definition at line 96 of file cl_scrn.c.

97 {
98  int i;
99  int in;
100  int ping;
101 
102  // if using the debuggraph for something else, don't
103  // add the net lines
105  return;
106 
107  for (i=0 ; i<cls.netchan.dropped ; i++)
108  SCR_DebugGraph (30, 0x40);
109 
110  for (i=0 ; i<cl.surpressCount ; i++)
111  SCR_DebugGraph (30, 0xdf);
112 
113  // see what the latency was on this packet
115  ping = cls.realtime - cl.cmd_time[in];
116  ping /= 30;
117  if (ping > 30)
118  ping = 30;
119  SCR_DebugGraph (ping, 0xd0);
120 }

Referenced by CL_ParseServerMessage().

◆ DrawHUDString()

void DrawHUDString ( char *  string,
int  x,
int  y,
int  centerwidth,
int  xor 
)

Definition at line 777 of file cl_scrn.c.

778 {
779  int margin;
780  char line[1024];
781  int width;
782  int i;
783 
784  margin = x;
785 
786  while (*string)
787  {
788  // scan out one line of text from the string
789  width = 0;
790  while (*string && *string != '\n')
791  line[width++] = *string++;
792  line[width] = 0;
793 
794  if (centerwidth)
795  x = margin + ((centerwidth - width*8)*vid_hudscale->value)/2;
796  else
797  x = margin;
798  for (i=0 ; i<width ; i++)
799  {
800  re.DrawChar (x, y, line[i]^xor);
801  x += 8 * vid_hudscale->value;
802  }
803  if (*string)
804  {
805  string++; // skip the \n
806  x = margin;
807  y += 8 * vid_hudscale->value;
808  }
809  }
810 }

Referenced by SCR_ExecuteLayoutString().

◆ entitycmpfnc()

int entitycmpfnc ( const entity_t a,
const entity_t b 
)

Definition at line 611 of file cl_scrn.c.

612 {
613  /*
614  ** all other models are sorted by model then skin
615  */
616  if ( a->model == b->model )
617  {
618  return ( ( intptr_t ) a->skin - ( intptr_t ) b->skin );
619  }
620  else
621  {
622  return ( (intptr_t) a->model - (intptr_t) b->model );
623  }
624 }

Referenced by V_RenderView().

◆ SCR_AddDirtyPoint()

void SCR_AddDirtyPoint ( int  x,
int  y 
)

Definition at line 669 of file cl_scrn.c.

670 {
671  if (x < scr_dirty.x1)
672  scr_dirty.x1 = x;
673  if (x > scr_dirty.x2)
674  scr_dirty.x2 = x;
675  if (y < scr_dirty.y1)
676  scr_dirty.y1 = y;
677  if (y > scr_dirty.y2)
678  scr_dirty.y2 = y;
679 }

Referenced by CL_PrepRefresh(), Con_DrawConsole(), Con_DrawNotify(), SCR_DirtyScreen(), SCR_DrawCenterString(), SCR_DrawField(), SCR_ExecuteLayoutString(), and V_RenderView().

◆ SCR_BeginLoadingPlaque()

void SCR_BeginLoadingPlaque ( void  )

Definition at line 562 of file cl_scrn.c.

563 {
564  S_StopAllSounds ();
565  cl.sound_prepped = false; // don't play ambients
566  CDAudio_Stop ();
567  Miniaudio_Stop ();
568  if (cls.disable_screen)
569  return;
570  if (developer->value)
571  return;
572  if (cls.state == ca_disconnected)
573  return; // if at console, don't bring up the plaque
574  if (cls.key_dest == key_console)
575  return;
576  if (cl.cinematictime > 0)
577  scr_draw_loading = 2; // clear to balack first
578  else
579  scr_draw_loading = 1;
580  SCR_UpdateScreen ();
583 }

Referenced by CL_Changing_f(), SCR_Loading_f(), SCR_RunCinematic(), SV_InitGame(), and SV_Map().

◆ SCR_CalcVrect()

static void SCR_CalcVrect ( void  )
static

Definition at line 321 of file cl_scrn.c.

322 {
323  int size;
324 
325  // bound viewsize
326  if (scr_viewsize->value < 40)
327  Cvar_Set ("viewsize","40");
328  if (scr_viewsize->value > 100)
329  Cvar_Set ("viewsize","100");
330 
332 
335 
338 }

Referenced by SCR_UpdateScreen().

◆ SCR_CenterPrint()

void SCR_CenterPrint ( char *  str)

Definition at line 201 of file cl_scrn.c.

202 {
203  char *s;
204  char line[64];
205  int i, j, l;
206 
207  strncpy (scr_centerstring, str, sizeof(scr_centerstring)-1);
210 
211  // count the number of lines for centering
212  scr_center_lines = 1;
213  s = str;
214  while (*s)
215  {
216  if (*s == '\n')
218  s++;
219  }
220 
221  // echo it to the console
222  Com_Printf("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n\n");
223 
224  s = str;
225  do
226  {
227  // scan the width of the line
228  for (l=0 ; l<40 ; l++)
229  if (s[l] == '\n' || !s[l])
230  break;
231  for (i=0 ; i<(40-l)/2 ; i++)
232  line[i] = ' ';
233 
234  for (j=0 ; j<l ; j++)
235  {
236  line[i++] = s[j];
237  }
238 
239  line[i] = '\n';
240  line[i+1] = 0;
241 
242  Com_Printf ("%s", line);
243 
244  while (*s && *s != '\n')
245  s++;
246 
247  if (!*s)
248  break;
249  s++; // skip the \n
250  } while (1);
251  Com_Printf("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n\n");
252  Con_ClearNotify ();
253 }

Referenced by CL_ParseServerMessage().

◆ SCR_CheckDrawCenterString()

void SCR_CheckDrawCenterString ( void  )

Definition at line 302 of file cl_scrn.c.

303 {
305 
306  if (scr_centertime_off <= 0)
307  return;
308 
310 }

Referenced by SCR_UpdateScreen().

◆ SCR_DebugGraph()

void SCR_DebugGraph ( float  value,
int  color 
)

Definition at line 137 of file cl_scrn.c.

138 {
139  values[current&1023].value = value;
140  values[current&1023].color = color;
141  current++;
142 }

Referenced by CL_AddNetgraph(), SCR_UpdateScreen(), and SV_InitGameProgs().

◆ SCR_DirtyScreen()

void SCR_DirtyScreen ( void  )

Definition at line 681 of file cl_scrn.c.

682 {
683  SCR_AddDirtyPoint (0, 0);
685 }

Referenced by CL_DrawInventory(), M_Draw(), and MainWndProc().

◆ SCR_DrawCenterString()

void SCR_DrawCenterString ( void  )

Definition at line 256 of file cl_scrn.c.

257 {
258  char *start;
259  int l;
260  int j;
261  int x, y;
262  int remaining;
263 
264 // the finale prints the characters one at a time
265  remaining = 9999;
266 
267  scr_erase_center = 0;
268  start = scr_centerstring;
269 
270  if (scr_center_lines <= 4)
271  y = viddef.height*0.35;
272  else
273  y = 48;
274 
275  do
276  {
277  // scan the width of the line
278  for (l=0 ; l<40 ; l++)
279  if (start[l] == '\n' || !start[l])
280  break;
281  x = (viddef.width - l*8*vid_hudscale->value)/2;
282  SCR_AddDirtyPoint (x, y);
283  for (j=0 ; j<l ; j++, x+=8*vid_hudscale->value)
284  {
285  re.DrawChar (x, y, start[j]);
286  if (!remaining--)
287  return;
288  }
290 
291  y += 8*vid_hudscale->value;
292 
293  while (*start && *start != '\n')
294  start++;
295 
296  if (!*start)
297  break;
298  start++; // skip the \n
299  } while (1);
300 }

Referenced by SCR_CheckDrawCenterString().

◆ SCR_DrawConsole()

void SCR_DrawConsole ( void  )

Definition at line 527 of file cl_scrn.c.

528 {
529  Con_CheckResize ();
530 
532  { // forced full screen console
533  Con_DrawConsole (1.0);
534  return;
535  }
536 
537  if (cls.state != ca_active || !cl.refresh_prepped)
538  { // connected, but can't render
539  Con_DrawConsole (0.5);
541  return;
542  }
543 
544  if (scr_con_current)
545  {
547  }
548  else
549  {
551  Con_DrawNotify (); // only draw notify in game
552  }
553 }

Referenced by SCR_UpdateScreen().

◆ SCR_DrawDebugGraph()

void SCR_DrawDebugGraph ( void  )

Definition at line 149 of file cl_scrn.c.

150 {
151  int a, x, y, w, i, h;
152  float v;
153  int color;
154 
155  //
156  // draw the graph
157  //
158  w = scr_vrect.width;
159 
160  x = scr_vrect.x;
163  w, scr_graphheight->value, 8);
164 
165  for (a=0 ; a<w ; a++)
166  {
167  i = (current-1-a+1024) & 1023;
168  v = values[i].value;
169  color = values[i].color;
171 
172  if (v < 0)
174  h = (int)v % (int)scr_graphheight->value;
175  re.DrawFill (x+w-1-a, y - h, 1, h, color);
176  }
177 }

Referenced by SCR_UpdateScreen().

◆ SCR_DrawField()

void SCR_DrawField ( int  x,
int  y,
int  color,
int  width,
int  value 
)

Definition at line 818 of file cl_scrn.c.

819 {
820  char num[16], *ptr;
821  int l;
822  int frame;
823 
824  if (width < 1)
825  return;
826 
827  // draw number string
828  if (width > 5)
829  width = 5;
830 
831  SCR_AddDirtyPoint (x, y);
833 
834  Com_sprintf (num, sizeof(num), "%i", value);
835  l = (int)strlen(num);
836  if (l > width)
837  l = width;
838  x += 2 + CHAR_WIDTH*(width - l);
839 
840  ptr = num;
841  while (*ptr && l)
842  {
843  if (*ptr == '-')
844  frame = STAT_MINUS;
845  else
846  frame = *ptr -'0';
847 
848  re.DrawPic (x,y,sb_nums[color][frame]);
849  x += CHAR_WIDTH;
850  ptr++;
851  l--;
852  }
853 }

Referenced by SCR_ExecuteLayoutString().

◆ SCR_DrawLayout()

void SCR_DrawLayout ( void  )

Definition at line 1198 of file cl_scrn.c.

1199 {
1201  return;
1203 }

Referenced by SCR_UpdateScreen().

◆ SCR_DrawLoading()

void SCR_DrawLoading ( void  )

Definition at line 477 of file cl_scrn.c.

478 {
479  int w, h;
480 
481  if (!scr_draw_loading)
482  return;
483 
484  scr_draw_loading = false;
485  re.DrawGetPicSize (&w, &h, "loading");
486  re.DrawPic ((viddef.width-w)/2, (viddef.height-h)/2, "loading");
487 }

Referenced by SCR_UpdateScreen().

◆ SCR_DrawNet()

void SCR_DrawNet ( void  )

Definition at line 444 of file cl_scrn.c.

445 {
447  < CMD_BACKUP-1)
448  return;
449 
450  re.DrawPic (scr_vrect.x+64, scr_vrect.y, "net");
451 }

Referenced by SCR_UpdateScreen().

◆ SCR_DrawPause()

void SCR_DrawPause ( void  )

Definition at line 458 of file cl_scrn.c.

459 {
460  int w, h;
461 
462  if (!scr_showpause->value) // turn off for screenshots
463  return;
464 
465  if (!cl_paused->value)
466  return;
467 
468  re.DrawGetPicSize (&w, &h, "pause");
469  re.DrawPic ((viddef.width-w)/2, viddef.height/2 + 8*vid_hudscale->value, "pause");
470 }

Referenced by SCR_UpdateScreen().

◆ SCR_DrawStats()

void SCR_DrawStats ( void  )

Definition at line 1184 of file cl_scrn.c.

Referenced by SCR_UpdateScreen().

◆ SCR_EndLoadingPlaque()

void SCR_EndLoadingPlaque ( void  )

Definition at line 590 of file cl_scrn.c.

591 {
592  cls.disable_screen = 0;
593  Con_ClearNotify ();
594 }

Referenced by CL_Drop(), CL_ParseFrame(), Con_ToggleConsole_f(), Qcommon_Init(), and SCR_PlayCinematic().

◆ SCR_ExecuteLayoutString()

void SCR_ExecuteLayoutString ( char *  s)

Definition at line 889 of file cl_scrn.c.

890 {
891  int x, y;
892  int value;
893  char *token;
894  int width;
895  int index;
896  clientinfo_t *ci;
897 
898  if (cls.state != ca_active || !cl.refresh_prepped)
899  return;
900 
901  if (!s[0])
902  return;
903 
904  x = 0;
905  y = 0;
906  width = 3;
907 
908  while (s)
909  {
910  token = COM_Parse (&s);
911  if (!strcmp(token, "xl"))
912  {
913  token = COM_Parse (&s);
914  x = atoi(token) * vid_hudscale->value;
915  continue;
916  }
917  if (!strcmp(token, "xr"))
918  {
919  token = COM_Parse (&s);
920  x = viddef.width + atoi(token) * vid_hudscale->value;
921  continue;
922  }
923  if (!strcmp(token, "xv"))
924  {
925  token = COM_Parse (&s);
926  x = viddef.width/2 - 160 * vid_hudscale->value + atoi(token) * vid_hudscale->value;
927  continue;
928  }
929 
930  if (!strcmp(token, "yt"))
931  {
932  token = COM_Parse (&s);
933  y = atoi(token) * vid_hudscale->value;
934  continue;
935  }
936  if (!strcmp(token, "yb"))
937  {
938  token = COM_Parse (&s);
939  y = viddef.height + atoi(token) * vid_hudscale->value;
940  continue;
941  }
942  if (!strcmp(token, "yv"))
943  {
944  token = COM_Parse (&s);
945  y = viddef.height/2 - 120 * vid_hudscale->value + atoi(token) * vid_hudscale->value;
946  continue;
947  }
948 
949  if (!strcmp(token, "pic"))
950  { // draw a pic from a stat number
951  token = COM_Parse (&s);
952  value = cl.frame.playerstate.stats[atoi(token)];
953  if (value >= MAX_IMAGES)
954  Com_Error (ERR_DROP, "Pic >= MAX_IMAGES");
956  {
957  SCR_AddDirtyPoint (x, y);
958  SCR_AddDirtyPoint (x+23, y+23);
960  }
961  continue;
962  }
963 
964  if (!strcmp(token, "client"))
965  { // draw a deathmatch client block
966  int score, ping, time;
967 
968  token = COM_Parse (&s);
969  x = viddef.width/2 - 160 * vid_hudscale->value + atoi(token)*vid_hudscale->value;
970  token = COM_Parse (&s);
971  y = viddef.height/2 - 120 * vid_hudscale->value + atoi(token)*vid_hudscale->value;
972  SCR_AddDirtyPoint (x, y);
974 
975  token = COM_Parse (&s);
976  value = atoi(token);
977  if (value >= MAX_CLIENTS || value < 0)
978  Com_Error (ERR_DROP, "client >= MAX_CLIENTS");
979  ci = &cl.clientinfo[value];
980 
981  token = COM_Parse (&s);
982  score = atoi(token);
983 
984  token = COM_Parse (&s);
985  ping = atoi(token);
986 
987  token = COM_Parse (&s);
988  time = atoi(token);
989 
990  DrawAltString (x+32 * vid_hudscale->value, y, ci->name);
991  DrawString (x+32 * vid_hudscale->value, y+8 * vid_hudscale->value, "Score: ");
992  DrawAltString (x+32 * vid_hudscale->value +7*8 * vid_hudscale->value, y+8 * vid_hudscale->value, va("%i", score));
993  DrawString (x+32 * vid_hudscale->value, y+16 * vid_hudscale->value, va("Ping: %i", ping));
994  DrawString (x+32 * vid_hudscale->value, y+24 * vid_hudscale->value, va("Time: %i", time));
995 
996  if (!ci->icon)
997  ci = &cl.baseclientinfo;
998  re.DrawPic (x, y, ci->iconname);
999  continue;
1000  }
1001 
1002  if (!strcmp(token, "ctf"))
1003  { // draw a ctf client block
1004  int score, ping;
1005  char block[80];
1006 
1007  token = COM_Parse (&s);
1008  x = viddef.width/2 - 160 * vid_hudscale->value + atoi(token)*vid_hudscale->value;
1009  token = COM_Parse (&s);
1010  y = viddef.height/2 - 120 * vid_hudscale->value + atoi(token)*vid_hudscale->value;
1011  SCR_AddDirtyPoint (x, y);
1013 
1014  token = COM_Parse (&s);
1015  value = atoi(token);
1016  if (value >= MAX_CLIENTS || value < 0)
1017  Com_Error (ERR_DROP, "client >= MAX_CLIENTS");
1018  ci = &cl.clientinfo[value];
1019 
1020  token = COM_Parse (&s);
1021  score = atoi(token);
1022 
1023  token = COM_Parse (&s);
1024  ping = atoi(token);
1025  if (ping > 999)
1026  ping = 999;
1027 
1028  sprintf(block, "%3d %3d %-12.12s", score, ping, ci->name);
1029 
1030  if (value == cl.playernum)
1031  DrawAltString (x, y, block);
1032  else
1033  DrawString (x, y, block);
1034  continue;
1035  }
1036 
1037  if (!strcmp(token, "picn"))
1038  { // draw a pic from a name
1039  token = COM_Parse (&s);
1040  SCR_AddDirtyPoint (x, y);
1041  SCR_AddDirtyPoint (x+23, y+23);
1042  re.DrawPic (x, y, token);
1043  continue;
1044  }
1045 
1046  if (!strcmp(token, "num"))
1047  { // draw a number
1048  token = COM_Parse (&s);
1049  width = atoi(token);
1050  token = COM_Parse (&s);
1051  value = cl.frame.playerstate.stats[atoi(token)];
1052  SCR_DrawField (x, y, 0, width, value);
1053  continue;
1054  }
1055 
1056  if (!strcmp(token, "hnum"))
1057  { // health number
1058  int color;
1059 
1060  width = 3;
1062  if (value > 25)
1063  color = 0; // green
1064  else if (value > 0)
1065  color = (cl.frame.serverframe>>2) & 1; // flash
1066  else
1067  color = 1;
1068 
1070  re.DrawPic (x, y, "field_3");
1071 
1072  SCR_DrawField (x, y, color, width, value);
1073  continue;
1074  }
1075 
1076  if (!strcmp(token, "anum"))
1077  { // ammo number
1078  int color;
1079 
1080  width = 3;
1082  if (value > 5)
1083  color = 0; // green
1084  else if (value >= 0)
1085  color = (cl.frame.serverframe>>2) & 1; // flash
1086  else
1087  continue; // negative number = don't show
1088 
1090  re.DrawPic (x, y, "field_3");
1091 
1092  SCR_DrawField (x, y, color, width, value);
1093  continue;
1094  }
1095 
1096  if (!strcmp(token, "rnum"))
1097  { // armor number
1098  int color;
1099 
1100  width = 3;
1102  if (value < 1)
1103  continue;
1104 
1105  color = 0; // green
1106 
1108  re.DrawPic (x, y, "field_3");
1109 
1110  SCR_DrawField (x, y, color, width, value);
1111  continue;
1112  }
1113 
1114 
1115  if (!strcmp(token, "stat_string"))
1116  {
1117  token = COM_Parse (&s);
1118  index = atoi(token);
1119  if (index < 0 || index >= MAX_CONFIGSTRINGS)
1120  Com_Error (ERR_DROP, "Bad stat_string index");
1121  index = cl.frame.playerstate.stats[index];
1122  if (index < 0 || index >= MAX_CONFIGSTRINGS)
1123  Com_Error (ERR_DROP, "Bad stat_string index");
1124  DrawString (x, y, cl.configstrings[index]);
1125  continue;
1126  }
1127 
1128  if (!strcmp(token, "cstring"))
1129  {
1130  token = COM_Parse (&s);
1131  DrawHUDString (token, x, y, 320, 0);
1132  continue;
1133  }
1134 
1135  if (!strcmp(token, "string"))
1136  {
1137  token = COM_Parse (&s);
1138  DrawString (x, y, token);
1139  continue;
1140  }
1141 
1142  if (!strcmp(token, "cstring2"))
1143  {
1144  token = COM_Parse (&s);
1145  DrawHUDString (token, x, y, 320,0x80);
1146  continue;
1147  }
1148 
1149  if (!strcmp(token, "string2"))
1150  {
1151  token = COM_Parse (&s);
1152  DrawAltString (x, y, token);
1153  continue;
1154  }
1155 
1156  if (!strcmp(token, "if"))
1157  { // draw a number
1158  token = COM_Parse (&s);
1159  value = cl.frame.playerstate.stats[atoi(token)];
1160  if (!value)
1161  { // skip to endif
1162  while (s && strcmp(token, "endif") )
1163  {
1164  token = COM_Parse (&s);
1165  }
1166  }
1167 
1168  continue;
1169  }
1170 
1171 
1172  }
1173 }

Referenced by SCR_DrawLayout(), and SCR_DrawStats().

◆ SCR_Init()

void SCR_Init ( void  )

Definition at line 410 of file cl_scrn.c.

411 {
412  scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE);
413  scr_conspeed = Cvar_Get ("scr_conspeed", "3", 0);
414  scr_showturtle = Cvar_Get ("scr_showturtle", "0", 0);
415  scr_showpause = Cvar_Get ("scr_showpause", "1", 0);
416  scr_centertime = Cvar_Get ("scr_centertime", "2.5", 0);
417  scr_printspeed = Cvar_Get ("scr_printspeed", "8", 0);
418  scr_netgraph = Cvar_Get ("netgraph", "0", 0);
419  scr_timegraph = Cvar_Get ("timegraph", "0", 0);
420  scr_debuggraph = Cvar_Get ("debuggraph", "0", 0);
421  scr_graphheight = Cvar_Get ("graphheight", "32", 0);
422  scr_graphscale = Cvar_Get ("graphscale", "1", 0);
423  scr_graphshift = Cvar_Get ("graphshift", "0", 0);
424  scr_drawall = Cvar_Get ("scr_drawall", "0", 0);
425 
426 //
427 // register our commands
428 //
429  Cmd_AddCommand ("timerefresh",SCR_TimeRefresh_f);
430  Cmd_AddCommand ("loading",SCR_Loading_f);
431  Cmd_AddCommand ("sizeup",SCR_SizeUp_f);
432  Cmd_AddCommand ("sizedown",SCR_SizeDown_f);
433  Cmd_AddCommand ("sky",SCR_Sky_f);
434 
435  scr_initialized = true;
436 }

Referenced by CL_Init().

◆ SCR_Loading_f()

void SCR_Loading_f ( void  )

Definition at line 601 of file cl_scrn.c.

602 {
604 }

Referenced by SCR_Init().

◆ SCR_RunConsole()

void SCR_RunConsole ( void  )

Definition at line 498 of file cl_scrn.c.

499 {
500 // decide on the height of the console
501  if (cls.key_dest == key_console)
502  scr_conlines = 0.5; // half screen
503  else
504  scr_conlines = 0; // none visible
505 
507  {
511 
512  }
513  else if (scr_conlines > scr_con_current)
514  {
518  }
519 
520 }

Referenced by CL_Frame().

◆ SCR_SizeDown_f()

void SCR_SizeDown_f ( void  )

Definition at line 361 of file cl_scrn.c.

362 {
363  Cvar_SetValue ("viewsize",scr_viewsize->value-10);
364 }

Referenced by SCR_Init().

◆ SCR_SizeUp_f()

void SCR_SizeUp_f ( void  )

Definition at line 348 of file cl_scrn.c.

349 {
350  Cvar_SetValue ("viewsize",scr_viewsize->value+10);
351 }

Referenced by SCR_Init().

◆ SCR_Sky_f()

void SCR_Sky_f ( void  )

Definition at line 373 of file cl_scrn.c.

374 {
375  float rotate;
376  vec3_t axis;
377 
378  if (Cmd_Argc() < 2)
379  {
380  Com_Printf ("Usage: sky <basename> <rotate> <axis x y z>\n");
381  return;
382  }
383  if (Cmd_Argc() > 2)
384  rotate = atof(Cmd_Argv(2));
385  else
386  rotate = 0;
387  if (Cmd_Argc() == 6)
388  {
389  axis[0] = atof(Cmd_Argv(3));
390  axis[1] = atof(Cmd_Argv(4));
391  axis[2] = atof(Cmd_Argv(5));
392  }
393  else
394  {
395  axis[0] = 0;
396  axis[1] = 0;
397  axis[2] = 1;
398  }
399 
400  re.SetSky (Cmd_Argv(1), rotate, axis);
401 }

Referenced by SCR_Init().

◆ SCR_TileClear()

void SCR_TileClear ( void  )

Definition at line 694 of file cl_scrn.c.

695 {
696  if (scr_con_current == 1.0)
697  return; // full screen console
698  if (scr_viewsize->value == 100)
699  return; // full screen rendering
700  if (cl.cinematictime > 0)
701  return; // full screen cinematic
702 
703  if (scr_vrect.y > 0)
704  { // clear above view screen
706  scr_vrect.width, scr_vrect.y, "backtile");
707 
708  // clear below view screen
711  }
712 
713  if (scr_vrect.x > 0)
714  { // clear left of view screen
715  re.DrawTileClear (0, 0, scr_vrect.x, viddef.height, "backtile");
716 
717  // clear right of view screen
719  }
720 }

Referenced by SCR_UpdateScreen().

◆ SCR_TimeRefresh_f()

void SCR_TimeRefresh_f ( void  )

Definition at line 626 of file cl_scrn.c.

627 {
628  int i;
629  int start, stop;
630  float time;
631 
632  if ( cls.state != ca_active )
633  return;
634 
635  start = Sys_Milliseconds ();
636 
637  if (Cmd_Argc() == 2)
638  { // run without page flipping
639  re.BeginFrame( 0 );
640  for (i=0 ; i<128 ; i++)
641  {
642  cl.refdef.viewangles[1] = i/128.0*360.0;
643  re.RenderFrame (&cl.refdef);
644  }
645  re.EndFrame();
646  }
647  else
648  {
649  for (i=0 ; i<128 ; i++)
650  {
651  cl.refdef.viewangles[1] = i/128.0*360.0;
652 
653  re.BeginFrame( 0 );
654  re.RenderFrame (&cl.refdef);
655  re.EndFrame();
656  }
657  }
658 
659  stop = Sys_Milliseconds ();
660  time = (stop-start)/1000.0;
661  Com_Printf ("%f seconds (%f fps)\n", time, 128/time);
662 }

Referenced by SCR_Init().

◆ SCR_TouchPics()

void SCR_TouchPics ( void  )

Definition at line 863 of file cl_scrn.c.

864 {
865  int i, j;
866 
867  for (i=0 ; i<2 ; i++)
868  for (j=0 ; j<11 ; j++)
869  re.RegisterPic (sb_nums[i][j]);
870 
871  if (crosshair->value)
872  {
873  if (crosshair->value > 3 || crosshair->value < 0)
874  crosshair->value = 3;
875 
876  Com_sprintf (crosshair_pic, sizeof(crosshair_pic), "ch%i", (int)(crosshair->value));
878  if (!crosshair_width)
879  crosshair_pic[0] = 0;
880  }
881 }

Referenced by CL_PrepRefresh(), and SCR_DrawCrosshair().

◆ SCR_UpdateScreen()

void SCR_UpdateScreen ( void  )

Definition at line 1215 of file cl_scrn.c.

1216 {
1217  int numframes;
1218  int i;
1219  float separation[2] = { 0, 0 };
1220 
1221  // if the screen is disabled (loading plaque is up, or vid mode changing)
1222  // do nothing at all
1223  if (cls.disable_screen)
1224  {
1225  if (Sys_Milliseconds() - cls.disable_screen > 120000)
1226  {
1227  cls.disable_screen = 0;
1228  Com_Printf ("Loading plaque timed out.\n");
1229  }
1230  return;
1231  }
1232 
1233  if (!scr_initialized || !con.initialized)
1234  return; // not initialized yet
1235 
1236  /*
1237  ** range check cl_camera_separation so we don't inadvertently fry someone's
1238  ** brain
1239  */
1240  if ( cl_stereo_separation->value > 1.0 )
1241  Cvar_SetValue( "cl_stereo_separation", 1.0 );
1242  else if ( cl_stereo_separation->value < 0 )
1243  Cvar_SetValue( "cl_stereo_separation", 0.0 );
1244 
1245  if ( cl_stereo->value )
1246  {
1247  numframes = 2;
1248  separation[0] = -cl_stereo_separation->value / 2;
1249  separation[1] = cl_stereo_separation->value / 2;
1250  }
1251  else
1252  {
1253  separation[0] = 0;
1254  separation[1] = 0;
1255  numframes = 1;
1256  }
1257 
1258  for ( i = 0; i < numframes; i++ )
1259  {
1260  re.BeginFrame( separation[i] );
1261  // end frame and force video restart if swapchain is out of date
1262  if (vid_ref->modified)
1263  {
1265  re.EndFrame();
1266  return;
1267  }
1268 
1269  if (scr_draw_loading == 2)
1270  { // loading plaque over black screen
1271  int w, h;
1272 
1275  scr_draw_loading = false;
1276  re.DrawGetPicSize (&w, &h, "loading");
1277  re.DrawPic ((viddef.width-w)/2, (viddef.height-h)/2, "loading");
1278 // re.EndFrame();
1279 // return;
1280  }
1281  // if a cinematic is supposed to be running, handle menus
1282  // and console specially
1283  else if (cl.cinematictime > 0)
1284  {
1285  if (cls.key_dest == key_menu)
1286  {
1288  {
1290  cl.cinematicpalette_active = false;
1291  }
1293  M_Draw ();
1294 // re.EndFrame();
1295 // return;
1296  }
1297  else if (cls.key_dest == key_console)
1298  {
1300  {
1302  cl.cinematicpalette_active = false;
1303  }
1305  SCR_DrawConsole ();
1306 // re.EndFrame();
1307 // return;
1308  }
1309  else
1310  {
1313 // re.EndFrame();
1314 // return;
1315  }
1316  }
1317  else
1318  {
1319 
1320  // make sure the game palette is active
1322  {
1324  cl.cinematicpalette_active = false;
1325  }
1326 
1327  // do 3D refresh drawing, and then update the screen
1328  SCR_CalcVrect ();
1329 
1330  V_RenderView ( separation[i] );
1331 
1332  // clear any dirty part of the background
1333  SCR_TileClear ();
1334 
1335  SCR_DrawStats ();
1337  SCR_DrawLayout ();
1339  CL_DrawInventory ();
1340 
1341  SCR_DrawNet ();
1343 
1344  if (scr_timegraph->value)
1345  SCR_DebugGraph (cls.frametime*300, 0);
1346 
1348  SCR_DrawDebugGraph ();
1349 
1350  SCR_DrawPause ();
1351 
1352  SCR_DrawConsole ();
1353 
1354  M_Draw ();
1355 
1356  SCR_DrawLoading ();
1357  }
1358  }
1359  re.EndFrame();
1360 }

Referenced by CL_Frame(), CL_PrepRefresh(), CL_Skins_f(), Key_Console(), and SCR_BeginLoadingPlaque().

◆ SizeHUDString()

void SizeHUDString ( char *  string,
int w,
int h 
)

Definition at line 749 of file cl_scrn.c.

750 {
751  int lines, width, current;
752 
753  lines = 1;
754  width = 0;
755 
756  current = 0;
757  while (*string)
758  {
759  if (*string == '\n')
760  {
761  lines++;
762  current = 0;
763  }
764  else
765  {
766  current++;
767  if (current > width)
768  width = current;
769  }
770  string++;
771  }
772 
773  *w = width * 8 * vid_hudscale->value;
774  *h = lines * 8 * vid_hudscale->value;
775 }

Variable Documentation

◆ crosshair_height

int crosshair_height

Definition at line 75 of file cl_scrn.c.

Referenced by SCR_DrawCrosshair(), and SCR_TouchPics().

◆ crosshair_pic

char crosshair_pic[MAX_QPATH]

Definition at line 74 of file cl_scrn.c.

Referenced by SCR_DrawCrosshair(), and SCR_TouchPics().

◆ crosshair_width

int crosshair_width

Definition at line 75 of file cl_scrn.c.

Referenced by SCR_DrawCrosshair(), and SCR_TouchPics().

◆ current

◆ sb_nums

char* sb_nums[2][11]
Initial value:
=
{
{"num_0", "num_1", "num_2", "num_3", "num_4", "num_5",
"num_6", "num_7", "num_8", "num_9", "num_minus"},
{"anum_0", "anum_1", "anum_2", "anum_3", "anum_4", "anum_5",
"anum_6", "anum_7", "anum_8", "anum_9", "anum_minus"}
}

Definition at line 727 of file cl_scrn.c.

Referenced by SCR_DrawField(), and SCR_TouchPics().

◆ scr_center_lines

int scr_center_lines

Definition at line 190 of file cl_scrn.c.

Referenced by SCR_CenterPrint(), and SCR_DrawCenterString().

◆ scr_centerstring

char scr_centerstring[1024]

Definition at line 187 of file cl_scrn.c.

Referenced by SCR_CenterPrint(), and SCR_DrawCenterString().

◆ scr_centertime

cvar_t* scr_centertime

Definition at line 51 of file cl_scrn.c.

Referenced by SCR_CenterPrint(), and SCR_Init().

◆ scr_centertime_off

float scr_centertime_off

Definition at line 189 of file cl_scrn.c.

Referenced by SCR_CenterPrint(), and SCR_CheckDrawCenterString().

◆ scr_centertime_start

float scr_centertime_start

Definition at line 188 of file cl_scrn.c.

Referenced by SCR_CenterPrint().

◆ scr_con_current

float scr_con_current

Definition at line 39 of file cl_scrn.c.

Referenced by SCR_DrawConsole(), SCR_RunConsole(), and SCR_TileClear().

◆ scr_conlines

float scr_conlines

Definition at line 40 of file cl_scrn.c.

Referenced by SCR_RunConsole().

◆ scr_conspeed

cvar_t* scr_conspeed

Definition at line 50 of file cl_scrn.c.

Referenced by SCR_Init(), and SCR_RunConsole().

◆ scr_debuggraph

cvar_t* scr_debuggraph

Definition at line 58 of file cl_scrn.c.

Referenced by CL_AddNetgraph(), SCR_Init(), and SCR_UpdateScreen().

◆ scr_dirty

dirty_t scr_dirty

Definition at line 72 of file cl_scrn.c.

Referenced by SCR_AddDirtyPoint().

◆ scr_draw_loading

int scr_draw_loading

Definition at line 44 of file cl_scrn.c.

Referenced by SCR_BeginLoadingPlaque(), SCR_DrawLoading(), and SCR_UpdateScreen().

◆ scr_drawall

cvar_t* scr_drawall

Definition at line 62 of file cl_scrn.c.

Referenced by SCR_Init().

◆ scr_erase_center

int scr_erase_center

Definition at line 191 of file cl_scrn.c.

Referenced by SCR_DrawCenterString().

◆ scr_graphheight

cvar_t* scr_graphheight

Definition at line 59 of file cl_scrn.c.

Referenced by SCR_DrawDebugGraph(), and SCR_Init().

◆ scr_graphscale

cvar_t* scr_graphscale

Definition at line 60 of file cl_scrn.c.

Referenced by SCR_DrawDebugGraph(), and SCR_Init().

◆ scr_graphshift

cvar_t* scr_graphshift

Definition at line 61 of file cl_scrn.c.

Referenced by SCR_DrawDebugGraph(), and SCR_Init().

◆ scr_initialized

qboolean scr_initialized

Definition at line 42 of file cl_scrn.c.

Referenced by SCR_Init(), and SCR_UpdateScreen().

◆ scr_netgraph

cvar_t* scr_netgraph

Definition at line 56 of file cl_scrn.c.

Referenced by SCR_Init(), and SCR_UpdateScreen().

◆ scr_old_dirty

dirty_t scr_old_dirty[2]

Definition at line 72 of file cl_scrn.c.

◆ scr_printspeed

cvar_t* scr_printspeed

Definition at line 54 of file cl_scrn.c.

Referenced by SCR_Init().

◆ scr_showpause

cvar_t* scr_showpause

Definition at line 53 of file cl_scrn.c.

Referenced by SCR_DrawPause(), and SCR_Init().

◆ scr_showturtle

cvar_t* scr_showturtle

Definition at line 52 of file cl_scrn.c.

Referenced by SCR_Init().

◆ scr_timegraph

cvar_t* scr_timegraph

Definition at line 57 of file cl_scrn.c.

Referenced by CL_AddNetgraph(), SCR_Init(), and SCR_UpdateScreen().

◆ scr_viewsize

cvar_t* scr_viewsize

◆ scr_vrect

◆ values

graphsamp_t values[1024]
static

Definition at line 130 of file cl_scrn.c.

Referenced by SCR_DebugGraph(), and SCR_DrawDebugGraph().

◆ vid_hudscale

cvar_t* vid_hudscale

◆ vid_ref

cvar_t* vid_ref

Definition at line 44 of file vid_dll.c.

Referenced by SCR_UpdateScreen().

crosshair
cvar_t * crosshair
Definition: cl_view.c:33
MAX_CLIENTS
#define MAX_CLIENTS
Definition: q_shared.h:86
STAT_FLASHES
#define STAT_FLASHES
Definition: q_shared.h:1016
CDAudio_Stop
void CDAudio_Stop(void)
Definition: cd_win.c:194
cl_paused
cvar_t * cl_paused
Definition: cl_main.c:60
scr_graphheight
cvar_t * scr_graphheight
Definition: cl_scrn.c:59
value
GLfloat value
Definition: qgl_win.c:63
entity_s::skin
struct image_s * skin
Definition: ref.h:75
scr_centerstring
char scr_centerstring[1024]
Definition: cl_scrn.c:187
client_state_t::servercount
int servercount
Definition: client.h:154
entity_s::model
struct model_s * model
Definition: ref.h:51
SCR_DrawConsole
void SCR_DrawConsole(void)
Definition: cl_scrn.c:527
STAT_HEALTH
#define STAT_HEALTH
Definition: q_shared.h:1002
netchan_t::incoming_acknowledged
int incoming_acknowledged
Definition: qcommon.h:598
int
CONST PIXELFORMATDESCRIPTOR int
Definition: qgl_win.c:35
sb_nums
char * sb_nums[2][11]
Definition: cl_scrn.c:727
scr_printspeed
cvar_t * scr_printspeed
Definition: cl_scrn.c:54
scr_dirty
dirty_t scr_dirty
Definition: cl_scrn.c:72
SCR_CheckDrawCenterString
void SCR_CheckDrawCenterString(void)
Definition: cl_scrn.c:302
client_static_t::disable_screen
float disable_screen
Definition: client.h:212
scr_timegraph
cvar_t * scr_timegraph
Definition: cl_scrn.c:57
ca_disconnected
@ ca_disconnected
Definition: client.h:186
client_state_t::cmd_time
int cmd_time[CMD_BACKUP]
Definition: client.h:106
SCR_SizeDown_f
void SCR_SizeDown_f(void)
Definition: cl_scrn.c:361
scr_centertime
cvar_t * scr_centertime
Definition: cl_scrn.c:51
scr_showturtle
cvar_t * scr_showturtle
Definition: cl_scrn.c:52
v
GLdouble v
Definition: qgl_win.c:143
cvar_s::modified
qboolean modified
Definition: q_shared.h:330
SCR_DrawDebugGraph
void SCR_DrawDebugGraph(void)
Definition: cl_scrn.c:149
SCR_TimeRefresh_f
void SCR_TimeRefresh_f(void)
Definition: cl_scrn.c:626
SCR_BeginLoadingPlaque
void SCR_BeginLoadingPlaque(void)
Definition: cl_scrn.c:562
ca_connecting
@ ca_connecting
Definition: client.h:187
vrect_s::height
int height
Definition: vid.h:24
refexport_t::RegisterPic
struct image_s *(* RegisterPic)(char *name)
Definition: ref.h:160
refexport_t::DrawFill
void(* DrawFill)(int x, int y, int w, int h, int c)
Definition: ref.h:171
scr_conspeed
cvar_t * scr_conspeed
Definition: cl_scrn.c:50
x
GLint GLenum GLint x
Definition: qgl_win.c:116
client_static_t::disable_servercount
int disable_servercount
Definition: client.h:215
i
int i
Definition: q_shared.c:305
scr_con_current
float scr_con_current
Definition: cl_scrn.c:39
SCR_DrawPause
void SCR_DrawPause(void)
Definition: cl_scrn.c:458
V_RenderView
void V_RenderView(float stereo_separation)
Definition: cl_view.c:446
ca_active
@ ca_active
Definition: client.h:189
scr_debuggraph
cvar_t * scr_debuggraph
Definition: cl_scrn.c:58
netchan_t::dropped
int dropped
Definition: qcommon.h:588
client_state_t::cinematictime
int cinematictime
Definition: client.h:145
CL_DrawInventory
void CL_DrawInventory(void)
Definition: cl_inv.c:68
width
GLint GLsizei width
Definition: qgl_win.c:115
client_state_t::layout
char layout[1024]
Definition: client.h:138
SCR_DrawStats
void SCR_DrawStats(void)
Definition: cl_scrn.c:1184
scr_drawall
cvar_t * scr_drawall
Definition: cl_scrn.c:62
Con_DrawConsole
void Con_DrawConsole(float frac)
Definition: console.c:570
client_state_t::refdef
refdef_t refdef
Definition: client.h:131
SCR_DrawField
void SCR_DrawField(int x, int y, int color, int width, int value)
Definition: cl_scrn.c:818
Cvar_Get
cvar_t * Cvar_Get(char *var_name, char *var_value, int flags)
Definition: cvar.c:127
key_menu
@ key_menu
Definition: client.h:200
DrawString
void DrawString(int x, int y, char *s)
Definition: console.c:36
client_state_t::clientinfo
clientinfo_t clientinfo[MAX_CLIENTS]
Definition: client.h:169
scr_centertime_off
float scr_centertime_off
Definition: cl_scrn.c:189
scr_graphscale
cvar_t * scr_graphscale
Definition: cl_scrn.c:60
viddef
viddef_t viddef
Definition: vid_dll.c:54
refexport_t::EndFrame
void(* EndFrame)(void)
Definition: ref.h:182
CHAR_WIDTH
#define CHAR_WIDTH
Definition: cl_scrn.c:737
j
GLint j
Definition: qgl_win.c:150
Cmd_Argv
char * Cmd_Argv(int arg)
Definition: cmd.c:517
va
char * va(char *format,...)
Definition: q_shared.c:1050
scr_center_lines
int scr_center_lines
Definition: cl_scrn.c:190
Cmd_Argc
int Cmd_Argc(void)
Definition: cmd.c:507
CS_IMAGES
#define CS_IMAGES
Definition: q_shared.h:1114
SCR_UpdateScreen
void SCR_UpdateScreen(void)
Definition: cl_scrn.c:1215
SCR_SizeUp_f
void SCR_SizeUp_f(void)
Definition: cl_scrn.c:348
crosshair_height
int crosshair_height
Definition: cl_scrn.c:75
SCR_DrawLayout
void SCR_DrawLayout(void)
Definition: cl_scrn.c:1198
scr_centertime_start
float scr_centertime_start
Definition: cl_scrn.c:188
viddef_t::width
unsigned width
Definition: vid.h:29
scr_initialized
qboolean scr_initialized
Definition: cl_scrn.c:42
scr_erase_center
int scr_erase_center
Definition: cl_scrn.c:191
clientinfo_t::iconname
char iconname[MAX_QPATH]
Definition: client.h:77
dirty_t::x1
int x1
Definition: cl_scrn.c:69
vid_hudscale
cvar_t * vid_hudscale
Definition: vid_dll.c:48
SCR_DrawCinematic
qboolean SCR_DrawCinematic(void)
Definition: cl_cin.c:541
STAT_LAYOUTS
#define STAT_LAYOUTS
Definition: cl_scrn.c:1196
Cmd_AddCommand
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
Definition: cmd.c:691
client_state_t::refresh_prepped
qboolean refresh_prepped
Definition: client.h:98
vid_ref
cvar_t * vid_ref
Definition: vid_dll.c:44
key_game
@ key_game
Definition: client.h:200
SCR_TileClear
void SCR_TileClear(void)
Definition: cl_scrn.c:694
CVAR_ARCHIVE
#define CVAR_ARCHIVE
Definition: q_shared.h:316
viddef_t::height
unsigned height
Definition: vid.h:29
cl_stereo_separation
cvar_t * cl_stereo_separation
Definition: cl_main.c:36
SCR_Loading_f
void SCR_Loading_f(void)
Definition: cl_scrn.c:601
scr_netgraph
cvar_t * scr_netgraph
Definition: cl_scrn.c:56
Con_CheckResize
void Con_CheckResize(void)
Definition: console.c:246
cvar_s::value
float value
Definition: q_shared.h:331
Cvar_SetValue
void Cvar_SetValue(char *var_name, float value)
Definition: cvar.c:317
SCR_DebugGraph
void SCR_DebugGraph(float value, int color)
Definition: cl_scrn.c:137
dirty_t::y2
int y2
Definition: cl_scrn.c:69
SCR_DrawNet
void SCR_DrawNet(void)
Definition: cl_scrn.c:444
con
console_t con
Definition: console.c:25
key_console
@ key_console
Definition: client.h:200
frame_t::serverframe
int serverframe
Definition: client.h:46
NULL
#define NULL
Definition: q_shared.h:67
refexport_t::DrawGetPicSize
void(* DrawGetPicSize)(int *w, int *h, char *name)
Definition: ref.h:166
client_state_t::frame
frame_t frame
Definition: client.h:116
refexport_t::CinematicSetPalette
void(* CinematicSetPalette)(const unsigned char *palette)
Definition: ref.h:180
CMD_BACKUP
#define CMD_BACKUP
Definition: client.h:85
vrect_s::x
int x
Definition: vid.h:24
graphsamp_t::color
int color
Definition: cl_scrn.c:126
Miniaudio_Stop
void Miniaudio_Stop(void)
Definition: snd_miniaudio.c:287
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:181
STAT_ARMOR
#define STAT_ARMOR
Definition: q_shared.h:1006
client_state_t::playernum
int playernum
Definition: client.h:156
current
static int current
Definition: cl_scrn.c:129
Con_ClearNotify
void Con_ClearNotify(void)
Definition: console.c:208
SCR_DrawCenterString
void SCR_DrawCenterString(void)
Definition: cl_scrn.c:256
refexport_t::DrawPic
void(* DrawPic)(int x, int y, char *name)
Definition: ref.h:167
client_state_t::baseclientinfo
clientinfo_t baseclientinfo
Definition: client.h:170
client_state_t::time
int time
Definition: client.h:127
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:744
DrawAltString
void DrawAltString(int x, int y, char *s)
Definition: console.c:46
MAX_CONFIGSTRINGS
#define MAX_CONFIGSTRINGS
Definition: q_shared.h:1119
client_state_t::cinematicpalette_active
qboolean cinematicpalette_active
Definition: client.h:148
s
static fixed16_t s
Definition: r_scan.c:30
cl_stereo
cvar_t * cl_stereo
Definition: cl_main.c:37
SCR_AddDirtyPoint
void SCR_AddDirtyPoint(int x, int y)
Definition: cl_scrn.c:669
y
GLint y
Definition: qgl_win.c:115
CS_STATUSBAR
#define CS_STATUSBAR
Definition: q_shared.h:1106
re
refexport_t re
Definition: vid_dll.c:32
frame_t::playerstate
player_state_t playerstate
Definition: client.h:50
graphsamp_t::value
float value
Definition: cl_scrn.c:125
dirty_t::y1
int y1
Definition: cl_scrn.c:69
refexport_t::BeginFrame
void(* BeginFrame)(float camera_separation)
Definition: ref.h:181
crosshair_pic
char crosshair_pic[MAX_QPATH]
Definition: cl_scrn.c:74
netchan_t::outgoing_sequence
int outgoing_sequence
Definition: qcommon.h:603
refexport_t::EndWorldRenderpass
void(* EndWorldRenderpass)(void)
Definition: ref.h:183
vrect_s::width
int width
Definition: vid.h:24
Con_DrawNotify
void Con_DrawNotify(void)
Definition: console.c:501
client_state_t::sound_prepped
qboolean sound_prepped
Definition: client.h:99
refexport_t::SetSky
void(* SetSky)(char *name, float rotate, vec3_t axis)
Definition: ref.h:161
client_static_t::state
connstate_t state
Definition: client.h:204
SCR_CalcVrect
static void SCR_CalcVrect(void)
Definition: cl_scrn.c:321
clientinfo_t
Definition: client.h:71
client_static_t::frametime
float frametime
Definition: client.h:209
COM_Parse
char * COM_Parse(char **data_p)
Definition: q_shared.c:1072
clientinfo_t::name
char name[MAX_QPATH]
Definition: client.h:73
client_state_t::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:158
scr_conlines
float scr_conlines
Definition: cl_scrn.c:40
Cvar_Set
cvar_t * Cvar_Set(char *var_name, char *value)
Definition: cvar.c:278
S_StopAllSounds
void S_StopAllSounds(void)
Definition: snd_dma.c:785
STAT_AMMO
#define STAT_AMMO
Definition: q_shared.h:1004
values
static graphsamp_t values[1024]
Definition: cl_scrn.c:130
client_static_t::key_dest
keydest_t key_dest
Definition: client.h:205
clientinfo_t::icon
struct image_s * icon
Definition: client.h:76
refexport_t::DrawTileClear
void(* DrawTileClear)(int x, int y, int w, int h, char *name)
Definition: ref.h:170
scr_graphshift
cvar_t * scr_graphshift
Definition: cl_scrn.c:61
refexport_t::DrawChar
void(* DrawChar)(int x, int y, int c)
Definition: ref.h:169
SCR_Sky_f
void SCR_Sky_f(void)
Definition: cl_scrn.c:373
w
GLdouble GLdouble GLdouble w
Definition: qgl_win.c:291
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:104
M_Draw
void M_Draw(void)
Definition: menu.c:3999
refdef_t::viewangles
float viewangles[3]
Definition: ref.h:107
developer
cvar_t * developer
Definition: common.c:42
Sys_Milliseconds
int Sys_Milliseconds(void)
Definition: q_shwin.c:120
cls
client_static_t cls
Definition: cl_main.c:90
client_state_t::surpressCount
int surpressCount
Definition: client.h:117
scr_draw_loading
int scr_draw_loading
Definition: cl_scrn.c:44
key_message
@ key_message
Definition: client.h:200
edict_s::size
vec3_t size
Definition: g_local.h:991
STAT_MINUS
#define STAT_MINUS
Definition: cl_scrn.c:726
dirty_t::x2
int x2
Definition: cl_scrn.c:69
scr_vrect
vrect_t scr_vrect
Definition: cl_scrn.c:46
cl
client_state_t cl
Definition: cl_main.c:91
DrawHUDString
void DrawHUDString(char *string, int x, int y, int centerwidth, int xor)
Definition: cl_scrn.c:777
scr_viewsize
cvar_t * scr_viewsize
Definition: cl_scrn.c:49
MAX_IMAGES
#define MAX_IMAGES
Definition: q_shared.h:91
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
crosshair_width
int crosshair_width
Definition: cl_scrn.c:75
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1223
scr_showpause
cvar_t * scr_showpause
Definition: cl_scrn.c:53
refexport_t::RenderFrame
void(* RenderFrame)(refdef_t *fd)
Definition: ref.h:164
SCR_ExecuteLayoutString
void SCR_ExecuteLayoutString(char *s)
Definition: cl_scrn.c:889
player_state_t::stats
short stats[MAX_STATS]
Definition: q_shared.h:1196
console_t::initialized
qboolean initialized
Definition: console.h:30
vrect_s::y
int y
Definition: vid.h:24
SCR_DrawLoading
void SCR_DrawLoading(void)
Definition: cl_scrn.c:477
client_static_t::netchan
netchan_t netchan
Definition: client.h:224
client_static_t::realtime
int realtime
Definition: client.h:208