vkQuake2 doxygen  1.0 dev
cl_view.c
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13 See the GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 */
20 // cl_view.c -- player rendering positioning
21 
22 #include "client.h"
23 
24 //=============
25 //
26 // development tools for weapons
27 //
30 
31 //=============
32 
38 
40 
41 extern cvar_t *vid_hudscale;
42 extern cvar_t *viewsize;
43 
46 
49 
52 
54 
57 
58 /*
59 ====================
60 V_ClearScene
61 
62 Specifies the model that will be used as the world
63 ====================
64 */
65 void V_ClearScene (void)
66 {
67  r_numdlights = 0;
68  r_numentities = 0;
69  r_numparticles = 0;
70 }
71 
72 
73 /*
74 =====================
75 V_AddEntity
76 
77 =====================
78 */
79 void V_AddEntity (entity_t *ent)
80 {
82  return;
83  r_entities[r_numentities++] = *ent;
84 }
85 
86 
87 /*
88 =====================
89 V_AddParticle
90 
91 =====================
92 */
93 void V_AddParticle (vec3_t org, int color, float alpha)
94 {
95  particle_t *p;
96 
98  return;
100  VectorCopy (org, p->origin);
101  p->color = color;
102  p->alpha = alpha;
103 }
104 
105 /*
106 =====================
107 V_AddLight
108 
109 =====================
110 */
111 void V_AddLight (vec3_t org, float intensity, float r, float g, float b)
112 {
113  dlight_t *dl;
114 
115  if (r_numdlights >= MAX_DLIGHTS)
116  return;
117  dl = &r_dlights[r_numdlights++];
118  VectorCopy (org, dl->origin);
119  dl->intensity = intensity;
120  dl->color[0] = r;
121  dl->color[1] = g;
122  dl->color[2] = b;
123 }
124 
125 
126 /*
127 =====================
128 V_AddLightStyle
129 
130 =====================
131 */
132 void V_AddLightStyle (int style, float r, float g, float b)
133 {
134  lightstyle_t *ls;
135 
136  if (style < 0 || style > MAX_LIGHTSTYLES)
137  Com_Error (ERR_DROP, "Bad light style %i", style);
138  ls = &r_lightstyles[style];
139 
140  ls->white = r+g+b;
141  ls->rgb[0] = r;
142  ls->rgb[1] = g;
143  ls->rgb[2] = b;
144 }
145 
146 /*
147 ================
148 V_TestParticles
149 
150 If cl_testparticles is set, create 4096 particles in the view
151 ================
152 */
153 void V_TestParticles (void)
154 {
155  particle_t *p;
156  int i, j;
157  float d, r, u;
158 
160  for (i=0 ; i<r_numparticles ; i++)
161  {
162  d = i*0.25;
163  r = 4*((i&7)-3.5);
164  u = 4*(((i>>3)&7)-3.5);
165  p = &r_particles[i];
166 
167  for (j=0 ; j<3 ; j++)
168  p->origin[j] = cl.refdef.vieworg[j] + cl.v_forward[j]*d +
169  cl.v_right[j]*r + cl.v_up[j]*u;
170 
171  p->color = 8;
173  }
174 }
175 
176 /*
177 ================
178 V_TestEntities
179 
180 If cl_testentities is set, create 32 player models
181 ================
182 */
183 void V_TestEntities (void)
184 {
185  int i, j;
186  float f, r;
187  entity_t *ent;
188 
189  r_numentities = 32;
190  memset (r_entities, 0, sizeof(r_entities));
191 
192  for (i=0 ; i<r_numentities ; i++)
193  {
194  ent = &r_entities[i];
195 
196  r = 64 * ( (i%4) - 1.5 );
197  f = 64 * (i/4) + 128;
198 
199  for (j=0 ; j<3 ; j++)
200  ent->origin[j] = cl.refdef.vieworg[j] + cl.v_forward[j]*f +
201  cl.v_right[j]*r;
202 
203  ent->model = cl.baseclientinfo.model;
204  ent->skin = cl.baseclientinfo.skin;
205  }
206 }
207 
208 /*
209 ================
210 V_TestLights
211 
212 If cl_testlights is set, create 32 lights models
213 ================
214 */
215 void V_TestLights (void)
216 {
217  int i, j;
218  float f, r;
219  dlight_t *dl;
220 
221  r_numdlights = 32;
222  memset (r_dlights, 0, sizeof(r_dlights));
223 
224  for (i=0 ; i<r_numdlights ; i++)
225  {
226  dl = &r_dlights[i];
227 
228  r = 64 * ( (i%4) - 1.5 );
229  f = 64 * (i/4) + 128;
230 
231  for (j=0 ; j<3 ; j++)
232  dl->origin[j] = cl.refdef.vieworg[j] + cl.v_forward[j]*f +
233  cl.v_right[j]*r;
234  dl->color[0] = ((i%6)+1) & 1;
235  dl->color[1] = (((i%6)+1) & 2)>>1;
236  dl->color[2] = (((i%6)+1) & 4)>>2;
237  dl->intensity = 200;
238  }
239 }
240 
241 //===================================================================
242 
243 /*
244 =================
245 CL_PrepRefresh
246 
247 Call before entering a new level, or after changing dlls
248 =================
249 */
250 void CL_PrepRefresh (void)
251 {
252  char mapname[32];
253  int i;
254  char name[MAX_QPATH];
255  float rotate;
256  vec3_t axis;
257 
258  if (!cl.configstrings[CS_MODELS+1][0])
259  return; // no map loaded
260 
261  SCR_AddDirtyPoint (0, 0);
263 
264  // let the render dll load the map
265  strcpy (mapname, cl.configstrings[CS_MODELS+1] + 5); // skip "maps/"
266  mapname[strlen(mapname)-4] = 0; // cut off ".bsp"
267 
268  // register models, pics, and skins
269  Com_Printf ("Map: %s\r", mapname);
270  SCR_UpdateScreen ();
271  re.BeginRegistration (mapname);
272  Com_Printf (" \r");
273 
274  // precache status bar pics
275  Com_Printf ("pics\r");
276  SCR_UpdateScreen ();
277  SCR_TouchPics ();
278  Com_Printf (" \r");
279 
281 
283  strcpy(cl_weaponmodels[0], "weapon.md2");
284 
285  for (i=1 ; i<MAX_MODELS && cl.configstrings[CS_MODELS+i][0] ; i++)
286  {
287  strcpy (name, cl.configstrings[CS_MODELS+i]);
288  name[37] = 0; // never go beyond one line
289  if (name[0] != '*')
290  Com_Printf ("%s\r", name);
291  SCR_UpdateScreen ();
292  Sys_SendKeyEvents (); // pump message loop
293  if (name[0] == '#')
294  {
295  // special player weapon model
297  {
299  sizeof(cl_weaponmodels[num_cl_weaponmodels]) - 1);
301  }
302  }
303  else
304  {
306  if (name[0] == '*')
308  else
309  cl.model_clip[i] = NULL;
310  }
311  if (name[0] != '*')
312  Com_Printf (" \r");
313  }
314 
315  Com_Printf ("images\r", i);
316  SCR_UpdateScreen ();
317  for (i=1 ; i<MAX_IMAGES && cl.configstrings[CS_IMAGES+i][0] ; i++)
318  {
320  Sys_SendKeyEvents (); // pump message loop
321  }
322 
323  Com_Printf (" \r");
324  for (i=0 ; i<MAX_CLIENTS ; i++)
325  {
326  if (!cl.configstrings[CS_PLAYERSKINS+i][0])
327  continue;
328  Com_Printf ("client %i\r", i);
329  SCR_UpdateScreen ();
330  Sys_SendKeyEvents (); // pump message loop
332  Com_Printf (" \r");
333  }
334 
335  CL_LoadClientinfo (&cl.baseclientinfo, "unnamed\\male/grunt");
336 
337  // set sky textures and speed
338  Com_Printf ("sky\r", i);
339  SCR_UpdateScreen ();
340  rotate = atof (cl.configstrings[CS_SKYROTATE]);
341  sscanf (cl.configstrings[CS_SKYAXIS], "%f %f %f",
342  &axis[0], &axis[1], &axis[2]);
343  re.SetSky (cl.configstrings[CS_SKY], rotate, axis);
344  Com_Printf (" \r");
345 
346  // the renderer can now free unneeded stuff
347  re.EndRegistration ();
348 
349  // clear any lines of console text
350  Con_ClearNotify ();
351 
352  SCR_UpdateScreen ();
353  cl.refresh_prepped = true;
354  cl.force_refdef = true; // make sure we have a valid refdef
355 
356  // start the cd track
357  int track = atoi(cl.configstrings[CS_CDTRACK]);
358  if (!CDAudio_Play(track, true))
359  Miniaudio_Play(track, true);
360 }
361 
362 /*
363 ====================
364 CalcFov
365 ====================
366 */
367 float CalcFov (float fov_x, float width, float height)
368 {
369  float a;
370  float x;
371 
372  if (fov_x < 1 || fov_x > 179)
373  Com_Error (ERR_DROP, "Bad fov: %f", fov_x);
374 
375  x = width/tan(fov_x/360*M_PI);
376 
377  a = atan (height/x);
378 
379  a = a*360/M_PI;
380 
381  return a;
382 }
383 
384 //============================================================================
385 
386 // gun frame debugging functions
387 void V_Gun_Next_f (void)
388 {
389  gun_frame++;
390  Com_Printf ("frame %i\n", gun_frame);
391 }
392 
393 void V_Gun_Prev_f (void)
394 {
395  gun_frame--;
396  if (gun_frame < 0)
397  gun_frame = 0;
398  Com_Printf ("frame %i\n", gun_frame);
399 }
400 
401 void V_Gun_Model_f (void)
402 {
403  char name[MAX_QPATH];
404 
405  if (Cmd_Argc() != 2)
406  {
407  gun_model = NULL;
408  return;
409  }
410  Com_sprintf (name, sizeof(name), "models/%s/tris.md2", Cmd_Argv(1));
412 }
413 
414 //============================================================================
415 
416 
417 /*
418 =================
419 SCR_DrawCrosshair
420 =================
421 */
422 void SCR_DrawCrosshair (void)
423 {
424  if (!crosshair->value)
425  return;
426 
427  if (crosshair->modified)
428  {
429  crosshair->modified = false;
430  SCR_TouchPics ();
431  }
432 
433  if (!crosshair_pic[0])
434  return;
435 
438 }
439 
440 /*
441 ==================
442 V_RenderView
443 
444 ==================
445 */
446 void V_RenderView( float stereo_separation )
447 {
448  extern int entitycmpfnc( const entity_t *, const entity_t * );
449 
450  if (cls.state != ca_active)
451  {
453  return;
454  }
455 
456  if (!cl.refresh_prepped)
457  {
459  return; // still loading
460  }
461 
462  if (cl_timedemo->value)
463  {
464  if (!cl.timedemo_start)
467  }
468 
469  // an invalid frame will just use the exact previous refdef
470  // we can't use the old frame if the video mode has changed, though...
472  {
473  cl.force_refdef = false;
474  viewsize->modified = false;
475 
476  V_ClearScene ();
477 
478  // build a refresh entity list and calc cl.sim*
479  // this also calls CL_CalcViewValues which loads
480  // v_forward, etc.
481  CL_AddEntities ();
482 
483  if (cl_testparticles->value)
484  V_TestParticles ();
485  if (cl_testentities->value)
486  V_TestEntities ();
487  if (cl_testlights->value)
488  V_TestLights ();
489  if (cl_testblend->value)
490  {
491  cl.refdef.blend[0] = 1;
492  cl.refdef.blend[1] = 0.5;
493  cl.refdef.blend[2] = 0.25;
494  cl.refdef.blend[3] = 0.5;
495  }
496 
497  // offset vieworg appropriately if we're doing stereo separation
498  if ( stereo_separation != 0 )
499  {
500  vec3_t tmp;
501 
502  VectorScale( cl.v_right, stereo_separation, tmp );
504  }
505 
506  // never let it sit exactly on a node line, because a water plane can
507  // dissapear when viewed with the eye exactly on it.
508  // the server protocol only specifies to 1/8 pixel, so add 1/16 in each axis
509  cl.refdef.vieworg[0] += 1.0/16;
510  cl.refdef.vieworg[1] += 1.0/16;
511  cl.refdef.vieworg[2] += 1.0/16;
512 
513  cl.refdef.x = scr_vrect.x;
514  cl.refdef.y = scr_vrect.y;
518  cl.refdef.time = cl.time*0.001;
519 
521 
522  if (!cl_add_entities->value)
523  r_numentities = 0;
524  if (!cl_add_particles->value)
525  r_numparticles = 0;
526  if (!cl_add_lights->value)
527  r_numdlights = 0;
528  if (!cl_add_blend->value)
529  {
531  }
532 
540 
542 
543  // sort entities for better cache locality
544  qsort( cl.refdef.entities, cl.refdef.num_entities, sizeof( cl.refdef.entities[0] ), (int (*)(const void *, const void *))entitycmpfnc );
545  }
546 
547  re.RenderFrame (&cl.refdef);
548  if (cl_stats->value)
549  Com_Printf ("ent:%i lt:%i part:%i\n", r_numentities, r_numdlights, r_numparticles);
550  if ( log_stats->value && ( log_stats_file != 0 ) )
551  fprintf( log_stats_file, "%i,%i,%i,",r_numentities, r_numdlights, r_numparticles);
552 
553 
557 
559 }
560 
561 
562 /*
563 =============
564 V_Viewpos_f
565 =============
566 */
567 void V_Viewpos_f (void)
568 {
569  Com_Printf ("(%i %i %i) : %i\n", (int)cl.refdef.vieworg[0],
570  (int)cl.refdef.vieworg[1], (int)cl.refdef.vieworg[2],
571  (int)cl.refdef.viewangles[YAW]);
572 }
573 
574 /*
575 =============
576 V_Init
577 =============
578 */
579 void V_Init (void)
580 {
581  Cmd_AddCommand ("gun_next", V_Gun_Next_f);
582  Cmd_AddCommand ("gun_prev", V_Gun_Prev_f);
583  Cmd_AddCommand ("gun_model", V_Gun_Model_f);
584 
585  Cmd_AddCommand ("viewpos", V_Viewpos_f);
586 
587  crosshair = Cvar_Get ("crosshair", "0", CVAR_ARCHIVE);
588 
589  cl_testblend = Cvar_Get ("cl_testblend", "0", 0);
590  cl_testparticles = Cvar_Get ("cl_testparticles", "0", 0);
591  cl_testentities = Cvar_Get ("cl_testentities", "0", 0);
592  cl_testlights = Cvar_Get ("cl_testlights", "0", 0);
593 
594  cl_stats = Cvar_Get ("cl_stats", "0", 0);
595 }
crosshair
cvar_t * crosshair
Definition: cl_view.c:33
MAX_CLIENTS
#define MAX_CLIENTS
Definition: q_shared.h:86
refdef_t::vieworg
float vieworg[3]
Definition: ref.h:106
cl_paused
cvar_t * cl_paused
Definition: cl_main.c:60
SCR_TouchPics
void SCR_TouchPics(void)
Definition: cl_scrn.c:863
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:73
CS_SKY
#define CS_SKY
Definition: q_shared.h:1103
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:80
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:89
lightstyle_t::rgb
float rgb[3]
Definition: ref.h:98
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:501
V_TestParticles
void V_TestParticles(void)
Definition: cl_view.c:153
V_Init
void V_Init(void)
Definition: cl_view.c:579
log_stats
cvar_t * log_stats
Definition: common.c:41
client_state_t::v_forward
vec3_t v_forward
Definition: client.h:133
CL_AddEntities
void CL_AddEntities(void)
Definition: cl_ents.c:1477
entitycmpfnc
int entitycmpfnc(const entity_t *a, const entity_t *b)
Definition: cl_scrn.c:611
client_state_t::v_up
vec3_t v_up
Definition: client.h:133
cl_add_blend
cvar_t * cl_add_blend
Definition: cl_main.c:54
refdef_t::areabits
byte * areabits
Definition: ref.h:112
num_cl_weaponmodels
int num_cl_weaponmodels
Definition: cl_view.c:56
r_numentities
int r_numentities
Definition: cl_view.c:47
cvar_s::modified
qboolean modified
Definition: q_shared.h:330
CS_SKYROTATE
#define CS_SKYROTATE
Definition: q_shared.h:1105
vrect_s::height
int height
Definition: vid.h:24
CS_CDTRACK
#define CS_CDTRACK
Definition: q_shared.h:1102
refexport_t::RegisterPic
struct image_s *(* RegisterPic)(char *name)
Definition: ref.h:160
Miniaudio_Play
void Miniaudio_Play(int track, qboolean looping)
Definition: snd_miniaudio.c:225
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:1112
x
GLint GLenum GLint x
Definition: qgl_win.c:116
V_Viewpos_f
void V_Viewpos_f(void)
Definition: cl_view.c:567
VectorClear
#define VectorClear(a)
Definition: q_shared.h:166
i
int i
Definition: q_shared.c:305
refdef_t::y
int y
Definition: ref.h:104
MAX_ENTITIES
#define MAX_ENTITIES
Definition: ref.h:26
client_state_t::model_clip
struct cmodel_s * model_clip[MAX_MODELS]
Definition: client.h:164
V_RenderView
void V_RenderView(float stereo_separation)
Definition: cl_view.c:446
ca_active
@ ca_active
Definition: client.h:189
model_s
Definition: r_model.h:171
dlight_t::origin
vec3_t origin
Definition: ref.h:84
refdef_t::rdflags
int rdflags
Definition: ref.h:110
width
GLint GLsizei width
Definition: qgl_win.c:115
client_state_t::refdef
refdef_t refdef
Definition: client.h:131
M_PI
#define M_PI
Definition: q_shared.h:142
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:1194
cvar_s
Definition: q_shared.h:324
client_state_t::force_refdef
qboolean force_refdef
Definition: client.h:100
frame_t::areabits
byte areabits[MAX_MAP_AREAS/8]
Definition: client.h:49
intensity
cvar_t * intensity
Definition: gl_image.c:31
refexport_t::EndRegistration
void(* EndRegistration)(void)
Definition: ref.h:162
viddef
viddef_t viddef
Definition: vid_dll.c:54
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:96
SCR_DrawCrosshair
void SCR_DrawCrosshair(void)
Definition: cl_view.c:422
CS_IMAGES
#define CS_IMAGES
Definition: q_shared.h:1114
V_ClearScene
void V_ClearScene(void)
Definition: cl_view.c:65
SCR_UpdateScreen
void SCR_UpdateScreen(void)
Definition: cl_scrn.c:1215
u
static int u
Definition: r_part.c:472
crosshair_height
int crosshair_height
Definition: cl_scrn.c:75
r_entities
entity_t r_entities[MAX_ENTITIES]
Definition: cl_view.c:48
V_Gun_Prev_f
void V_Gun_Prev_f(void)
Definition: cl_view.c:393
clientinfo_t::model
struct model_s * model
Definition: client.h:78
CDAudio_Play
qboolean CDAudio_Play(int track, qboolean looping)
Definition: cd_win.c:186
cl_add_lights
cvar_t * cl_add_lights
Definition: cl_main.c:52
client_state_t::model_draw
struct model_s * model_draw[MAX_MODELS]
Definition: client.h:163
r
GLdouble GLdouble r
Definition: qgl_win.c:336
cl_add_entities
cvar_t * cl_add_entities
Definition: cl_main.c:53
viddef_t::width
unsigned width
Definition: vid.h:29
refdef_t::num_dlights
int num_dlights
Definition: ref.h:119
particle_t::alpha
float alpha
Definition: ref.h:93
CL_PrepRefresh
void CL_PrepRefresh(void)
Definition: cl_view.c:250
cl_stats
cvar_t * cl_stats
Definition: cl_view.c:39
Sys_SendKeyEvents
void Sys_SendKeyEvents(void)
Definition: sys_win.c:406
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
CS_PLAYERSKINS
#define CS_PLAYERSKINS
Definition: q_shared.h:1117
V_AddParticle
void V_AddParticle(vec3_t org, int color, float alpha)
Definition: cl_view.c:93
dlight_t::color
vec3_t color
Definition: ref.h:85
V_Gun_Next_f
void V_Gun_Next_f(void)
Definition: cl_view.c:387
CVAR_ARCHIVE
#define CVAR_ARCHIVE
Definition: q_shared.h:316
viddef_t::height
unsigned height
Definition: vid.h:29
gun_frame
int gun_frame
Definition: cl_view.c:28
cvar_s::value
float value
Definition: q_shared.h:331
frame_t::valid
qboolean valid
Definition: client.h:45
cl_testblend
cvar_t * cl_testblend
Definition: cl_view.c:37
client_state_t::timedemo_frames
int timedemo_frames
Definition: client.h:95
cl_add_particles
cvar_t * cl_add_particles
Definition: cl_main.c:51
refdef_t::blend
float blend[4]
Definition: ref.h:108
V_TestEntities
void V_TestEntities(void)
Definition: cl_view.c:183
NULL
#define NULL
Definition: q_shared.h:67
client_state_t::frame
frame_t frame
Definition: client.h:116
cl_testparticles
cvar_t * cl_testparticles
Definition: cl_view.c:34
CalcFov
float CalcFov(float fov_x, float width, float height)
Definition: cl_view.c:367
refdef_t::time
float time
Definition: ref.h:109
vrect_s::x
int x
Definition: vid.h:24
cl_weaponmodels
char cl_weaponmodels[MAX_CLIENTWEAPONMODELS][MAX_QPATH]
Definition: cl_view.c:55
V_AddLightStyle
void V_AddLightStyle(int style, float r, float g, float b)
Definition: cl_view.c:132
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:181
MAX_CLIENTWEAPONMODELS
#define MAX_CLIENTWEAPONMODELS
Definition: client.h:69
particle_t
Definition: ref.h:89
Con_ClearNotify
void Con_ClearNotify(void)
Definition: console.c:208
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
alpha
GLfloat GLfloat GLfloat alpha
Definition: qgl_win.c:74
refdef_t::num_particles
int num_particles
Definition: ref.h:122
client_state_t::time
int time
Definition: client.h:127
refdef_t::height
int height
Definition: ref.h:104
CS_SKYAXIS
#define CS_SKYAXIS
Definition: q_shared.h:1104
refexport_t::RegisterModel
struct model_s *(* RegisterModel)(char *name)
Definition: ref.h:158
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:744
CM_InlineModel
cmodel_t * CM_InlineModel(char *name)
Definition: cmodel.c:639
cl_testlights
cvar_t * cl_testlights
Definition: cl_view.c:36
r_particles
particle_t r_particles[MAX_PARTICLES]
Definition: cl_view.c:51
particle_t::origin
vec3_t origin
Definition: ref.h:91
name
cvar_t * name
Definition: cl_main.c:79
client_state_t::image_precache
struct image_s * image_precache[MAX_IMAGES]
Definition: client.h:167
refexport_t::BeginRegistration
void(* BeginRegistration)(char *map)
Definition: ref.h:157
lightstyle_t
Definition: ref.h:96
clientinfo_t::skin
struct image_s * skin
Definition: client.h:75
VectorAdd
#define VectorAdd(a, b, c)
Definition: q_shared.h:164
SCR_AddDirtyPoint
void SCR_AddDirtyPoint(int x, int y)
Definition: cl_scrn.c:669
re
refexport_t re
Definition: vid_dll.c:32
frame_t::playerstate
player_state_t playerstate
Definition: client.h:50
V_AddEntity
void V_AddEntity(entity_t *ent)
Definition: cl_view.c:79
viewsize
cvar_t * viewsize
Definition: vid_dll.c:51
client_state_t::v_right
vec3_t v_right
Definition: client.h:133
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:165
crosshair_pic
char crosshair_pic[MAX_QPATH]
Definition: cl_scrn.c:74
refdef_t::lightstyles
lightstyle_t * lightstyles
Definition: ref.h:114
refexport_t::EndWorldRenderpass
void(* EndWorldRenderpass)(void)
Definition: ref.h:183
refdef_t::particles
particle_t * particles
Definition: ref.h:123
vrect_s::width
int width
Definition: vid.h:24
refdef_t::num_entities
int num_entities
Definition: ref.h:116
refexport_t::SetSky
void(* SetSky)(char *name, float rotate, vec3_t axis)
Definition: ref.h:161
r_numdlights
int r_numdlights
Definition: cl_view.c:44
client_static_t::state
connstate_t state
Definition: client.h:204
vid_hudscale
cvar_t * vid_hudscale
Definition: vid_dll.c:48
dlight_t
Definition: ref.h:82
cl_timedemo
cvar_t * cl_timedemo
Definition: cl_main.c:61
entity_s
Definition: ref.h:49
cl_testentities
cvar_t * cl_testentities
Definition: cl_view.c:35
log_stats_file
FILE * log_stats_file
Definition: common.c:38
refdef_t::fov_x
float fov_x
Definition: ref.h:105
refdef_t::fov_y
float fov_y
Definition: ref.h:105
particle_t::color
int color
Definition: ref.h:92
client_state_t::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:158
refdef_t::dlights
dlight_t * dlights
Definition: ref.h:120
refdef_t::width
int width
Definition: ref.h:104
CL_RegisterTEntModels
void CL_RegisterTEntModels(void)
Definition: cl_tent.c:172
lightstyle_t::white
float white
Definition: ref.h:99
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:104
refdef_t::viewangles
float viewangles[3]
Definition: ref.h:107
Sys_Milliseconds
int Sys_Milliseconds(void)
Definition: q_shwin.c:120
refdef_t::entities
entity_t * entities
Definition: ref.h:117
refdef_t::x
int x
Definition: ref.h:104
cls
client_static_t cls
Definition: cl_main.c:90
V_Gun_Model_f
void V_Gun_Model_f(void)
Definition: cl_view.c:401
V_TestLights
void V_TestLights(void)
Definition: cl_view.c:215
r_dlights
dlight_t r_dlights[MAX_DLIGHTS]
Definition: cl_view.c:45
r_numparticles
int r_numparticles
Definition: cl_view.c:50
CL_LoadClientinfo
void CL_LoadClientinfo(clientinfo_t *ci, char *s)
Definition: cl_parse.c:380
r_lightstyles
lightstyle_t r_lightstyles[MAX_LIGHTSTYLES]
Definition: cl_view.c:53
MAX_LIGHTSTYLES
#define MAX_LIGHTSTYLES
Definition: q_shared.h:88
scr_vrect
vrect_t scr_vrect
Definition: cl_scrn.c:46
cl
client_state_t cl
Definition: cl_main.c:91
MAX_IMAGES
#define MAX_IMAGES
Definition: q_shared.h:91
dlight_t::intensity
float intensity
Definition: ref.h:86
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
refexport_t::RenderFrame
void(* RenderFrame)(refdef_t *fd)
Definition: ref.h:164
client.h
V_AddLight
void V_AddLight(vec3_t org, float intensity, float r, float g, float b)
Definition: cl_view.c:111
vrect_s::y
int y
Definition: vid.h:24
MAX_PARTICLES
#define MAX_PARTICLES
Definition: ref.h:27