icculus quake2 doxygen  1.0 dev
r_local.h
Go to the documentation of this file.
1 #ifndef __R_LOCAL__
2 #define __R_LOCAL__
3 /*
4 Copyright (C) 1997-2001 Id Software, Inc.
5 
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 
15 See the GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 
21 */
22 
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26 #include <math.h>
27 #include <stdarg.h>
28 
29 #include "../client/ref.h"
30 
31 #define REF_VERSION "SOFT 0.01"
32 
33 // up / down
34 #define PITCH 0
35 
36 // left / right
37 #define YAW 1
38 
39 // fall over
40 #define ROLL 2
41 
42 
43 /*
44 
45  skins will be outline flood filled and mip mapped
46  pics and sprites with alpha will be outline flood filled
47  pic won't be mip mapped
48 
49  model skin
50  sprite frame
51  wall texture
52  pic
53 
54 */
55 
56 typedef enum
57 {
63 } imagetype_t;
64 
65 typedef struct image_s
66 {
67  char name[MAX_QPATH]; // game path, including extension
69  int width, height;
70  qboolean transparent; // true if any 255 pixels in image
71  int registration_sequence; // 0 = free
72  byte *pixels[4]; // mip levels
73 } image_t;
74 
75 
76 //===================================================================
77 
78 typedef unsigned char pixel_t;
79 
80 typedef struct vrect_s
81 {
82  int x,y,width,height;
83  struct vrect_s *pnext;
84 } vrect_t;
85 
86 typedef struct
87 {
88  pixel_t *buffer; // invisible buffer
89  pixel_t *colormap; // 256 * VID_GRADES size
90  pixel_t *alphamap; // 256 * 256 translucency map
91  int rowbytes; // may be > width if displayed in a window
92  // can be negative for stupid dibs
93  int width;
94  int height;
95 } viddef_t;
96 
97 typedef enum
98 {
100 
103 
105 } rserr_t;
106 
107 extern viddef_t vid;
108 
109 // !!! if this is changed, it must be changed in asm_draw.h too !!!
110 typedef struct
111 {
112  vrect_t vrect; // subwindow in video for refresh
113  // FIXME: not need vrect next field here?
114  vrect_t aliasvrect; // scaled Alias version
115  int vrectright, vrectbottom; // right & bottom screen coords
116  int aliasvrectright, aliasvrectbottom; // scaled Alias versions
117  float vrectrightedge; // rightmost right edge we care about,
118  // for use in edge list
119  float fvrectx, fvrecty; // for floating-point compares
120  float fvrectx_adj, fvrecty_adj; // left and top edges, for clamping
121  int vrect_x_adj_shift20; // (vrect.x + 0.5 - epsilon) << 20
122  int vrectright_adj_shift20; // (vrectright + 0.5 - epsilon) << 20
123  float fvrectright_adj, fvrectbottom_adj;
124  // right and bottom edges, for clamping
125  float fvrectright; // rightmost edge, for Alias clamping
126  float fvrectbottom; // bottommost edge, for Alias clamping
127  float horizontalFieldOfView; // at Z = 1.0, this many X is visible
128  // 2.0 = 90 degrees
129  float xOrigin; // should probably always be 0.5
130  float yOrigin; // between be around 0.3 to 0.5
131 
134 
136 } oldrefdef_t;
137 
138 extern oldrefdef_t r_refdef;
139 
140 #include "r_model.h"
141 
142 #define CACHE_SIZE 32
143 
144 /*
145 ====================================================
146 
147  CONSTANTS
148 
149 ====================================================
150 */
151 
152 #define VID_CBITS 6
153 #define VID_GRADES (1 << VID_CBITS)
154 
155 
156 // r_shared.h: general refresh-related stuff shared between the refresh and the
157 // driver
158 
159 
160 #define MAXVERTS 64 // max points in a surface polygon
161 #define MAXWORKINGVERTS (MAXVERTS+4) // max points in an intermediate
162  // polygon (while processing)
163 // !!! if this is changed, it must be changed in d_ifacea.h too !!!
164 #define MAXHEIGHT 1200
165 #define MAXWIDTH 1600
166 
167 #define INFINITE_DISTANCE 0x10000 // distance that's always guaranteed to
168  // be farther away than anything in
169  // the scene
170 
171 
172 // d_iface.h: interface header file for rasterization driver modules
173 
174 #define WARP_WIDTH 320
175 #define WARP_HEIGHT 240
176 
177 #define MAX_LBM_HEIGHT 480
178 
179 
180 #define PARTICLE_Z_CLIP 8.0
181 
182 // !!! must be kept the same as in quakeasm.h !!!
183 #define TRANSPARENT_COLOR 0xFF
184 
185 
186 // !!! if this is changed, it must be changed in d_ifacea.h too !!!
187 #define TURB_TEX_SIZE 64 // base turbulent texture size
188 
189 // !!! if this is changed, it must be changed in d_ifacea.h too !!!
190 #define CYCLE 128 // turbulent cycle size
191 
192 #define SCANBUFFERPAD 0x1000
193 
194 #define DS_SPAN_LIST_END -128
195 
196 #define NUMSTACKEDGES 2000
197 #define MINEDGES NUMSTACKEDGES
198 #define NUMSTACKSURFACES 1000
199 #define MINSURFACES NUMSTACKSURFACES
200 #define MAXSPANS 3000
201 
202 // flags in finalvert_t.flags
203 #define ALIAS_LEFT_CLIP 0x0001
204 #define ALIAS_TOP_CLIP 0x0002
205 #define ALIAS_RIGHT_CLIP 0x0004
206 #define ALIAS_BOTTOM_CLIP 0x0008
207 #define ALIAS_Z_CLIP 0x0010
208 #define ALIAS_XY_CLIP_MASK 0x000F
209 
210 #define SURFCACHE_SIZE_AT_320X240 1024*768
211 
212 #define BMODEL_FULLY_CLIPPED 0x10 // value returned by R_BmodelCheckBBox ()
213  // if bbox is trivially rejected
214 
215 #define XCENTERING (1.0 / 2.0)
216 #define YCENTERING (1.0 / 2.0)
217 
218 #define CLIP_EPSILON 0.001
219 
220 #define BACKFACE_EPSILON 0.01
221 
222 // !!! if this is changed, it must be changed in asm_draw.h too !!!
223 #define NEAR_CLIP 0.01
224 
225 
226 #define MAXALIASVERTS 2000 // TODO: tune this
227 #define ALIAS_Z_CLIP_PLANE 4
228 
229 // turbulence stuff
230 
231 #define AMP 8*0x10000
232 #define AMP2 3
233 #define SPEED 20
234 
235 
236 /*
237 ====================================================
238 
239 TYPES
240 
241 ====================================================
242 */
243 
244 typedef struct
245 {
246  float u, v;
247  float s, t;
248  float zi;
249 } emitpoint_t;
250 
251 /*
252 ** if you change this structure be sure to change the #defines
253 ** listed after it!
254 */
255 #define SMALL_FINALVERT 0
256 
257 #if SMALL_FINALVERT
258 
259 typedef struct finalvert_s {
260  short u, v, s, t;
261  int l;
262  int zi;
263  int flags;
264  float xyz[3]; // eye space
265 } finalvert_t;
266 
267 #define FINALVERT_V0 0
268 #define FINALVERT_V1 2
269 #define FINALVERT_V2 4
270 #define FINALVERT_V3 6
271 #define FINALVERT_V4 8
272 #define FINALVERT_V5 12
273 #define FINALVERT_FLAGS 16
274 #define FINALVERT_X 20
275 #define FINALVERT_Y 24
276 #define FINALVERT_Z 28
277 #define FINALVERT_SIZE 32
278 
279 #else
280 
281 typedef struct finalvert_s {
282  int u, v, s, t;
283  int l;
284  int zi;
285  int flags;
286  float xyz[3]; // eye space
287 } finalvert_t;
288 
289 #define FINALVERT_V0 0
290 #define FINALVERT_V1 4
291 #define FINALVERT_V2 8
292 #define FINALVERT_V3 12
293 #define FINALVERT_V4 16
294 #define FINALVERT_V5 20
295 #define FINALVERT_FLAGS 24
296 #define FINALVERT_X 28
297 #define FINALVERT_Y 32
298 #define FINALVERT_Z 36
299 #define FINALVERT_SIZE 40
300 
301 #endif
302 
303 typedef struct
304 {
305  void *pskin;
312  int drawtype;
317 
318 typedef struct
319 {
320  byte *surfdat; // destination for generated surface
321  int rowbytes; // destination logical width in bytes
322  msurface_t *surf; // description for surface to generate
324  // adjust for lightmap levels for dynamic lighting
326  int surfmip; // mipmapped ratio of surface texels / world pixels
327  int surfwidth; // in mipmapped texels
328  int surfheight; // in mipmapped texels
329 } drawsurf_t;
330 
331 
332 
333 typedef struct {
336  float *plightvec;
337 } alight_t;
338 
339 // clipped bmodel edges
340 
341 typedef struct bedge_s
342 {
344  struct bedge_s *pnext;
345 } bedge_t;
346 
347 
348 // !!! if this is changed, it must be changed in asm_draw.h too !!!
349 typedef struct clipplane_s
350 {
352  float dist;
353  struct clipplane_s *next;
354  byte leftedge;
355  byte rightedge;
356  byte reserved[2];
357 } clipplane_t;
358 
359 
360 typedef struct surfcache_s
361 {
362  struct surfcache_s *next;
363  struct surfcache_s **owner; // NULL is an empty chunk of memory
364  int lightadj[MAXLIGHTMAPS]; // checked for strobe flush
365  int dlight;
366  int size; // including header
367  unsigned width;
368  unsigned height; // DEBUG only needed for debug
369  float mipscale;
371  byte data[4]; // width*height elements
372 } surfcache_t;
373 
374 // !!! if this is changed, it must be changed in asm_draw.h too !!!
375 typedef struct espan_s
376 {
377  int u, v, count;
378  struct espan_s *pnext;
379 } espan_t;
380 
381 // used by the polygon drawer (R_POLY.C) and sprite setup code (R_SPRITE.C)
382 typedef struct
383 {
384  int nump;
386  byte *pixels; // image
387  int pixel_width; // image width
388  int pixel_height; // image height
389  vec3_t vup, vright, vpn; // in worldspace, for plane eq
390  float dist;
391  float s_offset, t_offset;
392  float viewer_position[3];
393  void (*drawspanlet)( void );
395 } polydesc_t;
396 
397 // FIXME: compress, make a union if that will help
398 // insubmodel is only 1, flags is fewer than 32, spanstate could be a byte
399 typedef struct surf_s
400 {
401  struct surf_s *next; // active surface stack in r_edge.c
402  struct surf_s *prev; // used in r_edge.c for active surf stack
403  struct espan_s *spans; // pointer to linked list of spans to draw
404  int key; // sorting key (BSP order)
405  int last_u; // set during tracing
406  int spanstate; // 0 = not in span
407  // 1 = in span
408  // -1 = in inverted span (end before
409  // start)
410  int flags; // currentface flags
413  float nearzi; // nearest 1/z on surface, for mipmapping
416 
417  int pad[2]; // to 64 bytes
418 } surf_t;
419 
420 // !!! if this is changed, it must be changed in asm_draw.h too !!!
421 typedef struct edge_s
422 {
425  struct edge_s *prev, *next;
426  unsigned short surfs[2];
428  float nearzi;
430 } edge_t;
431 
432 
433 /*
434 ====================================================
435 
436 VARS
437 
438 ====================================================
439 */
440 
441 extern int d_spanpixcount;
442 extern int r_framecount; // sequence # of current frame since Quake
443  // started
444 extern float r_aliasuvscale; // scale-up factor for screen u and v
445  // on Alias vertices passed to driver
446 extern qboolean r_dowarp;
447 
449 
451 
452 void D_DrawSurfaces (void);
453 void R_DrawParticle( void );
454 void D_ViewChanged (void);
455 void D_WarpScreen (void);
456 void R_PolysetUpdateTables (void);
457 
458 extern void *acolormap; // FIXME: should go away
459 
460 //=======================================================================//
461 
462 // callbacks to Quake
463 
464 extern drawsurf_t r_drawsurf;
465 
466 void R_DrawSurface (void);
467 
468 extern int c_surf;
469 
470 extern byte r_warpbuffer[WARP_WIDTH * WARP_HEIGHT];
471 
472 
473 
474 
475 extern float scale_for_mip;
476 
477 extern qboolean d_roverwrapped;
478 extern surfcache_t *sc_rover;
480 
484 
487 
488 
489 void D_DrawSpans16 (espan_t *pspans);
490 void D_DrawZSpans (espan_t *pspans);
491 void Turbulent8 (espan_t *pspan);
492 void NonTurbulent8 (espan_t *pspan); //PGM
493 
495 
497 
499 
500 extern pixel_t *d_viewbuffer;
501 extern short *d_pzbuffer;
502 extern unsigned int d_zrowbytes, d_zwidth;
503 extern short *zspantable[MAXHEIGHT];
504 extern int d_scantable[MAXHEIGHT];
505 
506 extern int d_minmip;
507 extern float d_scalemip[3];
508 
509 //===================================================================
510 
511 extern int cachewidth;
512 extern pixel_t *cacheblock;
513 extern int r_screenwidth;
514 
515 extern int r_drawnpolycount;
516 
517 extern int sintable[1280];
518 extern int intsintable[1280];
519 extern int blanktable[1280]; // PGM
520 
524 
526 
527 // surfaces are generated in back to front order by the bsp, so if a surf
528 // pointer is greater than another one, it should be drawn in front
529 // surfaces[1] is the background, and is used as the active surface stack.
530 // surfaces[0] is a dummy, because index 0 is used to indicate no surface
531 // attached to an edge_t
532 
533 //===================================================================
534 
535 extern vec3_t sxformaxis[4]; // s axis transformed into viewspace
536 extern vec3_t txformaxis[4]; // t axis transformed into viewspac
537 
538 extern float xcenter, ycenter;
539 extern float xscale, yscale;
540 extern float xscaleinv, yscaleinv;
542 
543 extern void TransformVector (vec3_t in, vec3_t out);
544 extern void SetUpForLineScan(fixed8_t startvertu, fixed8_t startvertv,
545  fixed8_t endvertu, fixed8_t endvertv);
546 
548 
549 //===========================================================================
550 
551 extern cvar_t *sw_aliasstats;
552 extern cvar_t *sw_clearcolor;
553 extern cvar_t *sw_drawflat;
554 extern cvar_t *sw_draworder;
555 extern cvar_t *sw_maxedges;
556 extern cvar_t *sw_maxsurfs;
557 extern cvar_t *sw_mipcap;
558 extern cvar_t *sw_mipscale;
559 extern cvar_t *sw_mode;
560 extern cvar_t *sw_reportsurfout;
561 extern cvar_t *sw_reportedgeout;
562 extern cvar_t *sw_stipplealpha;
564 extern cvar_t *sw_waterwarp;
565 
566 extern cvar_t *r_fullbright;
567 extern cvar_t *r_lefthand;
568 extern cvar_t *r_drawentities;
569 extern cvar_t *r_drawworld;
570 extern cvar_t *r_dspeeds;
571 extern cvar_t *r_lerpmodels;
572 
573 extern cvar_t *r_speeds;
574 
575 extern cvar_t *r_lightlevel; //FIXME HACK
576 
577 extern cvar_t *vid_fullscreen;
578 extern cvar_t *vid_gamma;
579 
580 
581 extern clipplane_t view_clipplanes[4];
582 extern int *pfrustum_indexes[4];
583 
584 
585 //=============================================================================
586 
587 void R_RenderWorld (void);
588 
589 //=============================================================================
590 
591 extern mplane_t screenedge[4];
592 
593 extern vec3_t r_origin;
594 
595 extern entity_t r_worldentity;
596 extern model_t *currentmodel;
597 extern entity_t *currententity;
598 extern vec3_t modelorg;
599 extern vec3_t r_entorigin;
600 
601 extern float verticalFieldOfView;
602 extern float xOrigin, yOrigin;
603 
604 extern int r_visframecount;
605 
607 
608 //=============================================================================
609 
610 void R_ClearPolyList (void);
611 void R_DrawPolyList (void);
612 
613 //
614 // current entity info
615 //
616 extern qboolean insubmodel;
617 
618 void R_DrawAlphaSurfaces( void );
619 
620 void R_DrawSprite (void);
621 void R_DrawBeam( entity_t *e );
622 
623 void R_RenderFace (msurface_t *fa, int clipflags);
624 void R_RenderBmodelFace (bedge_t *pedges, msurface_t *psurf);
625 void R_TransformPlane (mplane_t *p, float *normal, float *dist);
626 void R_TransformFrustum (void);
627 void R_DrawSurfaceBlock16 (void);
628 void R_DrawSurfaceBlock8 (void);
629 
630 #if id386
631 
632 void R_DrawSurfaceBlock8_mip0 (void);
633 void R_DrawSurfaceBlock8_mip1 (void);
634 void R_DrawSurfaceBlock8_mip2 (void);
635 void R_DrawSurfaceBlock8_mip3 (void);
636 
637 #endif
638 
639 void R_GenSkyTile (void *pdest);
640 void R_GenSkyTile16 (void *pdest);
641 void R_Surf8Patch (void);
642 void R_Surf16Patch (void);
643 void R_DrawSubmodelPolygons (model_t *pmodel, int clipflags, mnode_t *topnode);
644 void R_DrawSolidClippedSubmodelPolygons (model_t *pmodel, mnode_t *topnode);
645 
646 void R_AddPolygonEdges (emitpoint_t *pverts, int numverts, int miplevel);
647 surf_t *R_GetSurf (void);
648 void R_AliasDrawModel (void);
649 void R_BeginEdgeFrame (void);
650 void R_ScanEdges (void);
651 void D_DrawSurfaces (void);
652 void R_InsertNewEdges (edge_t *edgestoadd, edge_t *edgelist);
653 void R_StepActiveU (edge_t *pedge);
654 void R_RemoveEdges (edge_t *pedge);
655 void R_PushDlights (model_t *model);
656 
657 extern void R_Surf8Start (void);
658 extern void R_Surf8End (void);
659 extern void R_Surf16Start (void);
660 extern void R_Surf16End (void);
661 extern void R_EdgeCodeStart (void);
662 extern void R_EdgeCodeEnd (void);
663 
664 extern void R_RotateBmodel (void);
665 
666 extern int c_faceclip;
667 extern int r_polycount;
668 extern int r_wholepolycount;
669 
671 
674 
676 
677 extern float entity_rotation[3][3];
678 
679 extern int r_currentkey;
680 extern int r_currentbkey;
681 
682 void R_InitTurb (void);
683 
684 void R_DrawParticles (void);
685 void R_SurfacePatch (void);
686 
687 extern int r_amodels_drawn;
688 extern edge_t *auxedges;
689 extern int r_numallocatededges;
691 
692 extern edge_t *newedges[MAXHEIGHT];
693 extern edge_t *removeedges[MAXHEIGHT];
694 
695 // FIXME: make stack vars when debugging done
696 extern edge_t edge_head;
697 extern edge_t edge_tail;
698 extern edge_t edge_aftertail;
699 
700 extern int r_aliasblendcolor;
701 
703 
704 extern int r_outofsurfaces;
705 extern int r_outofedges;
706 
708 extern int r_maxvalidedgeoffset;
709 
710 typedef struct
711 {
712  finalvert_t *a, *b, *c;
714 
716 
717 void R_DrawTriangle( void );
718 //void R_DrawTriangle (finalvert_t *index0, finalvert_t *index1, finalvert_t *index2);
719 void R_AliasClipTriangle (finalvert_t *index0, finalvert_t *index1, finalvert_t *index2);
720 
721 
722 extern float r_time1;
723 extern float da_time1, da_time2;
726 extern int r_frustum_indexes[4*6];
728 extern qboolean r_surfsonstack;
729 
730 extern mleaf_t *r_viewleaf;
732 
733 extern int r_clipflags;
734 extern int r_dlightframecount;
736 
737 extern image_t *r_notexture_mip;
738 extern model_t *r_worldmodel;
739 
740 void R_PrintAliasStats (void);
741 void R_PrintTimes (void);
742 void R_PrintDSpeeds (void);
743 void R_AnimateLight (void);
744 void R_LightPoint (vec3_t p, vec3_t color);
745 void R_SetupFrame (void);
746 void R_cshift_f (void);
747 void R_EmitEdge (mvertex_t *pv0, mvertex_t *pv1);
748 void R_ClipEdge (mvertex_t *pv0, mvertex_t *pv1, clipplane_t *clip);
749 void R_SplitEntityOnNode2 (mnode_t *node);
750 
751 extern refdef_t r_newrefdef;
752 
754 
755 extern void *colormap;
756 
757 //====================================================================
758 
759 float R_DLightPoint (vec3_t p);
760 
761 void R_NewMap (void);
762 void R_Register (void);
763 void R_UnRegister (void);
764 void Draw_InitLocal (void);
765 int R_Init( void *hInstance, void *wndProc );
766 void R_Shutdown (void);
767 void R_InitCaches (void);
768 void D_FlushCaches (void);
769 
770 void R_ScreenShot_f( void );
771 void R_BeginRegistration (char *map);
772 struct model_s *R_RegisterModel (char *name);
773 void R_EndRegistration (void);
774 
775 void R_RenderFrame (refdef_t *fd);
776 
777 struct image_s *Draw_FindPic (char *name);
778 
779 void Draw_GetPicSize (int *w, int *h, char *name);
780 void Draw_Pic (int x, int y, char *name);
781 void Draw_StretchPic (int x, int y, int w, int h, char *name);
782 void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data);
783 void Draw_Char (int x, int y, int c);
784 void Draw_TileClear (int x, int y, int w, int h, char *name);
785 void Draw_Fill (int x, int y, int w, int h, int c);
786 void Draw_FadeScreen (void);
787 
788 void Draw_GetPalette (void);
789 
790 void R_BeginFrame( float camera_separation );
791 
792 void R_CinematicSetPalette( const unsigned char *palette );
793 
794 extern unsigned d_8to24table[256]; // base
795 
796 void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length);
797 void Sys_SetFPCW (void);
798 
799 void LoadPCX (char *filename, byte **pic, byte **palette, int *width, int *height);
800 
801 void R_InitImages (void);
802 void R_ShutdownImages (void);
804 void R_FreeUnusedImages (void);
805 
806 void R_GammaCorrectAndSetPalette( const unsigned char *pal );
807 
808 #ifdef QMAX
809 void R_AddStain (vec3_t org, float intensity, float r, float g, float b);
810 void Draw_ScaledPic (int x, int y, float scale, float alpha, char *pic);
811 #endif
812 
813 extern mtexinfo_t *sky_texinfo[6];
814 
815 void R_InitSkyBox (void);
816 
817 typedef struct swstate_s
818 {
820  int prev_mode; // last valid SW mode
821 
822  byte gammatable[256];
823  byte currentpalette[1024];
824 
825 } swstate_t;
826 
827 void R_IMFlatShadedQuad( vec3_t a, vec3_t b, vec3_t c, vec3_t d, int color, float alpha );
828 
829 extern swstate_t sw_state;
830 
831 /*
832 ====================================================================
833 
834 IMPORTED FUNCTIONS
835 
836 ====================================================================
837 */
838 
839 extern refimport_t ri;
840 
841 /*
842 ====================================================================
843 
844 IMPLEMENTATION FUNCTIONS
845 
846 ====================================================================
847 */
848 
849 void SWimp_BeginFrame( float camera_separation );
850 void SWimp_EndFrame (void);
851 int SWimp_Init( void *hInstance, void *wndProc );
852 void SWimp_SetPalette( const unsigned char *palette);
853 void SWimp_Shutdown( void );
854 rserr_t SWimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen );
855 void SWimp_AppActivate( qboolean active );
856 
857 #endif
R_InitTurb
void R_InitTurb(void)
Definition: r_main.c:231
R_ClipEdge
void R_ClipEdge(mvertex_t *pv0, mvertex_t *pv1, clipplane_t *clip)
Definition: r_rast.c:398
drawsurf_t::image
image_t * image
Definition: r_local.h:325
r_model.h
it_sprite
@ it_sprite
Definition: r_local.h:59
sky_texinfo
mtexinfo_t * sky_texinfo[6]
r_maxedgesseen
int r_maxedgesseen
Definition: r_local.h:727
d_scalemip
float d_scalemip[3]
Definition: r_misc.c:32
cachewidth
int cachewidth
Definition: r_main.c:180
surfcache_s::size
int size
Definition: r_local.h:366
c_surf
int c_surf
Definition: r_main.c:58
rserr_t
rserr_t
Definition: r_local.h:97
edge_tail
edge_t edge_tail
Definition: r_edge.c:71
oldrefdef_t::fvrectright
float fvrectright
Definition: r_local.h:125
sxformaxis
vec3_t sxformaxis[4]
height
GLsizei height
Definition: qgl_win.c:69
espan_s
Definition: r_local.h:375
Draw_FadeScreen
void Draw_FadeScreen(void)
Definition: r_draw.c:428
currentmodel
model_t * currentmodel
Definition: r_main.c:37
D_DrawSurfaces
void D_DrawSurfaces(void)
Definition: r_edge.c:1090
r_framecount
int r_framecount
Definition: r_main.c:91
sw_mipscale
cvar_t * sw_mipscale
Definition: r_misc.c:27
d_sdivzorigin
float d_sdivzorigin
Definition: r_main.c:175
r_time1
float r_time1
Definition: r_main.c:48
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
yscaleshrink
float yscaleshrink
Definition: r_local.h:541
R_DrawSurfaceBlock8_mip0
void R_DrawSurfaceBlock8_mip0(void)
Definition: r_surf.c:173
r_amodels_drawn
int r_amodels_drawn
Definition: r_alias.c:34
R_InitSkyBox
void R_InitSkyBox(void)
Definition: r_rast.c:113
R_CinematicSetPalette
void R_CinematicSetPalette(const unsigned char *palette)
Definition: r_main.c:1177
refdef_t
Definition: ref.h:120
intsintable
int intsintable[1280]
Definition: r_rast.c:48
oldrefdef_t::vieworg
vec3_t vieworg
Definition: r_local.h:132
affinetridesc_t
Definition: r_local.h:303
surfcache_s
Definition: r_local.h:360
finalvert_s::u
int u
Definition: r_local.h:282
R_BeginRegistration
void R_BeginRegistration(char *map)
Definition: r_model.c:1139
insubmodel
qboolean insubmodel
Definition: r_bsp.c:27
R_PolysetUpdateTables
void R_PolysetUpdateTables(void)
Definition: r_polyse.c:182
surf_max
surf_t * surf_max
Definition: r_local.h:525
viddef_t::buffer
pixel_t * buffer
Definition: r_local.h:88
imagetype_t
imagetype_t
Definition: r_local.h:56
R_Surf8Start
void R_Surf8Start(void)
mvertex_t
Definition: r_model.h:45
pfrustum_indexes
int * pfrustum_indexes[4]
Definition: r_main.c:98
R_ScreenShot_f
void R_ScreenShot_f(void)
Definition: r_misc.c:619
c_faceclip
int c_faceclip
Definition: r_rast.c:34
r_speeds
cvar_t * r_speeds
Definition: r_main.c:133
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
r_ppn
vec3_t r_ppn
Definition: r_local.h:450
surf_s::next
struct surf_s * next
Definition: r_local.h:401
R_GammaCorrectAndSetPalette
void R_GammaCorrectAndSetPalette(const unsigned char *pal)
Definition: r_main.c:1160
ri
refimport_t ri
Definition: r_main.c:25
verticalFieldOfView
float verticalFieldOfView
Definition: r_main.c:83
R_SurfacePatch
void R_SurfacePatch(void)
Definition: r_misc.c:524
espan_t
struct espan_s espan_t
sw_maxedges
cvar_t * sw_maxedges
Definition: r_main.c:117
aliasxcenter
float aliasxcenter
Definition: r_local.h:702
surfcache_s::height
unsigned height
Definition: r_local.h:368
sw_aliasstats
cvar_t * sw_aliasstats
Definition: r_main.c:112
R_EmitEdge
void R_EmitEdge(mvertex_t *pv0, mvertex_t *pv1)
Definition: r_rast.c:219
txformaxis
vec3_t txformaxis[4]
oldrefdef_t::viewangles
vec3_t viewangles
Definition: r_local.h:133
surface_p
surf_t * surface_p
Definition: r_local.h:525
it_wall
@ it_wall
Definition: r_local.h:60
yscaleinv
float yscaleinv
Definition: r_local.h:540
d_tdivzstepv
float d_tdivzstepv
Definition: r_local.h:482
D_CacheSurface
surfcache_t * D_CacheSurface(msurface_t *surface, int miplevel)
Definition: r_surf.c:575
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
R_GenSkyTile16
void R_GenSkyTile16(void *pdest)
r_edges
edge_t * r_edges
Definition: r_edge.c:49
surf_s::flags
int flags
Definition: r_local.h:410
mtexinfo_s
Definition: r_model.h:83
R_Surf8Patch
void R_Surf8Patch(void)
R_Init
int R_Init(void *hInstance, void *wndProc)
Definition: r_main.c:300
qboolean
qboolean
Definition: q_shared.h:56
x
GLint GLenum GLint x
Definition: qgl_win.c:116
dp_time1
float dp_time1
Definition: r_main.c:106
surfcache_s::lightadj
int lightadj[MAXLIGHTMAPS]
Definition: r_local.h:364
sw_surfcacheoverride
cvar_t * sw_surfcacheoverride
Definition: r_main.c:123
oldrefdef_t::xOrigin
float xOrigin
Definition: r_local.h:129
r_cnumsurfs
int r_cnumsurfs
Definition: r_local.h:727
d_viewbuffer
pixel_t * d_viewbuffer
Definition: r_main.c:181
r_notexture_mip
image_t * r_notexture_mip
Definition: r_main.c:104
R_DrawSprite
void R_DrawSprite(void)
Definition: r_sprite.c:40
de_time2
float de_time2
Definition: r_local.h:725
SWimp_Init
int SWimp_Init(void *hInstance, void *wndProc)
Definition: rw_imp.c:118
d_tdivzorigin
float d_tdivzorigin
Definition: r_local.h:483
erroradjustup
int erroradjustup
Definition: r_local.h:547
espan_s::pnext
struct espan_s * pnext
Definition: r_local.h:378
polydesc_t::pixel_width
int pixel_width
Definition: r_local.h:387
polydesc_t::stipple_parity
int stipple_parity
Definition: r_local.h:394
mnode_s
Definition: r_model.h:123
r_drawentities
cvar_t * r_drawentities
Definition: r_main.c:127
model_s
Definition: r_model.h:171
surf_s::pad
int pad[2]
Definition: r_local.h:417
r_drawworld
cvar_t * r_drawworld
Definition: r_main.c:126
r_oldviewcluster
int r_oldviewcluster
Definition: r_local.h:731
Draw_StretchRaw
void Draw_StretchRaw(int x, int y, int w, int h, int cols, int rows, byte *data)
Definition: r_draw.c:238
affinetridesc_t::pfinalverts
finalvert_t * pfinalverts
Definition: r_local.h:310
r_origin
vec3_t r_origin
Definition: r_main.c:69
Draw_FindPic
struct image_s * Draw_FindPic(char *name)
Definition: r_draw.c:35
entity_rotation
float entity_rotation[3][3]
Definition: r_bsp.c:34
r_wholepolycount
int r_wholepolycount
Definition: r_main.c:96
oldrefdef_t::fvrectright_adj
float fvrectright_adj
Definition: r_local.h:123
xscaleinv
float xscaleinv
Definition: r_main.c:77
edge_aftertail
edge_t edge_aftertail
Definition: r_edge.c:72
clipplane_s::reserved
byte reserved[2]
Definition: r_local.h:356
width
GLint GLsizei width
Definition: qgl_win.c:115
r_drawsurf
drawsurf_t r_drawsurf
Definition: r_surf.c:24
r_visframecount
int r_visframecount
Definition: r_main.c:92
edge_s::surfs
unsigned short surfs[2]
Definition: r_local.h:426
SWimp_SetMode
rserr_t SWimp_SetMode(int *pwidth, int *pheight, int mode, qboolean fullscreen)
Definition: rw_imp.c:266
finalvert_s::t
int t
Definition: r_local.h:282
affinetridesc_t::do_vis_thresh
qboolean do_vis_thresh
Definition: r_local.h:314
r_pright
vec3_t r_pright
Definition: r_part.c:22
scale_for_mip
float scale_for_mip
Definition: r_edge.c:79
image_s::registration_sequence
int registration_sequence
Definition: r_local.h:71
R_BeginEdgeFrame
void R_BeginEdgeFrame(void)
Definition: r_edge.c:109
r_surfsonstack
qboolean r_surfsonstack
Definition: r_main.c:60
surfcache_s::image
image_t * image
Definition: r_local.h:370
type
GLenum type
Definition: qgl_win.c:72
R_RotateBmodel
void R_RotateBmodel(void)
Definition: r_bsp.c:75
oldrefdef_t::yOrigin
float yOrigin
Definition: r_local.h:130
viddef_t
Definition: vid.h:27
se_time1
float se_time1
Definition: r_main.c:107
d_zrowbytes
unsigned int d_zrowbytes
Definition: r_main.c:183
cvar_s
Definition: q_shared.h:317
finalvert_s
Definition: r_local.h:281
intensity
cvar_t * intensity
Definition: gl_image.c:30
mleaf_s
Definition: r_model.h:143
R_DrawTriangle
void R_DrawTriangle(void)
Definition: r_polyse.c:204
bedge_t
struct bedge_s bedge_t
r_lefthand
cvar_t * r_lefthand
Definition: r_main.c:111
clipplane_s::normal
vec3_t normal
Definition: r_local.h:351
sw_draworder
cvar_t * sw_draworder
Definition: r_main.c:116
xOrigin
float xOrigin
Definition: r_main.c:84
oldrefdef_t::vrectrightedge
float vrectrightedge
Definition: r_local.h:117
SWimp_AppActivate
void SWimp_AppActivate(qboolean active)
Definition: rw_imp.c:378
vup
vec3_t vup
Definition: r_main.c:66
r_viewcluster
int r_viewcluster
Definition: r_main.c:102
rserr_unknown
@ rserr_unknown
Definition: r_local.h:104
D_WarpScreen
void D_WarpScreen(void)
Definition: r_scan.c:42
surf_s::spans
struct espan_s * spans
Definition: r_local.h:403
R_DrawSubmodelPolygons
void R_DrawSubmodelPolygons(model_t *pmodel, int clipflags, mnode_t *topnode)
Definition: r_bsp.c:415
rw_time2
float rw_time2
Definition: r_local.h:724
r_numallocatededges
int r_numallocatededges
Definition: r_main.c:49
espan_s::count
int count
Definition: r_local.h:377
affinetridesc_t::drawtype
int drawtype
Definition: r_local.h:312
image_t
struct image_s image_t
R_ShutdownImages
void R_ShutdownImages(void)
Definition: r_image.c:617
Draw_Char
void Draw_Char(int x, int y, int c)
Definition: r_draw.c:74
MAXHEIGHT
#define MAXHEIGHT
Definition: r_local.h:164
aliasxscale
float aliasxscale
Definition: r_main.c:79
finalvert_s::v
int v
Definition: r_local.h:282
aliasycenter
float aliasycenter
Definition: r_local.h:702
polydesc_t::pixels
byte * pixels
Definition: r_local.h:386
edge_s::next
struct edge_s * next
Definition: r_local.h:425
polydesc_t::t_offset
float t_offset
Definition: r_local.h:391
R_DLightPoint
float R_DLightPoint(vec3_t p)
oldrefdef_t::fvrecty_adj
float fvrecty_adj
Definition: r_local.h:120
R_DrawSurfaceBlock8_mip3
void R_DrawSurfaceBlock8_mip3(void)
Definition: r_surf.c:323
bedge_s::pnext
struct bedge_s * pnext
Definition: r_local.h:344
vid_gamma
cvar_t * vid_gamma
Definition: vid_dll.c:42
SetUpForLineScan
void SetUpForLineScan(fixed8_t startvertu, fixed8_t startvertv, fixed8_t endvertu, fixed8_t endvertv)
d_pix_max
int d_pix_max
Definition: r_local.h:498
base_vup
vec3_t base_vup
Definition: r_local.h:521
finalvert_t
struct finalvert_s finalvert_t
da_time1
float da_time1
Definition: r_main.c:106
R_DrawSolidClippedSubmodelPolygons
void R_DrawSolidClippedSubmodelPolygons(model_t *pmodel, mnode_t *topnode)
Definition: r_bsp.c:336
d_ziorigin
float d_ziorigin
Definition: r_local.h:483
base_vpn
vec3_t base_vpn
Definition: r_local.h:522
sw_mipcap
cvar_t * sw_mipcap
Definition: r_misc.c:26
D_FlushCaches
void D_FlushCaches(void)
Definition: r_surf.c:418
sw_drawflat
cvar_t * sw_drawflat
Definition: r_main.c:115
miplevel
static int miplevel
Definition: r_edge.c:77
it_pic
@ it_pic
Definition: r_local.h:61
base_vright
vec3_t base_vright
Definition: r_local.h:523
surf_s::entity
entity_t * entity
Definition: r_local.h:412
viddef_t::rowbytes
int rowbytes
Definition: r_local.h:91
R_DrawSurfaceBlock16
void R_DrawSurfaceBlock16(void)
xscaleshrink
float xscaleshrink
Definition: r_main.c:78
r
GLdouble GLdouble r
Definition: qgl_win.c:336
D_ViewChanged
void D_ViewChanged(void)
Definition: r_misc.c:78
R_InitImages
void R_InitImages(void)
Definition: r_image.c:607
medge_t
Definition: r_model.h:77
r_polycount
int r_polycount
Definition: r_main.c:94
R_Surf16Start
void R_Surf16Start(void)
r_affinetridesc
affinetridesc_t r_affinetridesc
Definition: r_alias.c:36
image_s::height
int height
Definition: r_local.h:69
dv_time1
float dv_time1
Definition: r_local.h:725
d_vrectx
int d_vrectx
Definition: r_misc.c:38
r_lerpmodels
cvar_t * r_lerpmodels
Definition: r_main.c:130
se_time2
float se_time2
Definition: r_local.h:725
refimport_t
Definition: ref.h:218
Sys_MakeCodeWriteable
void Sys_MakeCodeWriteable(unsigned long startaddr, unsigned long length)
Definition: rw_imp.c:408
clipplane_s::leftedge
byte leftedge
Definition: r_local.h:354
bbextentt
fixed16_t bbextentt
Definition: r_local.h:486
edge_s::u_step
fixed16_t u_step
Definition: r_local.h:424
R_AddPolygonEdges
void R_AddPolygonEdges(emitpoint_t *pverts, int numverts, int miplevel)
clipplane_s::rightedge
byte rightedge
Definition: r_local.h:355
zspantable
short * zspantable[MAXHEIGHT]
Definition: r_misc.c:43
R_PrintTimes
void R_PrintTimes(void)
Definition: r_misc.c:131
R_InitCaches
void R_InitCaches(void)
Definition: r_surf.c:379
sintable
int sintable[1280]
Definition: r_rast.c:47
R_NewMap
void R_NewMap(void)
Definition: r_main.c:380
R_GetSurf
surf_t * R_GetSurf(void)
espan_s::v
int v
Definition: r_local.h:377
polydesc_t::nump
int nump
Definition: r_local.h:384
surfaces
surf_t * surfaces
Definition: r_edge.c:51
rserr_invalid_mode
@ rserr_invalid_mode
Definition: r_local.h:102
sw_waterwarp
cvar_t * sw_waterwarp
Definition: r_main.c:124
r_currentkey
int r_currentkey
Definition: r_edge.c:62
R_GenSkyTile
void R_GenSkyTile(void *pdest)
R_ClearPolyList
void R_ClearPolyList(void)
oldrefdef_t::fvrectbottom
float fvrectbottom
Definition: r_local.h:126
d_pix_shift
int d_pix_shift
Definition: r_local.h:498
drawsurf_t::surfheight
int surfheight
Definition: r_local.h:328
edge_s::owner
medge_t * owner
Definition: r_local.h:429
emitpoint_t
Definition: r_local.h:244
r_aliasblendcolor
int r_aliasblendcolor
Definition: r_alias.c:43
d_spanpixcount
int d_spanpixcount
Definition: r_main.c:93
R_Surf16Patch
void R_Surf16Patch(void)
finalvert_s::xyz
float xyz[3]
Definition: r_local.h:286
R_DrawParticles
void R_DrawParticles(void)
Definition: r_part.c:596
drawsurf_t::rowbytes
int rowbytes
Definition: r_local.h:321
surf_s::nearzi
float nearzi
Definition: r_local.h:413
surfcache_s::mipscale
float mipscale
Definition: r_local.h:369
alight_t::shadelight
int shadelight
Definition: r_local.h:335
pixel_t
unsigned char pixel_t
Definition: r_local.h:78
r_aliasuvscale
float r_aliasuvscale
Definition: r_main.c:50
d_roverwrapped
qboolean d_roverwrapped
Definition: r_misc.c:30
Draw_Fill
void Draw_Fill(int x, int y, int w, int h, int c)
Definition: r_draw.c:394
r_fov_greater_than_90
qboolean r_fov_greater_than_90
r_currentbkey
int r_currentbkey
Definition: r_bsp.c:36
polydesc_t::dist
float dist
Definition: r_local.h:390
sw_stipplealpha
cvar_t * sw_stipplealpha
Definition: r_main.c:122
r_clipflags
int r_clipflags
Definition: r_main.c:61
R_PrintAliasStats
void R_PrintAliasStats(void)
Definition: r_misc.c:175
sadjust
fixed16_t sadjust
Definition: r_local.h:672
surf_s::msurf
msurface_t * msurf
Definition: r_local.h:411
d_tdivzstepu
float d_tdivzstepu
Definition: r_local.h:481
r_newrefdef
refdef_t r_newrefdef
Definition: r_main.c:36
drawsurf_t::surfmip
int surfmip
Definition: r_local.h:326
surf_t
struct surf_s surf_t
edge_head
edge_t edge_head
Definition: r_edge.c:70
r_entorigin
vec3_t r_entorigin
Definition: r_bsp.c:31
D_DrawSpans16
void D_DrawSpans16(espan_t *pspans)
Definition: r_scan.c:399
errorterm
int errorterm
Definition: r_local.h:547
edge_s::nearzi
float nearzi
Definition: r_local.h:428
affinetridesc_t::ptriangles
dtriangle_t * ptriangles
Definition: r_local.h:309
oldrefdef_t::ambientlight
int ambientlight
Definition: r_local.h:135
R_DrawSurfaceBlock8
void R_DrawSurfaceBlock8(void)
clipplane_s::next
struct clipplane_s * next
Definition: r_local.h:353
da_time2
float da_time2
Definition: r_local.h:723
r_worldmodel
model_t * r_worldmodel
Definition: r_main.c:39
surfcache_s::owner
struct surfcache_s ** owner
Definition: r_local.h:363
R_TransformFrustum
void R_TransformFrustum(void)
Definition: r_misc.c:187
xscale
float xscale
Definition: r_main.c:76
emitpoint_t::v
float v
Definition: r_local.h:246
R_Surf16End
void R_Surf16End(void)
emitpoint_t::zi
float zi
Definition: r_local.h:248
dv_time2
float dv_time2
Definition: r_local.h:725
edge_p
edge_t * edge_p
Definition: r_local.h:690
r_outofsurfaces
int r_outofsurfaces
Definition: r_main.c:51
image_s::type
imagetype_t type
Definition: r_local.h:68
clipplane_s
Definition: r_local.h:349
espan_s::u
int u
Definition: r_local.h:377
drawsurf_t::surfdat
byte * surfdat
Definition: r_local.h:320
SWimp_EndFrame
void SWimp_EndFrame(void)
Definition: rw_imp.c:176
edge_s::u
fixed16_t u
Definition: r_local.h:423
R_RenderWorld
void R_RenderWorld(void)
Definition: r_bsp.c:616
r_drawnpolycount
int r_drawnpolycount
Definition: r_main.c:95
WARP_WIDTH
#define WARP_WIDTH
Definition: r_local.h:174
bbextents
fixed16_t bbextents
Definition: r_local.h:673
d_scantable
int d_scantable[MAXHEIGHT]
Definition: r_misc.c:42
edge_s::nextremove
struct edge_s * nextremove
Definition: r_local.h:427
Turbulent8
void Turbulent8(espan_t *pspan)
Definition: r_scan.c:124
vrect_s::x
int x
Definition: vid.h:24
d_zistepv
float d_zistepv
Definition: r_local.h:482
currententity
entity_t * currententity
Definition: r_bsp.c:28
r_alpha_surfaces
msurface_t * r_alpha_surfaces
Definition: r_poly.c:45
r_pup
vec3_t r_pup
Definition: r_local.h:450
sw_reportedgeout
cvar_t * sw_reportedgeout
Definition: r_main.c:120
swstate_t
struct swstate_s swstate_t
finalvert_s::zi
int zi
Definition: r_local.h:284
image_s::pixels
byte * pixels[4]
Definition: r_local.h:72
R_DrawPolyList
void R_DrawPolyList(void)
image_s::width
int width
Definition: r_local.h:69
alight_t::plightvec
float * plightvec
Definition: r_local.h:336
bedge_s
Definition: r_local.h:341
Draw_GetPicSize
void Draw_GetPicSize(int *w, int *h, char *name)
Definition: r_draw.c:144
acolormap
void * acolormap
r_viewleaf
mleaf_t * r_viewleaf
Definition: r_main.c:101
alpha
GLfloat GLfloat GLfloat alpha
Definition: qgl_win.c:74
r_screenwidth
int r_screenwidth
Definition: r_main.c:81
d_zistepu
float d_zistepu
Definition: r_local.h:481
image_s::name
char name[MAX_QPATH]
Definition: r_local.h:67
image_s::transparent
qboolean transparent
Definition: r_local.h:70
ycenter
float ycenter
Definition: r_local.h:538
it_skin
@ it_skin
Definition: r_local.h:58
r_dowarp
qboolean r_dowarp
Definition: r_main.c:54
surf_s::key
int key
Definition: r_local.h:404
r_dspeeds
cvar_t * r_dspeeds
Definition: r_main.c:128
blanktable
int blanktable[1280]
Definition: r_rast.c:49
affinetridesc_t::pskindesc
int pskindesc
Definition: r_local.h:306
r_lightlevel
cvar_t * r_lightlevel
Definition: r_main.c:134
edge_t
struct edge_s edge_t
name
cvar_t * name
Definition: cl_main.c:94
MAXLIGHTMAPS
#define MAXLIGHTMAPS
Definition: qfiles.h:409
WARP_HEIGHT
#define WARP_HEIGHT
Definition: r_local.h:175
Draw_GetPalette
void Draw_GetPalette(void)
Definition: r_main.c:1326
d_minmip
int d_minmip
Definition: r_misc.c:31
affinetridesc_t::skinwidth
int skinwidth
Definition: r_local.h:307
swstate_s
Definition: r_local.h:817
swstate_s::prev_mode
int prev_mode
Definition: r_local.h:820
surf_s::d_zistepv
float d_zistepv
Definition: r_local.h:415
surf_s::d_zistepu
float d_zistepu
Definition: r_local.h:415
R_DrawSurfaceBlock8_mip2
void R_DrawSurfaceBlock8_mip2(void)
Definition: r_surf.c:273
ubasestep
int ubasestep
Definition: r_local.h:670
emitpoint_t::t
float t
Definition: r_local.h:247
d_initial_rover
surfcache_t * d_initial_rover
Definition: r_misc.c:29
swstate_s::gammatable
byte gammatable[256]
Definition: r_local.h:822
rw_time1
float rw_time1
Definition: r_local.h:724
y
GLint y
Definition: qgl_win.c:115
aliastriangleparms_t
Definition: r_local.h:710
R_PushDlights
void R_PushDlights(model_t *model)
Definition: r_light.c:94
clipplane_t
struct clipplane_s clipplane_t
R_RegisterModel
struct model_s * R_RegisterModel(char *name)
Definition: r_model.c:1165
d_pix_min
int d_pix_min
Definition: r_misc.c:40
R_IMFlatShadedQuad
void R_IMFlatShadedQuad(vec3_t a, vec3_t b, vec3_t c, vec3_t d, int color, float alpha)
Definition: r_poly.c:1230
R_AliasClipTriangle
void R_AliasClipTriangle(finalvert_t *index0, finalvert_t *index1, finalvert_t *index2)
Definition: r_aclip.c:231
SWimp_BeginFrame
void SWimp_BeginFrame(float camera_separation)
LoadPCX
void LoadPCX(char *filename, byte **pic, byte **palette, int *width, int *height)
Definition: r_image.c:87
oldrefdef_t::horizontalFieldOfView
float horizontalFieldOfView
Definition: r_local.h:127
oldrefdef_t::aliasvrectright
int aliasvrectright
Definition: r_local.h:116
R_EdgeCodeStart
void R_EdgeCodeStart(void)
erroradjustdown
int erroradjustdown
Definition: r_local.h:547
sw_maxsurfs
cvar_t * sw_maxsurfs
Definition: r_main.c:118
surf_s::d_ziorigin
float d_ziorigin
Definition: r_local.h:415
vrect_s::pnext
struct vrect_s * pnext
Definition: r_local.h:83
R_AnimateLight
void R_AnimateLight(void)
R_DrawBeam
void R_DrawBeam(entity_t *e)
Definition: r_main.c:1245
affinetridesc_t::seamfixupX16
int seamfixupX16
Definition: r_local.h:313
oldrefdef_t::vrect
vrect_t vrect
Definition: r_local.h:112
R_StepActiveU
void R_StepActiveU(edge_t *pedge)
Definition: r_edge.c:216
affinetridesc_t::numtriangles
int numtriangles
Definition: r_local.h:311
sc_base
surfcache_t * sc_base
Definition: r_local.h:753
r_warpbuffer
byte r_warpbuffer[WARP_WIDTH *WARP_HEIGHT]
Definition: r_main.c:41
fixed16_t
int fixed16_t
Definition: q_shared.h:132
drawsurf_t::surf
msurface_t * surf
Definition: r_local.h:322
Draw_Pic
void Draw_Pic(int x, int y, char *name)
Definition: r_draw.c:253
sw_mode
cvar_t * sw_mode
Definition: r_main.c:119
d_8to24table
unsigned d_8to24table[256]
Definition: r_main.c:27
R_UnRegister
void R_UnRegister(void)
Definition: r_main.c:288
d_vrectbottom_particle
int d_vrectbottom_particle
Definition: r_local.h:496
oldrefdef_t
Definition: r_local.h:110
vrect_s::width
int width
Definition: vid.h:24
R_LightPoint
void R_LightPoint(vec3_t p, vec3_t color)
Definition: r_light.c:224
affinetridesc_t::vis_thresh
int vis_thresh
Definition: r_local.h:315
R_FreeUnusedImages
void R_FreeUnusedImages(void)
Definition: r_image.c:578
sw_reportsurfout
cvar_t * sw_reportsurfout
Definition: r_main.c:121
polydesc_t
Definition: r_local.h:382
edge_s::prev
struct edge_s * prev
Definition: r_local.h:425
surf_s::last_u
int last_u
Definition: r_local.h:405
finalvert_s::s
int s
Definition: r_local.h:282
R_EndRegistration
void R_EndRegistration(void)
Definition: r_model.c:1208
rserr_ok
@ rserr_ok
Definition: r_local.h:99
R_RenderFace
void R_RenderFace(msurface_t *fa, int clipflags)
Definition: r_rast.c:525
bedge_s::v
mvertex_t * v[2]
Definition: r_local.h:343
surf_s::insubmodel
qboolean insubmodel
Definition: r_local.h:414
entity_s
Definition: ref.h:49
polydesc_t::vup
vec3_t vup
Definition: r_local.h:389
view_clipplanes
clipplane_t view_clipplanes[4]
Definition: r_rast.c:38
swstate_s::fullscreen
qboolean fullscreen
Definition: r_local.h:819
surfcache_s::data
byte data[4]
Definition: r_local.h:371
fixed8_t
int fixed8_t
Definition: q_shared.h:131
R_RenderBmodelFace
void R_RenderBmodelFace(bedge_t *pedges, msurface_t *psurf)
Definition: r_rast.c:738
alight_t
Definition: r_local.h:333
finalvert_s::flags
int flags
Definition: r_local.h:285
R_AliasDrawModel
void R_AliasDrawModel(void)
Definition: r_alias.c:1038
Draw_StretchPic
void Draw_StretchPic(int x, int y, int w, int h, char *name)
Definition: r_draw.c:220
db_time1
float db_time1
Definition: r_local.h:724
yOrigin
float yOrigin
Definition: r_local.h:602
newedges
edge_t * newedges[MAXHEIGHT]
Definition: r_edge.c:57
R_Register
void R_Register(void)
Definition: r_main.c:245
d_zwidth
unsigned int d_zwidth
Definition: r_local.h:502
d_vrectright_particle
int d_vrectright_particle
Definition: r_local.h:496
colormap
void * colormap
Definition: r_main.c:45
r_ptverts
mvertex_t * r_ptverts
NonTurbulent8
void NonTurbulent8(espan_t *pspan)
Definition: r_scan.c:259
r_frustum_indexes
int r_frustum_indexes[4 *6]
Definition: r_main.c:99
drawsurf_t
Definition: r_local.h:318
aliastriangleparms_t::c
finalvert_t * c
Definition: r_local.h:712
aliasyscale
float aliasyscale
Definition: r_local.h:702
msurface_s
Definition: r_model.h:93
D_DrawZSpans
void D_DrawZSpans(espan_t *pspans)
Definition: r_scan.c:537
oldrefdef_t::vrectright
int vrectright
Definition: r_local.h:115
d_vrecty
int d_vrecty
Definition: r_local.h:496
aliastriangleparms
aliastriangleparms_t aliastriangleparms
Definition: r_polyse.c:59
removeedges
edge_t * removeedges[MAXHEIGHT]
Definition: r_edge.c:58
edge_max
edge_t * edge_max
Definition: r_local.h:690
d_sdivzstepu
float d_sdivzstepu
Definition: r_main.c:173
R_FindImage
image_t * R_FindImage(char *name, imagetype_t type)
Definition: r_image.c:497
mplane_s
Definition: r_model.h:57
surf_s::prev
struct surf_s * prev
Definition: r_local.h:402
db_time2
float db_time2
Definition: r_local.h:724
modelorg
vec3_t modelorg
Definition: r_bsp.c:29
R_Shutdown
void R_Shutdown(void)
Definition: r_main.c:346
R_EdgeCodeEnd
void R_EdgeCodeEnd(void)
oldrefdef_t::vrect_x_adj_shift20
int vrect_x_adj_shift20
Definition: r_local.h:121
surfcache_s::dlight
int dlight
Definition: r_local.h:365
r_maxvalidedgeoffset
int r_maxvalidedgeoffset
R_RenderFrame
void R_RenderFrame(refdef_t *fd)
Definition: r_main.c:992
R_PrintDSpeeds
void R_PrintDSpeeds(void)
Definition: r_misc.c:151
R_DrawSurface
void R_DrawSurface(void)
Definition: r_surf.c:90
clipplane_s::dist
float dist
Definition: r_local.h:352
R_DrawAlphaSurfaces
void R_DrawAlphaSurfaces(void)
Definition: r_poly.c:1192
surfcache_s::width
unsigned width
Definition: r_local.h:367
R_BeginFrame
void R_BeginFrame(float camera_separation)
Definition: r_main.c:1099
w
GLdouble GLdouble GLdouble w
Definition: qgl_win.c:291
R_cshift_f
void R_cshift_f(void)
R_DrawParticle
void R_DrawParticle(void)
Definition: r_part.c:467
R_InsertNewEdges
void R_InsertNewEdges(edge_t *edgestoadd, edge_t *edgelist)
Definition: r_edge.c:155
r_ptvertsmax
mvertex_t * r_ptvertsmax
Definition: r_local.h:675
image_s
Definition: r_local.h:65
d_sdivzstepv
float d_sdivzstepv
Definition: r_main.c:174
auxedges
edge_t * auxedges
Definition: r_edge.c:48
affinetridesc_t::skinheight
int skinheight
Definition: r_local.h:308
polydesc_t::pverts
emitpoint_t * pverts
Definition: r_local.h:385
R_SplitEntityOnNode2
void R_SplitEntityOnNode2(mnode_t *node)
vrect_s
Definition: vid.h:22
mode
GLenum mode
Definition: qgl_win.c:113
sw_clearcolor
cvar_t * sw_clearcolor
Definition: r_main.c:114
r_dlightframecount
int r_dlightframecount
Definition: r_light.c:24
cacheblock
pixel_t * cacheblock
Definition: r_main.c:179
viddef_t::colormap
pixel_t * colormap
Definition: r_local.h:89
R_ScanEdges
void R_ScanEdges(void)
Definition: r_edge.c:635
d_pzbuffer
short * d_pzbuffer
Definition: r_main.c:182
r_worldentity
entity_t r_worldentity
Definition: r_main.c:29
sc_rover
surfcache_t * sc_rover
Definition: r_local.h:753
r_fullbright
cvar_t * r_fullbright
Definition: r_main.c:129
tadjust
fixed16_t tadjust
Definition: r_local.h:485
Sys_SetFPCW
void Sys_SetFPCW(void)
Definition: rw_imp.c:437
surfcache_s::next
struct surfcache_s * next
Definition: r_local.h:362
Draw_InitLocal
void Draw_InitLocal(void)
Definition: r_draw.c:58
polydesc_t::pixel_height
int pixel_height
Definition: r_local.h:388
swstate_s::currentpalette
byte currentpalette[1024]
Definition: r_local.h:823
xcenter
float xcenter
Definition: r_main.c:75
dtriangle_t
Definition: qfiles.h:101
viddef_t::alphamap
pixel_t * alphamap
Definition: r_local.h:90
sw_state
swstate_t sw_state
Definition: r_main.c:43
R_TransformPlane
void R_TransformPlane(mplane_t *p, float *normal, float *dist)
Definition: r_misc.c:279
r_maxsurfsseen
int r_maxsurfsseen
Definition: r_main.c:59
vpn
vec3_t vpn
Definition: r_main.c:67
rserr_invalid_fullscreen
@ rserr_invalid_fullscreen
Definition: r_local.h:101
oldrefdef_t::aliasvrect
vrect_t aliasvrect
Definition: r_local.h:114
R_SetupFrame
void R_SetupFrame(void)
Definition: r_misc.c:426
drawsurf_t::surfwidth
int surfwidth
Definition: r_local.h:327
TransformVector
void TransformVector(vec3_t in, vec3_t out)
Definition: r_misc.c:215
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
surf_s
Definition: r_local.h:399
r_pcurrentvertbase
mvertex_t * r_pcurrentvertbase
Definition: r_main.c:56
finalvert_s::l
int l
Definition: r_local.h:283
vid_fullscreen
cvar_t * vid_fullscreen
Definition: vid_dll.c:46
yscale
float yscale
Definition: r_local.h:539
SWimp_SetPalette
void SWimp_SetPalette(const unsigned char *palette)
Definition: rw_imp.c:333
R_Surf8End
void R_Surf8End(void)
R_DrawSurfaceBlock8_mip1
void R_DrawSurfaceBlock8_mip1(void)
Definition: r_surf.c:223
SWimp_Shutdown
void SWimp_Shutdown(void)
Definition: rw_imp.c:359
r_refdef
oldrefdef_t r_refdef
Definition: r_main.c:74
surfcache_t
struct surfcache_s surfcache_t
void
void(APIENTRY *qglAccum)(GLenum op
vrect_t
struct vrect_s vrect_t
dp_time2
float dp_time2
Definition: r_local.h:724
edge_s
Definition: r_local.h:421
Draw_TileClear
void Draw_TileClear(int x, int y, int w, int h, char *name)
Definition: r_draw.c:345
alight_t::ambientlight
int ambientlight
Definition: r_local.h:334
surf_s::spanstate
int spanstate
Definition: r_local.h:406
R_RemoveEdges
void R_RemoveEdges(edge_t *pedge)
Definition: r_edge.c:196
oldrefdef_t::fvrecty
float fvrecty
Definition: r_local.h:119
affinetridesc_t::pskin
void * pskin
Definition: r_local.h:305
vrect_s::y
int y
Definition: vid.h:24
it_sky
@ it_sky
Definition: r_local.h:62
vid
viddef_t vid
Definition: r_main.c:24