icculus quake2 doxygen  1.0 dev
cl_view.c File Reference
#include "client.h"

Go to the source code of this file.

Functions

void V_ClearScene (void)
 
void V_AddEntity (entity_t *ent)
 
void V_AddParticle (vec3_t org, int color, float alpha)
 
void V_AddLight (vec3_t org, float intensity, float r, float g, float b)
 
void V_AddLightStyle (int style, float r, float g, float b)
 
void V_TestParticles (void)
 
void V_TestEntities (void)
 
void V_TestLights (void)
 
void CL_PrepRefresh (void)
 
float CalcFov (float fov_x, float width, float height)
 
void V_Gun_Next_f (void)
 
void V_Gun_Prev_f (void)
 
void V_Gun_Model_f (void)
 
void SCR_DrawCrosshair (void)
 
void V_RenderView (float stereo_separation)
 
void V_Viewpos_f (void)
 
void V_Init (void)
 

Variables

int gun_frame
 
struct model_sgun_model
 
cvar_tcrosshair
 
cvar_tcrosshair_scale
 
cvar_tcl_testparticles
 
cvar_tcl_testentities
 
cvar_tcl_testlights
 
cvar_tcl_testblend
 
cvar_tcl_stats
 
int r_numdlights
 
dlight_t r_dlights [MAX_DLIGHTS]
 
int r_numentities
 
entity_t r_entities [MAX_ENTITIES]
 
int r_numparticles
 
particle_t r_particles [MAX_PARTICLES]
 
lightstyle_t r_lightstyles [MAX_LIGHTSTYLES]
 
char cl_weaponmodels [MAX_CLIENTWEAPONMODELS][MAX_QPATH]
 
int num_cl_weaponmodels
 

Function Documentation

◆ CalcFov()

float CalcFov ( float  fov_x,
float  width,
float  height 
)

Definition at line 416 of file cl_view.c.

417 {
418  float a;
419  float x;
420 
421  if (fov_x < 1 || fov_x > 179)
422  Com_Error (ERR_DROP, "Bad fov: %f", fov_x);
423 
424  x = width/tan(fov_x/360*M_PI);
425 
426  a = atan (height/x);
427 
428  a = a*360/M_PI;
429 
430  return a;
431 }

Referenced by PlayerConfig_MenuDraw(), and V_RenderView().

◆ CL_PrepRefresh()

void CL_PrepRefresh ( void  )

Definition at line 296 of file cl_view.c.

297 {
298  char mapname[32];
299  int i;
300  char name[MAX_QPATH];
301  float rotate;
302  vec3_t axis;
303 
304  if (!cl.configstrings[CS_MODELS+1][0])
305  return; // no map loaded
306 
307  SCR_AddDirtyPoint (0, 0);
309 
310  // let the render dll load the map
311  strcpy (mapname, cl.configstrings[CS_MODELS+1] + 5); // skip "maps/"
312  mapname[strlen(mapname)-4] = 0; // cut off ".bsp"
313 
314  // register models, pics, and skins
315  Com_Printf ("Map: %s\r", mapname);
316  SCR_UpdateScreen ();
317  re.BeginRegistration (mapname);
318  Com_Printf (" \r");
319 
320  // precache status bar pics
321  Com_Printf ("pics\r");
322  SCR_UpdateScreen ();
323  SCR_TouchPics ();
324  Com_Printf (" \r");
325 
327 
329  strcpy(cl_weaponmodels[0], "weapon.md2");
330 
331  for (i=1 ; i<MAX_MODELS && cl.configstrings[CS_MODELS+i][0] ; i++)
332  {
333  strcpy (name, cl.configstrings[CS_MODELS+i]);
334  name[37] = 0; // never go beyond one line
335  if (name[0] != '*')
336  Com_Printf ("%s\r", name);
337  SCR_UpdateScreen ();
338  Sys_SendKeyEvents (); // pump message loop
339  if (name[0] == '#')
340  {
341  // special player weapon model
343  {
345  sizeof(cl_weaponmodels[num_cl_weaponmodels]) - 1);
347  }
348  }
349  else
350  {
352  if (name[0] == '*')
354  else
355  cl.model_clip[i] = NULL;
356  }
357  if (name[0] != '*')
358  Com_Printf (" \r");
359  }
360 
361  Com_Printf ("images\r", i);
362  SCR_UpdateScreen ();
363  for (i=1 ; i<MAX_IMAGES && cl.configstrings[CS_IMAGES+i][0] ; i++)
364  {
366  Sys_SendKeyEvents (); // pump message loop
367  }
368 
369  Com_Printf (" \r");
370  for (i=0 ; i<MAX_CLIENTS ; i++)
371  {
372  if (!cl.configstrings[CS_PLAYERSKINS+i][0])
373  continue;
374  Com_Printf ("client %i\r", i);
375  SCR_UpdateScreen ();
376  Sys_SendKeyEvents (); // pump message loop
378  Com_Printf (" \r");
379  }
380 
381  CL_LoadClientinfo (&cl.baseclientinfo, "unnamed\\male/grunt");
382 
383  // set sky textures and speed
384  Com_Printf ("sky\r", i);
385  SCR_UpdateScreen ();
386  rotate = atof (cl.configstrings[CS_SKYROTATE]);
387  sscanf (cl.configstrings[CS_SKYAXIS], "%f %f %f",
388  &axis[0], &axis[1], &axis[2]);
389  re.SetSky (cl.configstrings[CS_SKY], rotate, axis);
390  Com_Printf (" \r");
391 
392  // the renderer can now free unneeded stuff
393  re.EndRegistration ();
394 
395  // clear any lines of console text
396  Con_ClearNotify ();
397 
398  SCR_UpdateScreen ();
399  cl.refresh_prepped = true;
400  cl.force_refdef = true; // make sure we have a valid refdef
401 
402  // start the cd track
403  if (Cvar_VariableValue("cd_shuffle")){
405  }
406  else{
407  CDAudio_Play (atoi(cl.configstrings[CS_CDTRACK]), true);
408  }
409 }

Referenced by CL_Frame(), CL_Precache_f(), and CL_RequestNextDownload().

◆ SCR_DrawCrosshair()

void SCR_DrawCrosshair ( void  )

Definition at line 471 of file cl_view.c.

472 {
473 #ifdef QMAX
474  float scale;
475 #endif
476  if (!crosshair->value)
477  return;
478 
479  if (crosshair->modified)
480  {
481  crosshair->modified = false;
482  SCR_TouchPics ();
483  }
484 
486  {
487  crosshair_scale->modified=false;
488  if (crosshair_scale->value>5)
489  Cvar_SetValue("crosshair_scale", 5);
490  else if (crosshair_scale->value<0.25)
491  Cvar_SetValue("crosshair_scale", 0.25);
492  }
493 
494  if (!crosshair_pic[0])
495  return;
496 
497 #ifdef QMAX
498  scale = crosshair_scale->value * (viddef.width/640);
499  re.DrawScaledPic (scr_vrect.x + ((scr_vrect.width - crosshair_width)>>1) //width
500  , scr_vrect.y + ((scr_vrect.height - crosshair_height)>>1) //height
501  , scale //scale
502  , 0.75 + 0.25*sin(anglemod(cl.time*0.005)) //alpha
503  , crosshair_pic); //pic
504 #else
507 #endif
508 }

Referenced by V_RenderView().

◆ V_AddEntity()

void V_AddEntity ( entity_t ent)

Definition at line 97 of file cl_view.c.

98 {
100  return;
101  r_entities[r_numentities++] = *ent;
102 }

Referenced by CL_AddBeams(), CL_AddExplosions(), CL_AddLasers(), CL_AddPacketEntities(), CL_AddPlayerBeams(), and CL_AddViewWeapon().

◆ V_AddLight()

void V_AddLight ( vec3_t  org,
float  intensity,
float  r,
float  g,
float  b 
)

Definition at line 157 of file cl_view.c.

158 {
159  dlight_t *dl;
160 
161  if (r_numdlights >= MAX_DLIGHTS)
162  return;
163  dl = &r_dlights[r_numdlights++];
164  VectorCopy (org, dl->origin);
165  dl->intensity = intensity;
166  dl->color[0] = r;
167  dl->color[1] = g;
168  dl->color[2] = b;
169 }

Referenced by CL_AddDLights(), CL_AddExplosions(), CL_AddPacketEntities(), and CL_AddParticles().

◆ V_AddLightStyle()

void V_AddLightStyle ( int  style,
float  r,
float  g,
float  b 
)

Definition at line 178 of file cl_view.c.

179 {
180  lightstyle_t *ls;
181 
182  if (style < 0 || style > MAX_LIGHTSTYLES)
183  Com_Error (ERR_DROP, "Bad light style %i", style);
184  ls = &r_lightstyles[style];
185 
186  ls->white = r+g+b;
187  ls->rgb[0] = r;
188  ls->rgb[1] = g;
189  ls->rgb[2] = b;
190 }

Referenced by CL_AddLightStyles().

◆ V_AddParticle()

void V_AddParticle ( vec3_t  org,
int  color,
float  alpha 
)

Definition at line 139 of file cl_view.c.

140 {
141  particle_t *p;
142 
144  return;
145  p = &r_particles[r_numparticles++];
146  VectorCopy (org, p->origin);
147  p->color = color;
148  p->alpha = alpha;
149 }

Referenced by CL_AddParticles().

◆ V_ClearScene()

void V_ClearScene ( void  )

Definition at line 83 of file cl_view.c.

84 {
85  r_numdlights = 0;
86  r_numentities = 0;
87  r_numparticles = 0;
88 }

Referenced by V_RenderView().

◆ V_Gun_Model_f()

void V_Gun_Model_f ( void  )

Definition at line 450 of file cl_view.c.

451 {
452  char name[MAX_QPATH];
453 
454  if (Cmd_Argc() != 2)
455  {
456  gun_model = NULL;
457  return;
458  }
459  Com_sprintf (name, sizeof(name), "models/%s/tris.md2", Cmd_Argv(1));
461 }

Referenced by V_Init().

◆ V_Gun_Next_f()

void V_Gun_Next_f ( void  )

Definition at line 436 of file cl_view.c.

437 {
438  gun_frame++;
439  Com_Printf ("frame %i\n", gun_frame);
440 }

Referenced by V_Init().

◆ V_Gun_Prev_f()

void V_Gun_Prev_f ( void  )

Definition at line 442 of file cl_view.c.

443 {
444  gun_frame--;
445  if (gun_frame < 0)
446  gun_frame = 0;
447  Com_Printf ("frame %i\n", gun_frame);
448 }

Referenced by V_Init().

◆ V_Init()

void V_Init ( void  )

Definition at line 642 of file cl_view.c.

643 {
644  Cmd_AddCommand ("gun_next", V_Gun_Next_f);
645  Cmd_AddCommand ("gun_prev", V_Gun_Prev_f);
646  Cmd_AddCommand ("gun_model", V_Gun_Model_f);
647 
648  Cmd_AddCommand ("viewpos", V_Viewpos_f);
649 
650  crosshair = Cvar_Get ("crosshair", "0", CVAR_ARCHIVE);
651  crosshair_scale = Cvar_Get ("crosshair_scale", "1", CVAR_ARCHIVE);
652  cl_testblend = Cvar_Get ("cl_testblend", "0", 0);
653  cl_testparticles = Cvar_Get ("cl_testparticles", "0", 0);
654  cl_testentities = Cvar_Get ("cl_testentities", "0", 0);
655  cl_testlights = Cvar_Get ("cl_testlights", "0", 0);
656 
657  cl_stats = Cvar_Get ("cl_stats", "0", 0);
658 }

Referenced by CL_Init().

◆ V_RenderView()

void V_RenderView ( float  stereo_separation)

Definition at line 516 of file cl_view.c.

517 {
518  extern int entitycmpfnc( const entity_t *, const entity_t * );
519 
520  if (cls.state != ca_active)
521  return;
522 
523  if (!cl.refresh_prepped)
524  return; // still loading
525 
526  if (cl_timedemo->value)
527  {
528  if (!cl.timedemo_start)
531  }
532 
533  // an invalid frame will just use the exact previous refdef
534  // we can't use the old frame if the video mode has changed, though...
535  if ( cl.frame.valid && (cl.force_refdef || !cl_paused->value) )
536  {
537  cl.force_refdef = false;
538 
539  V_ClearScene ();
540 
541  // build a refresh entity list and calc cl.sim*
542  // this also calls CL_CalcViewValues which loads
543  // v_forward, etc.
544  CL_AddEntities ();
545 
546  if (cl_testparticles->value)
547  V_TestParticles ();
548  if (cl_testentities->value)
549  V_TestEntities ();
550  if (cl_testlights->value)
551  V_TestLights ();
552  if (cl_testblend->value)
553  {
554  cl.refdef.blend[0] = 1;
555  cl.refdef.blend[1] = 0.5;
556  cl.refdef.blend[2] = 0.25;
557  cl.refdef.blend[3] = 0.5;
558  }
559 
560  // offset vieworg appropriately if we're doing stereo separation
561  if ( stereo_separation != 0 )
562  {
563  vec3_t tmp;
564 
565  VectorScale( cl.v_right, stereo_separation, tmp );
567  }
568 
569  // never let it sit exactly on a node line, because a water plane can
570  // dissapear when viewed with the eye exactly on it.
571  // the server protocol only specifies to 1/8 pixel, so add 1/16 in each axis
572  cl.refdef.vieworg[0] += 1.0/16;
573  cl.refdef.vieworg[1] += 1.0/16;
574  cl.refdef.vieworg[2] += 1.0/16;
575 
576  cl.refdef.x = scr_vrect.x;
577  cl.refdef.y = scr_vrect.y;
581  cl.refdef.time = cl.time*0.001;
582 
584 
585  if (!cl_add_entities->value)
586  r_numentities = 0;
587  if (!cl_add_particles->value)
588  r_numparticles = 0;
589  if (!cl_add_lights->value)
590  r_numdlights = 0;
591  if (!cl_add_blend->value)
592  {
594  }
595 
603 
605 
606  // sort entities for better cache locality
607  qsort( cl.refdef.entities, cl.refdef.num_entities, sizeof( cl.refdef.entities[0] ), (int (*)(const void *, const void *))entitycmpfnc );
608  }
609 
610  re.RenderFrame (&cl.refdef);
611  if (cl_stats->value)
612  Com_Printf ("ent:%i lt:%i part:%i\n", r_numentities, r_numdlights, r_numparticles);
613  if ( log_stats->value && ( log_stats_file != 0 ) )
614  fprintf( log_stats_file, "%i,%i,%i,",r_numentities, r_numdlights, r_numparticles);
615 
616 
620 
622 }

Referenced by SCR_UpdateScreen().

◆ V_TestEntities()

void V_TestEntities ( void  )

Definition at line 229 of file cl_view.c.

230 {
231  int i, j;
232  float f, r;
233  entity_t *ent;
234 
235  r_numentities = 32;
236  memset (r_entities, 0, sizeof(r_entities));
237 
238  for (i=0 ; i<r_numentities ; i++)
239  {
240  ent = &r_entities[i];
241 
242  r = 64 * ( (i%4) - 1.5 );
243  f = 64 * (i/4) + 128;
244 
245  for (j=0 ; j<3 ; j++)
246  ent->origin[j] = cl.refdef.vieworg[j] + cl.v_forward[j]*f +
247  cl.v_right[j]*r;
248 
249  ent->model = cl.baseclientinfo.model;
250  ent->skin = cl.baseclientinfo.skin;
251  }
252 }

Referenced by V_RenderView().

◆ V_TestLights()

void V_TestLights ( void  )

Definition at line 261 of file cl_view.c.

262 {
263  int i, j;
264  float f, r;
265  dlight_t *dl;
266 
267  r_numdlights = 32;
268  memset (r_dlights, 0, sizeof(r_dlights));
269 
270  for (i=0 ; i<r_numdlights ; i++)
271  {
272  dl = &r_dlights[i];
273 
274  r = 64 * ( (i%4) - 1.5 );
275  f = 64 * (i/4) + 128;
276 
277  for (j=0 ; j<3 ; j++)
278  dl->origin[j] = cl.refdef.vieworg[j] + cl.v_forward[j]*f +
279  cl.v_right[j]*r;
280  dl->color[0] = ((i%6)+1) & 1;
281  dl->color[1] = (((i%6)+1) & 2)>>1;
282  dl->color[2] = (((i%6)+1) & 4)>>2;
283  dl->intensity = 200;
284  }
285 }

Referenced by V_RenderView().

◆ V_TestParticles()

void V_TestParticles ( void  )

Definition at line 199 of file cl_view.c.

200 {
201  particle_t *p;
202  int i, j;
203  float d, r, u;
204 
206  for (i=0 ; i<r_numparticles ; i++)
207  {
208  d = i*0.25;
209  r = 4*((i&7)-3.5);
210  u = 4*(((i>>3)&7)-3.5);
211  p = &r_particles[i];
212 
213  for (j=0 ; j<3 ; j++)
214  p->origin[j] = cl.refdef.vieworg[j] + cl.v_forward[j]*d +
215  cl.v_right[j]*r + cl.v_up[j]*u;
216 
217  p->color = 8;
219  }
220 }

Referenced by V_RenderView().

◆ V_Viewpos_f()

void V_Viewpos_f ( void  )

Definition at line 630 of file cl_view.c.

631 {
632  Com_Printf ("(%i %i %i) : %i\n", (int)cl.refdef.vieworg[0],
633  (int)cl.refdef.vieworg[1], (int)cl.refdef.vieworg[2],
634  (int)cl.refdef.viewangles[YAW]);
635 }

Referenced by V_Init().

Variable Documentation

◆ cl_stats

cvar_t* cl_stats

Definition at line 40 of file cl_view.c.

Referenced by V_Init(), and V_RenderView().

◆ cl_testblend

cvar_t* cl_testblend

Definition at line 38 of file cl_view.c.

Referenced by V_Init(), and V_RenderView().

◆ cl_testentities

cvar_t* cl_testentities

Definition at line 36 of file cl_view.c.

Referenced by V_Init(), and V_RenderView().

◆ cl_testlights

cvar_t* cl_testlights

Definition at line 37 of file cl_view.c.

Referenced by V_Init(), and V_RenderView().

◆ cl_testparticles

cvar_t* cl_testparticles

Definition at line 35 of file cl_view.c.

Referenced by V_Init(), V_RenderView(), and V_TestParticles().

◆ cl_weaponmodels

char cl_weaponmodels[MAX_CLIENTWEAPONMODELS][MAX_QPATH]

Definition at line 54 of file cl_view.c.

Referenced by CL_LoadClientinfo(), and CL_PrepRefresh().

◆ crosshair

cvar_t* crosshair

Definition at line 33 of file cl_view.c.

Referenced by ControlsSetMenuItemValues(), SCR_DrawCrosshair(), SCR_TouchPics(), and V_Init().

◆ crosshair_scale

cvar_t* crosshair_scale

Definition at line 34 of file cl_view.c.

Referenced by SCR_DrawCrosshair(), and V_Init().

◆ gun_frame

int gun_frame

Definition at line 28 of file cl_view.c.

Referenced by CL_AddViewWeapon(), V_Gun_Next_f(), and V_Gun_Prev_f().

◆ gun_model

struct model_s* gun_model

Definition at line 29 of file cl_view.c.

Referenced by CL_AddViewWeapon(), and V_Gun_Model_f().

◆ num_cl_weaponmodels

int num_cl_weaponmodels

Definition at line 55 of file cl_view.c.

Referenced by CL_LoadClientinfo(), and CL_PrepRefresh().

◆ r_dlights

dlight_t r_dlights[MAX_DLIGHTS]

Definition at line 44 of file cl_view.c.

Referenced by V_AddLight(), V_RenderView(), and V_TestLights().

◆ r_entities

entity_t r_entities[MAX_ENTITIES]

Definition at line 47 of file cl_view.c.

Referenced by V_AddEntity(), V_RenderView(), and V_TestEntities().

◆ r_lightstyles

lightstyle_t r_lightstyles[MAX_LIGHTSTYLES]

Definition at line 52 of file cl_view.c.

Referenced by V_AddLightStyle(), and V_RenderView().

◆ r_numdlights

int r_numdlights

Definition at line 43 of file cl_view.c.

Referenced by V_AddLight(), V_ClearScene(), V_RenderView(), and V_TestLights().

◆ r_numentities

int r_numentities

Definition at line 46 of file cl_view.c.

Referenced by V_AddEntity(), V_ClearScene(), V_RenderView(), and V_TestEntities().

◆ r_numparticles

int r_numparticles

Definition at line 49 of file cl_view.c.

Referenced by V_AddParticle(), V_ClearScene(), V_RenderView(), and V_TestParticles().

◆ r_particles

particle_t r_particles[MAX_PARTICLES]

Definition at line 50 of file cl_view.c.

Referenced by V_AddParticle(), V_RenderView(), and V_TestParticles().

crosshair
cvar_t * crosshair
Definition: cl_view.c:33
MAX_CLIENTS
#define MAX_CLIENTS
Definition: q_shared.h:79
refdef_t::vieworg
float vieworg[3]
Definition: ref.h:124
cl_paused
cvar_t * cl_paused
Definition: cl_main.c:75
crosshair_scale
cvar_t * crosshair_scale
Definition: cl_view.c:34
SCR_TouchPics
void SCR_TouchPics(void)
Definition: cl_scrn.c:928
height
GLsizei height
Definition: qgl_win.c:69
entity_s::skin
struct image_s * skin
Definition: ref.h:75
YAW
#define YAW
Definition: q_shared.h:66
CS_SKY
#define CS_SKY
Definition: q_shared.h:1127
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
entity_s::origin
float origin[3]
Definition: ref.h:57
entity_s::model
struct model_s * model
Definition: ref.h:51
MAX_MODELS
#define MAX_MODELS
Definition: q_shared.h:82
lightstyle_t::rgb
float rgb[3]
Definition: ref.h:116
MAX_DLIGHTS
#define MAX_DLIGHTS
Definition: ref.h:25
int
CONST PIXELFORMATDESCRIPTOR int
Definition: qgl_win.c:35
CL_ParseClientinfo
void CL_ParseClientinfo(int player)
Definition: cl_parse.c:508
V_TestParticles
void V_TestParticles(void)
Definition: cl_view.c:199
log_stats
cvar_t * log_stats
Definition: common.c:40
client_state_t::v_forward
vec3_t v_forward
Definition: client.h:153
CL_AddEntities
void CL_AddEntities(void)
Definition: cl_ents.c:1495
entitycmpfnc
int entitycmpfnc(const entity_t *a, const entity_t *b)
Definition: cl_scrn.c:619
client_state_t::v_up
vec3_t v_up
Definition: client.h:153
cl_add_blend
cvar_t * cl_add_blend
Definition: cl_main.c:69
refdef_t::areabits
byte * areabits
Definition: ref.h:130
num_cl_weaponmodels
int num_cl_weaponmodels
Definition: cl_view.c:55
r_numentities
int r_numentities
Definition: cl_view.c:46
cvar_s::modified
qboolean modified
Definition: q_shared.h:323
CS_SKYROTATE
#define CS_SKYROTATE
Definition: q_shared.h:1129
vrect_s::height
int height
Definition: vid.h:24
CS_CDTRACK
#define CS_CDTRACK
Definition: q_shared.h:1126
refexport_t::RegisterPic
struct image_s *(* RegisterPic)(char *name)
Definition: ref.h:178
VectorScale
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
Definition: q_shared.c:782
CS_MODELS
#define CS_MODELS
Definition: q_shared.h:1136
x
GLint GLenum GLint x
Definition: qgl_win.c:116
viddef_t::width
int width
Definition: vid.h:29
V_Viewpos_f
void V_Viewpos_f(void)
Definition: cl_view.c:630
VectorClear
#define VectorClear(a)
Definition: q_shared.h:159
i
int i
Definition: q_shared.c:305
refdef_t::y
int y
Definition: ref.h:122
MAX_ENTITIES
#define MAX_ENTITIES
Definition: ref.h:26
client_state_t::model_clip
struct cmodel_s * model_clip[MAX_MODELS]
Definition: client.h:184
ca_active
@ ca_active
Definition: client.h:209
viddef_t::height
int height
Definition: vid.h:29
dlight_t::origin
vec3_t origin
Definition: ref.h:91
refdef_t::rdflags
int rdflags
Definition: ref.h:128
width
GLint GLsizei width
Definition: qgl_win.c:115
client_state_t::refdef
refdef_t refdef
Definition: client.h:151
M_PI
#define M_PI
Definition: q_shared.h:135
Cvar_Get
cvar_t * Cvar_Get(char *var_name, char *var_value, int flags)
Definition: cvar.c:127
gun_model
struct model_s * gun_model
Definition: cl_view.c:29
player_state_t::rdflags
int rdflags
Definition: q_shared.h:1218
anglemod
float anglemod(float a)
Definition: q_shared.c:293
client_state_t::force_refdef
qboolean force_refdef
Definition: client.h:120
frame_t::areabits
byte areabits[MAX_MAP_AREAS/8]
Definition: client.h:69
intensity
cvar_t * intensity
Definition: gl_image.c:30
refexport_t::EndRegistration
void(* EndRegistration)(void)
Definition: ref.h:180
viddef
viddef_t viddef
Definition: vid_dll.c:49
j
GLint j
Definition: qgl_win.c:150
Cmd_Argv
char * Cmd_Argv(int arg)
Definition: cmd.c:517
Cmd_Argc
int Cmd_Argc(void)
Definition: cmd.c:507
client_state_t::timedemo_start
int timedemo_start
Definition: client.h:116
SCR_DrawCrosshair
void SCR_DrawCrosshair(void)
Definition: cl_view.c:471
V_ClearScene
void V_ClearScene(void)
Definition: cl_view.c:83
CS_IMAGES
#define CS_IMAGES
Definition: q_shared.h:1138
SCR_UpdateScreen
void SCR_UpdateScreen(void)
Definition: cl_scrn.c:1285
CDAudio_Play
void CDAudio_Play(int track, qboolean looping)
Definition: cd_win.c:182
crosshair_height
int crosshair_height
Definition: cl_scrn.c:70
r_entities
entity_t r_entities[MAX_ENTITIES]
Definition: cl_view.c:47
V_Gun_Prev_f
void V_Gun_Prev_f(void)
Definition: cl_view.c:442
clientinfo_t::model
struct model_s * model
Definition: client.h:98
cl_add_lights
cvar_t * cl_add_lights
Definition: cl_main.c:67
client_state_t::model_draw
struct model_s * model_draw[MAX_MODELS]
Definition: client.h:183
r
GLdouble GLdouble r
Definition: qgl_win.c:336
cl_add_entities
cvar_t * cl_add_entities
Definition: cl_main.c:68
refdef_t::num_dlights
int num_dlights
Definition: ref.h:137
particle_t::alpha
float alpha
Definition: ref.h:100
cl_stats
cvar_t * cl_stats
Definition: cl_view.c:40
Sys_SendKeyEvents
void Sys_SendKeyEvents(void)
Definition: sys_win.c:376
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:118
CS_PLAYERSKINS
#define CS_PLAYERSKINS
Definition: q_shared.h:1141
dlight_t::color
vec3_t color
Definition: ref.h:92
V_Gun_Next_f
void V_Gun_Next_f(void)
Definition: cl_view.c:436
CVAR_ARCHIVE
#define CVAR_ARCHIVE
Definition: q_shared.h:309
gun_frame
int gun_frame
Definition: cl_view.c:28
cvar_s::value
float value
Definition: q_shared.h:324
Cvar_SetValue
void Cvar_SetValue(char *var_name, float value)
Definition: cvar.c:317
frame_t::valid
qboolean valid
Definition: client.h:65
cl_testblend
cvar_t * cl_testblend
Definition: cl_view.c:38
client_state_t::timedemo_frames
int timedemo_frames
Definition: client.h:115
cl_add_particles
cvar_t * cl_add_particles
Definition: cl_main.c:66
refdef_t::blend
float blend[4]
Definition: ref.h:126
V_TestEntities
void V_TestEntities(void)
Definition: cl_view.c:229
NULL
#define NULL
Definition: q_shared.h:60
client_state_t::frame
frame_t frame
Definition: client.h:136
cl_testparticles
cvar_t * cl_testparticles
Definition: cl_view.c:35
CDAudio_RandomPlay
void CDAudio_RandomPlay(void)
Definition: cd_win.c:190
CalcFov
float CalcFov(float fov_x, float width, float height)
Definition: cl_view.c:416
refdef_t::time
float time
Definition: ref.h:127
vrect_s::x
int x
Definition: vid.h:24
cl_weaponmodels
char cl_weaponmodels[MAX_CLIENTWEAPONMODELS][MAX_QPATH]
Definition: cl_view.c:54
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:203
MAX_CLIENTWEAPONMODELS
#define MAX_CLIENTWEAPONMODELS
Definition: client.h:89
particle_t
Definition: ref.h:96
Con_ClearNotify
void Con_ClearNotify(void)
Definition: console.c:215
refexport_t::DrawPic
void(* DrawPic)(int x, int y, char *name)
Definition: ref.h:196
client_state_t::baseclientinfo
clientinfo_t baseclientinfo
Definition: client.h:190
alpha
GLfloat GLfloat GLfloat alpha
Definition: qgl_win.c:74
refdef_t::num_particles
int num_particles
Definition: ref.h:140
client_state_t::time
int time
Definition: client.h:147
refdef_t::height
int height
Definition: ref.h:122
CS_SKYAXIS
#define CS_SKYAXIS
Definition: q_shared.h:1128
refexport_t::RegisterModel
struct model_s *(* RegisterModel)(char *name)
Definition: ref.h:176
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:736
CM_InlineModel
cmodel_t * CM_InlineModel(char *name)
Definition: cmodel.c:639
cl_testlights
cvar_t * cl_testlights
Definition: cl_view.c:37
r_particles
particle_t r_particles[MAX_PARTICLES]
Definition: cl_view.c:50
particle_t::origin
vec3_t origin
Definition: ref.h:98
name
cvar_t * name
Definition: cl_main.c:94
client_state_t::image_precache
struct image_s * image_precache[MAX_IMAGES]
Definition: client.h:187
refexport_t::BeginRegistration
void(* BeginRegistration)(char *map)
Definition: ref.h:175
lightstyle_t
Definition: ref.h:114
clientinfo_t::skin
struct image_s * skin
Definition: client.h:95
VectorAdd
#define VectorAdd(a, b, c)
Definition: q_shared.h:157
SCR_AddDirtyPoint
void SCR_AddDirtyPoint(int x, int y)
Definition: cl_scrn.c:675
re
refexport_t re
Definition: vid_dll.c:31
frame_t::playerstate
player_state_t playerstate
Definition: client.h:70
client_state_t::v_right
vec3_t v_right
Definition: client.h:153
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
crosshair_pic
char crosshair_pic[MAX_QPATH]
Definition: cl_scrn.c:69
refdef_t::lightstyles
lightstyle_t * lightstyles
Definition: ref.h:132
refdef_t::particles
particle_t * particles
Definition: ref.h:141
vrect_s::width
int width
Definition: vid.h:24
refdef_t::num_entities
int num_entities
Definition: ref.h:134
refexport_t::SetSky
void(* SetSky)(char *name, float rotate, vec3_t axis)
Definition: ref.h:179
edict_s::style
int style
Definition: g_local.h:1102
r_numdlights
int r_numdlights
Definition: cl_view.c:43
client_static_t::state
connstate_t state
Definition: client.h:224
dlight_t
Definition: ref.h:84
cl_timedemo
cvar_t * cl_timedemo
Definition: cl_main.c:76
entity_s
Definition: ref.h:49
cl_testentities
cvar_t * cl_testentities
Definition: cl_view.c:36
log_stats_file
FILE * log_stats_file
Definition: common.c:37
refdef_t::fov_x
float fov_x
Definition: ref.h:123
refdef_t::fov_y
float fov_y
Definition: ref.h:123
particle_t::color
int color
Definition: ref.h:99
client_state_t::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:178
refdef_t::dlights
dlight_t * dlights
Definition: ref.h:138
refdef_t::width
int width
Definition: ref.h:122
CL_RegisterTEntModels
void CL_RegisterTEntModels(void)
Definition: cl_tent.c:188
lightstyle_t::white
float white
Definition: ref.h:117
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:102
refdef_t::viewangles
float viewangles[3]
Definition: ref.h:125
Sys_Milliseconds
int Sys_Milliseconds(void)
Definition: q_shwin.c:120
refdef_t::entities
entity_t * entities
Definition: ref.h:135
refdef_t::x
int x
Definition: ref.h:122
cls
client_static_t cls
Definition: cl_main.c:105
V_Gun_Model_f
void V_Gun_Model_f(void)
Definition: cl_view.c:450
V_TestLights
void V_TestLights(void)
Definition: cl_view.c:261
r_dlights
dlight_t r_dlights[MAX_DLIGHTS]
Definition: cl_view.c:44
r_numparticles
int r_numparticles
Definition: cl_view.c:49
CL_LoadClientinfo
void CL_LoadClientinfo(clientinfo_t *ci, char *s)
Definition: cl_parse.c:387
r_lightstyles
lightstyle_t r_lightstyles[MAX_LIGHTSTYLES]
Definition: cl_view.c:52
MAX_LIGHTSTYLES
#define MAX_LIGHTSTYLES
Definition: q_shared.h:81
scr_vrect
vrect_t scr_vrect
Definition: cl_scrn.c:44
cl
client_state_t cl
Definition: cl_main.c:106
MAX_IMAGES
#define MAX_IMAGES
Definition: q_shared.h:84
dlight_t::intensity
float intensity
Definition: ref.h:93
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
crosshair_width
int crosshair_width
Definition: cl_scrn.c:70
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1236
refexport_t::RenderFrame
void(* RenderFrame)(refdef_t *fd)
Definition: ref.h:182
vrect_s::y
int y
Definition: vid.h:24
Cvar_VariableValue
float Cvar_VariableValue(char *var_name)
Definition: cvar.c:63
MAX_PARTICLES
#define MAX_PARTICLES
Definition: ref.h:27