icculus quake2 doxygen  1.0 dev
r_misc.c File Reference
#include "r_local.h"

Go to the source code of this file.

Macros

#define NUM_MIPS   4
 

Functions

void D_Patch (void)
 
void D_ViewChanged (void)
 
void R_PrintTimes (void)
 
void R_PrintDSpeeds (void)
 
void R_PrintAliasStats (void)
 
void R_TransformFrustum (void)
 
void TransformVector (vec3_t in, vec3_t out)
 
void R_TransformPlane (mplane_t *p, float *normal, float *dist)
 
void R_SetUpFrustumIndexes (void)
 
void R_ViewChanged (vrect_t *vr)
 
void R_SetupFrame (void)
 
void R_SurfacePatch (void)
 
void WritePCXfile (char *filename, byte *data, int width, int height, int rowbytes, byte *palette)
 
void R_ScreenShot_f (void)
 

Variables

cvar_tsw_mipcap
 
cvar_tsw_mipscale
 
surfcache_td_initial_rover
 
qboolean d_roverwrapped
 
int d_minmip
 
float d_scalemip [NUM_MIPS-1]
 
static float basemip [NUM_MIPS-1] = {1.0, 0.5*0.8, 0.25*0.8}
 
int d_aflatcolor
 
int d_vrectx
 
int d_vrecty
 
int d_vrectright_particle
 
int d_vrectbottom_particle
 
int d_pix_min
 
int d_pix_max
 
int d_pix_shift
 
int d_scantable [MAXHEIGHT]
 
short * zspantable [MAXHEIGHT]
 
unsigned char * alias_colormap
 

Macro Definition Documentation

◆ NUM_MIPS

#define NUM_MIPS   4

Definition at line 24 of file r_misc.c.

Function Documentation

◆ D_Patch()

void D_Patch ( void  )

Definition at line 50 of file r_misc.c.

51 {
52 #if id386
53  extern void D_Aff8Patch( void );
54  static qboolean protectset8 = false;
55  extern void D_PolysetAff8Start( void );
56 
57  if (!protectset8)
58  {
59  Sys_MakeCodeWriteable ((int)D_PolysetAff8Start,
60  (int)D_Aff8Patch - (int)D_PolysetAff8Start);
62  (long)R_Surf8End - (long)R_Surf8Start);
63  protectset8 = true;
64  }
66 
67  R_Surf8Patch ();
68  D_Aff8Patch();
69 #endif
70 }

Referenced by D_ViewChanged().

◆ D_ViewChanged()

void D_ViewChanged ( void  )

Definition at line 78 of file r_misc.c.

79 {
80  int i;
81 
83  if (yscale > xscale)
85 
86  d_zrowbytes = vid.width * 2;
87  d_zwidth = vid.width;
88 
89  d_pix_min = r_refdef.vrect.width / 320;
90  if (d_pix_min < 1)
91  d_pix_min = 1;
92 
93  d_pix_max = (int)((float)r_refdef.vrect.width / (320.0 / 4.0) + 0.5);
94  d_pix_shift = 8 - (int)((float)r_refdef.vrect.width / 320.0 + 0.5);
95  if (d_pix_max < 1)
96  d_pix_max = 1;
97 
103 
104  for (i=0 ; i<vid.height; i++)
105  {
108  }
109 
110  /*
111  ** clear Z-buffer and color-buffers if we're doing the gallery
112  */
114  {
115  memset( d_pzbuffer, 0xff, vid.width * vid.height * sizeof( d_pzbuffer[0] ) );
117  }
118 
120 
121  D_Patch ();
122 }

Referenced by R_ViewChanged().

◆ R_PrintAliasStats()

void R_PrintAliasStats ( void  )

Definition at line 175 of file r_misc.c.

176 {
177  ri.Con_Printf (PRINT_ALL,"%3i polygon model drawn\n", r_amodels_drawn);
178 }

Referenced by R_RenderFrame().

◆ R_PrintDSpeeds()

void R_PrintDSpeeds ( void  )

Definition at line 151 of file r_misc.c.

152 {
153  int ms, dp_time, r_time2, rw_time, db_time, se_time, de_time, da_time;
154 
155  r_time2 = Sys_Milliseconds ();
156 
157  da_time = (da_time2 - da_time1);
158  dp_time = (dp_time2 - dp_time1);
159  rw_time = (rw_time2 - rw_time1);
160  db_time = (db_time2 - db_time1);
161  se_time = (se_time2 - se_time1);
162  de_time = (de_time2 - de_time1);
163  ms = (r_time2 - r_time1);
164 
165  ri.Con_Printf (PRINT_ALL,"%3i %2ip %2iw %2ib %2is %2ie %2ia\n",
166  ms, dp_time, rw_time, db_time, se_time, de_time, da_time);
167 }

Referenced by R_RenderFrame().

◆ R_PrintTimes()

void R_PrintTimes ( void  )

Definition at line 131 of file r_misc.c.

132 {
133  int r_time2;
134  int ms;
135 
136  r_time2 = Sys_Milliseconds ();
137 
138  ms = r_time2 - r_time1;
139 
140  ri.Con_Printf (PRINT_ALL,"%5i ms %3i/%3i/%3i poly %3i surf\n",
142  c_surf = 0;
143 }

Referenced by R_RenderFrame().

◆ R_ScreenShot_f()

void R_ScreenShot_f ( void  )

Definition at line 619 of file r_misc.c.

620 {
621  int i;
622  char pcxname[80];
623  char checkname[MAX_OSPATH];
624  FILE *f;
625  byte palette[768];
626 
627  // create the scrnshots directory if it doesn't exist
628  Com_sprintf (checkname, sizeof(checkname), "%s/scrnshot", ri.FS_Gamedir());
629  Sys_Mkdir (checkname);
630 
631 //
632 // find a file name to save it to
633 //
634  strcpy(pcxname,"quake00.pcx");
635 
636  for (i=0 ; i<=99 ; i++)
637  {
638  pcxname[5] = i/10 + '0';
639  pcxname[6] = i%10 + '0';
640  Com_sprintf (checkname, sizeof(checkname), "%s/scrnshot/%s", ri.FS_Gamedir(), pcxname);
641  f = fopen (checkname, "r");
642  if (!f)
643  break; // file doesn't exist
644  fclose (f);
645  }
646  if (i==100)
647  {
648  ri.Con_Printf (PRINT_ALL, "R_ScreenShot_f: Couldn't create a PCX");
649  return;
650  }
651 
652  // turn the current 32 bit palette into a 24 bit palette
653  for (i=0 ; i<256 ; i++)
654  {
655  palette[i*3+0] = sw_state.currentpalette[i*4+0];
656  palette[i*3+1] = sw_state.currentpalette[i*4+1];
657  palette[i*3+2] = sw_state.currentpalette[i*4+2];
658  }
659 
660 //
661 // save the pcx file
662 //
663 
665  palette);
666 
667  ri.Con_Printf (PRINT_ALL, "Wrote %s\n", checkname);
668 }

Referenced by R_Register().

◆ R_SetupFrame()

void R_SetupFrame ( void  )

Definition at line 426 of file r_misc.c.

427 {
428  int i;
429  vrect_t vrect;
430 
431  if (r_fullbright->modified)
432  {
433  r_fullbright->modified = false;
434  D_FlushCaches (); // so all lighting changes
435  }
436 
437  r_framecount++;
438 
439 
440 // build the transformation matrix for the given view angles
443 
445 
446 // current viewleaf
447  if ( !( r_newrefdef.rdflags & RDF_NOWORLDMODEL ) )
448  {
451  }
452 
454  r_dowarp = true;
455  else
456  r_dowarp = false;
457 
458  if (r_dowarp)
459  { // warp into off screen buffer
460  vrect.x = 0;
461  vrect.y = 0;
464 
467  }
468  else
469  {
470  vrect.x = r_newrefdef.x;
471  vrect.y = r_newrefdef.y;
472  vrect.width = r_newrefdef.width;
473  vrect.height = r_newrefdef.height;
474 
475  d_viewbuffer = (void *)vid.buffer;
477  }
478 
479  R_ViewChanged (&vrect);
480 
481 // start off with just the four screen edge clip planes
484 
485 // save base values
489 
490 // clear frame counts
491  c_faceclip = 0;
492  d_spanpixcount = 0;
493  r_polycount = 0;
494  r_drawnpolycount = 0;
495  r_wholepolycount = 0;
496  r_amodels_drawn = 0;
497  r_outofsurfaces = 0;
498  r_outofedges = 0;
499 
500 // d_setup
501  d_roverwrapped = false;
503 
505  if (d_minmip > 3)
506  d_minmip = 3;
507  else if (d_minmip < 0)
508  d_minmip = 0;
509 
510  for (i=0 ; i<(NUM_MIPS-1) ; i++)
512 
513  d_aflatcolor = 0;
514 }

◆ R_SetUpFrustumIndexes()

void R_SetUpFrustumIndexes ( void  )

Definition at line 295 of file r_misc.c.

296 {
297  int i, j, *pindex;
298 
299  pindex = r_frustum_indexes;
300 
301  for (i=0 ; i<4 ; i++)
302  {
303  for (j=0 ; j<3 ; j++)
304  {
305  if (view_clipplanes[i].normal[j] < 0)
306  {
307  pindex[j] = j;
308  pindex[j+3] = j+3;
309  }
310  else
311  {
312  pindex[j] = j+3;
313  pindex[j+3] = j;
314  }
315  }
316 
317  // FIXME: do just once at start
318  pfrustum_indexes[i] = pindex;
319  pindex += 6;
320  }
321 }

Referenced by R_SetupFrame().

◆ R_SurfacePatch()

void R_SurfacePatch ( void  )

Definition at line 524 of file r_misc.c.

525 {
526  // we only patch code on Intel
527 }

Referenced by R_EdgeDrawing(), and R_NewMap().

◆ R_TransformFrustum()

void R_TransformFrustum ( void  )

Definition at line 187 of file r_misc.c.

188 {
189  int i;
190  vec3_t v, v2;
191 
192  for (i=0 ; i<4 ; i++)
193  {
194  v[0] = screenedge[i].normal[2];
195  v[1] = -screenedge[i].normal[0];
196  v[2] = screenedge[i].normal[1];
197 
198  v2[0] = v[1]*vright[0] + v[2]*vup[0] + v[0]*vpn[0];
199  v2[1] = v[1]*vright[1] + v[2]*vup[1] + v[0]*vpn[1];
200  v2[2] = v[1]*vright[2] + v[2]*vup[2] + v[0]*vpn[2];
201 
202  VectorCopy (v2, view_clipplanes[i].normal);
203 
205  }
206 }

Referenced by D_DrawSurfaces(), D_SolidSurf(), D_TurbulentSurf(), R_DrawBEntitiesOnList(), R_RotateBmodel(), and R_SetupFrame().

◆ R_TransformPlane()

void R_TransformPlane ( mplane_t p,
float *  normal,
float *  dist 
)

Definition at line 279 of file r_misc.c.

280 {
281  float d;
282 
283  d = DotProduct (r_origin, p->normal);
284  *dist = p->dist - d;
285 // TODO: when we have rotating entities, this will need to use the view matrix
286  TransformVector (p->normal, normal);
287 }

◆ R_ViewChanged()

void R_ViewChanged ( vrect_t vr)

Definition at line 331 of file r_misc.c.

332 {
333  int i;
334 
335  r_refdef.vrect = *vr;
336 
337  r_refdef.horizontalFieldOfView = 2*tan((float)r_newrefdef.fov_x/360*M_PI);;
338  verticalFieldOfView = 2*tan((float)r_newrefdef.fov_y/360*M_PI);
339 
340  r_refdef.fvrectx = (float)r_refdef.vrect.x;
341  r_refdef.fvrectx_adj = (float)r_refdef.vrect.x - 0.5;
342  r_refdef.vrect_x_adj_shift20 = (r_refdef.vrect.x<<20) + (1<<19) - 1;
343  r_refdef.fvrecty = (float)r_refdef.vrect.y;
344  r_refdef.fvrecty_adj = (float)r_refdef.vrect.y - 0.5;
346  r_refdef.vrectright_adj_shift20 = (r_refdef.vrectright<<20) + (1<<19) - 1;
349  r_refdef.vrectrightedge = (float)r_refdef.vrectright - 0.99;
353 
362 
365 
366 // values for perspective projection
367 // if math were exact, the values would range from 0.5 to to range+0.5
368 // hopefully they wll be in the 0.000001 to range+.999999 and truncate
369 // the polygon rasterization will never render in the first row or column
370 // but will definately render in the [range] row and column, so adjust the
371 // buffer origin to get an exact edge to edge fill
372  xcenter = ((float)r_refdef.vrect.width * XCENTERING) +
373  r_refdef.vrect.x - 0.5;
375  ycenter = ((float)r_refdef.vrect.height * YCENTERING) +
376  r_refdef.vrect.y - 0.5;
378 
381  xscaleinv = 1.0 / xscale;
382 
383  yscale = xscale;
385  yscaleinv = 1.0 / yscale;
388 
389 // left side clip
391  screenedge[0].normal[1] = 0;
392  screenedge[0].normal[2] = 1;
394 
395 // right side clip
396  screenedge[1].normal[0] =
397  1.0 / ((1.0-xOrigin)*r_refdef.horizontalFieldOfView);
398  screenedge[1].normal[1] = 0;
399  screenedge[1].normal[2] = 1;
401 
402 // top side clip
403  screenedge[2].normal[0] = 0;
404  screenedge[2].normal[1] = -1.0 / (yOrigin*verticalFieldOfView);
405  screenedge[2].normal[2] = 1;
407 
408 // bottom side clip
409  screenedge[3].normal[0] = 0;
410  screenedge[3].normal[1] = 1.0 / ((1.0-yOrigin)*verticalFieldOfView);
411  screenedge[3].normal[2] = 1;
413 
414  for (i=0 ; i<4 ; i++)
415  VectorNormalize (screenedge[i].normal);
416 
417  D_ViewChanged ();
418 }

Referenced by R_SetupFrame().

◆ TransformVector()

void TransformVector ( vec3_t  in,
vec3_t  out 
)

◆ WritePCXfile()

void WritePCXfile ( char *  filename,
byte data,
int  width,
int  height,
int  rowbytes,
byte palette 
)

Definition at line 546 of file r_misc.c.

548 {
549  int i, j, length;
550  pcx_t *pcx;
551  byte *pack;
552  FILE *f;
553 
554  pcx = (pcx_t *)malloc (width*height*2+1000);
555  if (!pcx)
556  return;
557 
558  pcx->manufacturer = 0x0a; // PCX id
559  pcx->version = 5; // 256 color
560  pcx->encoding = 1; // uncompressed
561  pcx->bits_per_pixel = 8; // 256 color
562  pcx->xmin = 0;
563  pcx->ymin = 0;
564  pcx->xmax = LittleShort((short)(width-1));
565  pcx->ymax = LittleShort((short)(height-1));
566  pcx->hres = LittleShort((short)width);
567  pcx->vres = LittleShort((short)height);
568  memset (pcx->palette,0,sizeof(pcx->palette));
569  pcx->color_planes = 1; // chunky image
570  pcx->bytes_per_line = LittleShort((short)width);
571  pcx->palette_type = LittleShort(2); // not a grey scale
572  memset (pcx->filler,0,sizeof(pcx->filler));
573 
574 // pack the image
575  pack = &pcx->data;
576 
577  for (i=0 ; i<height ; i++)
578  {
579  for (j=0 ; j<width ; j++)
580  {
581  if ( (*data & 0xc0) != 0xc0)
582  *pack++ = *data++;
583  else
584  {
585  *pack++ = 0xc1;
586  *pack++ = *data++;
587  }
588  }
589 
590  data += rowbytes - width;
591  }
592 
593 // write the palette
594  *pack++ = 0x0c; // palette ID byte
595  for (i=0 ; i<768 ; i++)
596  *pack++ = *palette++;
597 
598 // write output file
599  length = pack - (byte *)pcx;
600  f = fopen (filename, "wb");
601  if (!f)
602  ri.Con_Printf (PRINT_ALL, "Failed to open to %s\n", filename);
603  else
604  {
605  fwrite ((void *)pcx, 1, length, f);
606  fclose (f);
607  }
608 
609  free (pcx);
610 }

Referenced by R_ScreenShot_f().

Variable Documentation

◆ alias_colormap

unsigned char* alias_colormap

Definition at line 76 of file r_misc.c.

Referenced by D_ViewChanged().

◆ basemip

float basemip[NUM_MIPS-1] = {1.0, 0.5*0.8, 0.25*0.8}
static

Definition at line 34 of file r_misc.c.

Referenced by R_SetupFrame().

◆ d_aflatcolor

int d_aflatcolor

Definition at line 65 of file r_polyse.c.

Referenced by R_PolysetFillSpans8(), and R_SetupFrame().

◆ d_initial_rover

surfcache_t* d_initial_rover

Definition at line 29 of file r_misc.c.

Referenced by D_SCAlloc(), and R_SetupFrame().

◆ d_minmip

int d_minmip

Definition at line 31 of file r_misc.c.

Referenced by D_MipLevelForScale(), and R_SetupFrame().

◆ d_pix_max

int d_pix_max

Definition at line 40 of file r_misc.c.

Referenced by D_ViewChanged().

◆ d_pix_min

int d_pix_min

Definition at line 40 of file r_misc.c.

Referenced by D_ViewChanged(), and R_DrawParticle().

◆ d_pix_shift

int d_pix_shift

Definition at line 40 of file r_misc.c.

Referenced by D_ViewChanged().

◆ d_roverwrapped

qboolean d_roverwrapped

Definition at line 30 of file r_misc.c.

Referenced by D_SCAlloc(), and R_SetupFrame().

◆ d_scalemip

float d_scalemip[NUM_MIPS-1]

Definition at line 32 of file r_misc.c.

Referenced by D_MipLevelForScale(), and R_SetupFrame().

◆ d_scantable

int d_scantable[MAXHEIGHT]

Definition at line 42 of file r_misc.c.

Referenced by D_ViewChanged(), R_DrawParticle(), and R_PolygonDrawSpans().

◆ d_vrectbottom_particle

int d_vrectbottom_particle

Definition at line 38 of file r_misc.c.

Referenced by D_ViewChanged().

◆ d_vrectright_particle

int d_vrectright_particle

Definition at line 38 of file r_misc.c.

Referenced by D_ViewChanged().

◆ d_vrectx

int d_vrectx

Definition at line 38 of file r_misc.c.

Referenced by D_ViewChanged(), and R_DrawParticle().

◆ d_vrecty

int d_vrecty

Definition at line 38 of file r_misc.c.

Referenced by D_ViewChanged().

◆ sw_mipcap

cvar_t* sw_mipcap

Definition at line 26 of file r_misc.c.

Referenced by R_Register(), and R_SetupFrame().

◆ sw_mipscale

cvar_t* sw_mipscale

Definition at line 27 of file r_misc.c.

Referenced by R_Register(), and R_SetupFrame().

◆ zspantable

short* zspantable[MAXHEIGHT]

Definition at line 43 of file r_misc.c.

Referenced by D_ViewChanged().

d_vrecty
int d_vrecty
Definition: r_misc.c:38
c_surf
int c_surf
Definition: r_main.c:58
oldrefdef_t::fvrectright
float fvrectright
Definition: r_local.h:125
height
GLsizei height
Definition: qgl_win.c:69
WritePCXfile
void WritePCXfile(char *filename, byte *data, int width, int height, int rowbytes, byte *palette)
Definition: r_misc.c:546
r_framecount
int r_framecount
Definition: r_main.c:91
oldrefdef_t::fvrectx_adj
float fvrectx_adj
Definition: r_local.h:120
r_time1
float r_time1
Definition: r_main.c:48
yscaleshrink
float yscaleshrink
Definition: r_local.h:541
LittleShort
short LittleShort(short l)
Definition: q_shared.c:946
oldrefdef_t::vieworg
vec3_t vieworg
Definition: r_local.h:132
int
CONST PIXELFORMATDESCRIPTOR int
Definition: qgl_win.c:35
TransformVector
void TransformVector(vec3_t in, vec3_t out)
Definition: r_misc.c:215
Sys_MakeCodeWriteable
void Sys_MakeCodeWriteable(unsigned long startaddr, unsigned long length)
Definition: rw_imp.c:408
viddef_t::buffer
pixel_t * buffer
Definition: r_local.h:88
R_Surf8Start
void R_Surf8Start(void)
pfrustum_indexes
int * pfrustum_indexes[4]
Definition: r_main.c:98
c_faceclip
int c_faceclip
Definition: r_rast.c:34
de_time1
float de_time1
Definition: r_local.h:725
r_outofedges
int r_outofedges
Definition: r_main.c:52
screenedge
mplane_t screenedge[4]
Definition: r_main.c:86
ri
refimport_t ri
Definition: r_main.c:25
pcx_t
Definition: qfiles.h:60
verticalFieldOfView
float verticalFieldOfView
Definition: r_main.c:83
Sys_Mkdir
void Sys_Mkdir(char *path)
Definition: q_shwin.c:135
aliasxcenter
float aliasxcenter
Definition: r_local.h:702
d_aflatcolor
int d_aflatcolor
Definition: r_polyse.c:65
oldrefdef_t::viewangles
vec3_t viewangles
Definition: r_local.h:133
v
GLdouble v
Definition: qgl_win.c:143
cvar_s::modified
qboolean modified
Definition: q_shared.h:323
yscaleinv
float yscaleinv
Definition: r_local.h:540
d_vrectbottom_particle
int d_vrectbottom_particle
Definition: r_misc.c:38
vrect_s::height
int height
Definition: vid.h:24
vright
vec3_t vright
Definition: r_main.c:68
oldrefdef_t::vrectright_adj_shift20
int vrectright_adj_shift20
Definition: r_local.h:122
Mod_PointInLeaf
mleaf_t * Mod_PointInLeaf(vec3_t p, model_t *model)
Definition: r_model.c:188
R_Surf8Patch
void R_Surf8Patch(void)
pcx_t::data
unsigned char data
Definition: qfiles.h:74
pcx_t::version
char version
Definition: qfiles.h:63
qboolean
qboolean
Definition: q_shared.h:56
viddef_t::width
int width
Definition: vid.h:29
dp_time1
float dp_time1
Definition: r_main.c:106
oldrefdef_t::xOrigin
float xOrigin
Definition: r_local.h:129
i
int i
Definition: q_shared.c:305
d_viewbuffer
pixel_t * d_viewbuffer
Definition: r_main.c:181
refdef_t::y
int y
Definition: ref.h:122
modelorg
vec3_t modelorg
Definition: r_bsp.c:29
de_time2
float de_time2
Definition: r_local.h:725
viddef_t::height
int height
Definition: vid.h:29
r_origin
vec3_t r_origin
Definition: r_main.c:69
r_wholepolycount
int r_wholepolycount
Definition: r_main.c:96
refdef_t::rdflags
int rdflags
Definition: ref.h:128
oldrefdef_t::fvrectright_adj
float fvrectright_adj
Definition: r_local.h:123
xscaleinv
float xscaleinv
Definition: r_main.c:77
width
GLint GLsizei width
Definition: qgl_win.c:115
alias_colormap
unsigned char * alias_colormap
Definition: r_misc.c:76
pcx_t::hres
unsigned short hres
Definition: qfiles.h:67
M_PI
#define M_PI
Definition: q_shared.h:135
oldrefdef_t::yOrigin
float yOrigin
Definition: r_local.h:130
mplane_s::normal
vec3_t normal
Definition: r_model.h:59
se_time1
float se_time1
Definition: r_main.c:107
d_zrowbytes
unsigned int d_zrowbytes
Definition: r_main.c:183
xOrigin
float xOrigin
Definition: r_main.c:84
oldrefdef_t::vrectrightedge
float vrectrightedge
Definition: r_local.h:117
vup
vec3_t vup
Definition: r_main.c:66
r_viewcluster
int r_viewcluster
Definition: r_main.c:102
j
GLint j
Definition: qgl_win.c:150
rw_time2
float rw_time2
Definition: r_local.h:724
R_ViewChanged
void R_ViewChanged(vrect_t *vr)
Definition: r_misc.c:331
aliasxscale
float aliasxscale
Definition: r_main.c:79
aliasycenter
float aliasycenter
Definition: r_local.h:702
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
oldrefdef_t::fvrecty_adj
float fvrecty_adj
Definition: r_local.h:120
refimport_t::Con_Printf
void(* Con_Printf)(int print_level, char *str,...)
Definition: ref.h:228
PRINT_ALL
#define PRINT_ALL
Definition: qcommon.h:743
pcx_t::ymin
unsigned short ymin
Definition: qfiles.h:66
RDF_NOWORLDMODEL
#define RDF_NOWORLDMODEL
Definition: q_shared.h:646
base_vup
vec3_t base_vup
Definition: r_local.h:521
Draw_Fill
#define Draw_Fill
Definition: qmenu.c:53
da_time1
float da_time1
Definition: r_main.c:106
base_vpn
vec3_t base_vpn
Definition: r_local.h:522
NUM_MIPS
#define NUM_MIPS
Definition: r_misc.c:24
D_FlushCaches
void D_FlushCaches(void)
Definition: r_surf.c:418
d_pix_min
int d_pix_min
Definition: r_misc.c:40
base_vright
vec3_t base_vright
Definition: r_local.h:523
viddef_t::rowbytes
int rowbytes
Definition: r_local.h:91
xscaleshrink
float xscaleshrink
Definition: r_main.c:78
mplane_s::dist
float dist
Definition: r_model.h:60
r_polycount
int r_polycount
Definition: r_main.c:94
se_time2
float se_time2
Definition: r_local.h:725
v2
GLdouble GLdouble GLint GLint GLdouble GLdouble v2
Definition: qgl_win.c:227
sw_mipcap
cvar_t * sw_mipcap
Definition: r_misc.c:26
D_ViewChanged
void D_ViewChanged(void)
Definition: r_misc.c:78
sw_waterwarp
cvar_t * sw_waterwarp
Definition: r_main.c:124
oldrefdef_t::fvrectbottom
float fvrectbottom
Definition: r_local.h:126
oldrefdef_t::aliasvrectbottom
int aliasvrectbottom
Definition: r_local.h:116
scale_for_mip
float scale_for_mip
Definition: r_edge.c:79
oldrefdef_t::fvrectbottom_adj
float fvrectbottom_adj
Definition: r_local.h:123
basemip
static float basemip[NUM_MIPS-1]
Definition: r_misc.c:34
d_spanpixcount
int d_spanpixcount
Definition: r_main.c:93
mleaf_s::cluster
int cluster
Definition: r_model.h:154
d_pix_shift
int d_pix_shift
Definition: r_misc.c:40
r_aliasuvscale
float r_aliasuvscale
Definition: r_main.c:50
d_pix_max
int d_pix_max
Definition: r_misc.c:40
r_newrefdef
refdef_t r_newrefdef
Definition: r_main.c:36
DotProduct
#define DotProduct(x, y)
Definition: q_shared.h:155
D_Patch
void D_Patch(void)
Definition: r_misc.c:50
da_time2
float da_time2
Definition: r_local.h:723
r_worldmodel
model_t * r_worldmodel
Definition: r_main.c:39
pcx_t::ymax
unsigned short ymax
Definition: qfiles.h:66
cvar_s::value
float value
Definition: q_shared.h:324
xscale
float xscale
Definition: r_main.c:76
MAX_OSPATH
#define MAX_OSPATH
Definition: q_shared.h:74
XCENTERING
#define XCENTERING
Definition: r_local.h:215
r_outofsurfaces
int r_outofsurfaces
Definition: r_main.c:51
refimport_t::FS_Gamedir
char *(* FS_Gamedir)(void)
Definition: ref.h:240
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
pcx_t::encoding
char encoding
Definition: qfiles.h:64
r_drawnpolycount
int r_drawnpolycount
Definition: r_main.c:95
WARP_WIDTH
#define WARP_WIDTH
Definition: r_local.h:174
vrect_s::x
int x
Definition: vid.h:24
zspantable
short * zspantable[MAXHEIGHT]
Definition: r_misc.c:43
r_viewleaf
mleaf_t * r_viewleaf
Definition: r_main.c:101
pcx_t::palette_type
unsigned short palette_type
Definition: qfiles.h:72
refdef_t::height
int height
Definition: ref.h:122
r_screenwidth
int r_screenwidth
Definition: r_main.c:81
ycenter
float ycenter
Definition: r_local.h:538
d_vrectright_particle
int d_vrectright_particle
Definition: r_misc.c:38
r_dowarp
qboolean r_dowarp
Definition: r_main.c:54
pcx_t::bits_per_pixel
char bits_per_pixel
Definition: qfiles.h:65
WARP_HEIGHT
#define WARP_HEIGHT
Definition: r_local.h:175
pcx_t::xmin
unsigned short xmin
Definition: qfiles.h:66
PLANE_ANYZ
#define PLANE_ANYZ
Definition: qfiles.h:314
r_amodels_drawn
int r_amodels_drawn
Definition: r_alias.c:34
rw_time1
float rw_time1
Definition: r_local.h:724
RDF_UNDERWATER
#define RDF_UNDERWATER
Definition: q_shared.h:645
d_initial_rover
surfcache_t * d_initial_rover
Definition: r_misc.c:29
oldrefdef_t::horizontalFieldOfView
float horizontalFieldOfView
Definition: r_local.h:127
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
oldrefdef_t::aliasvrectright
int aliasvrectright
Definition: r_local.h:116
pcx_t::palette
unsigned char palette[48]
Definition: qfiles.h:68
d_roverwrapped
qboolean d_roverwrapped
Definition: r_misc.c:30
oldrefdef_t::vrect
vrect_t vrect
Definition: r_local.h:112
r_warpbuffer
byte r_warpbuffer[WARP_WIDTH *WARP_HEIGHT]
Definition: r_main.c:41
vrect_s::width
int width
Definition: vid.h:24
mplane_s::type
byte type
Definition: r_model.h:61
R_SetUpFrustumIndexes
void R_SetUpFrustumIndexes(void)
Definition: r_misc.c:295
d_scalemip
float d_scalemip[NUM_MIPS-1]
Definition: r_misc.c:32
d_vrectx
int d_vrectx
Definition: r_misc.c:38
view_clipplanes
clipplane_t view_clipplanes[4]
Definition: r_rast.c:38
db_time1
float db_time1
Definition: r_local.h:724
yOrigin
float yOrigin
Definition: r_local.h:602
d_zwidth
unsigned int d_zwidth
Definition: r_local.h:502
pcx_t::manufacturer
char manufacturer
Definition: qfiles.h:62
colormap
void * colormap
Definition: r_main.c:45
refdef_t::fov_x
float fov_x
Definition: ref.h:123
r_frustum_indexes
int r_frustum_indexes[4 *6]
Definition: r_main.c:99
refdef_t::fov_y
float fov_y
Definition: ref.h:123
aliasyscale
float aliasyscale
Definition: r_local.h:702
oldrefdef_t::vrectright
int vrectright
Definition: r_local.h:115
pcx_t::vres
unsigned short vres
Definition: qfiles.h:67
sw_mipscale
cvar_t * sw_mipscale
Definition: r_misc.c:27
R_TransformFrustum
void R_TransformFrustum(void)
Definition: r_misc.c:187
db_time2
float db_time2
Definition: r_local.h:724
oldrefdef_t::vrect_x_adj_shift20
int vrect_x_adj_shift20
Definition: r_local.h:121
d_minmip
int d_minmip
Definition: r_misc.c:31
refdef_t::width
int width
Definition: ref.h:122
oldrefdef_t::fvrectx
float fvrectx
Definition: r_local.h:119
clipplane_s::dist
float dist
Definition: r_local.h:352
Sys_Milliseconds
int Sys_Milliseconds(void)
Definition: q_shwin.c:120
refdef_t::x
int x
Definition: ref.h:122
vrect_s
Definition: vid.h:22
sw_clearcolor
cvar_t * sw_clearcolor
Definition: r_main.c:114
YCENTERING
#define YCENTERING
Definition: r_local.h:216
viddef_t::colormap
pixel_t * colormap
Definition: r_local.h:89
pcx_t::xmax
unsigned short xmax
Definition: qfiles.h:66
pcx_t::filler
char filler[58]
Definition: qfiles.h:73
d_pzbuffer
short * d_pzbuffer
Definition: r_main.c:182
sc_rover
surfcache_t * sc_rover
Definition: r_local.h:753
r_fullbright
cvar_t * r_fullbright
Definition: r_main.c:129
swstate_s::currentpalette
byte currentpalette[1024]
Definition: r_local.h:823
xcenter
float xcenter
Definition: r_main.c:75
sw_state
swstate_t sw_state
Definition: r_main.c:43
vpn
vec3_t vpn
Definition: r_main.c:67
oldrefdef_t::aliasvrect
vrect_t aliasvrect
Definition: r_local.h:114
d_scantable
int d_scantable[MAXHEIGHT]
Definition: r_misc.c:42
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
pcx_t::color_planes
char color_planes
Definition: qfiles.h:70
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1236
yscale
float yscale
Definition: r_local.h:539
R_Surf8End
void R_Surf8End(void)
r_refdef
oldrefdef_t r_refdef
Definition: r_main.c:74
oldrefdef_t::vrectbottom
int vrectbottom
Definition: r_local.h:115
dp_time2
float dp_time2
Definition: r_local.h:724
pcx_t::bytes_per_line
unsigned short bytes_per_line
Definition: qfiles.h:71
oldrefdef_t::fvrecty
float fvrecty
Definition: r_local.h:119
vrect_s::y
int y
Definition: vid.h:24
vid
viddef_t vid
Definition: r_main.c:24