123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- #ifndef GLQUAKE
- #ifndef _R_SHARED_H_
- #define _R_SHARED_H_
- #define MAXVERTS 16
- #define MAXWORKINGVERTS (MAXVERTS+4)
-
- #define MAXHEIGHT 1024
- #define MAXWIDTH 1280
- #define INFINITE_DISTANCE 0x10000
-
-
- extern void R_DrawLine (polyvert_t *polyvert0, polyvert_t *polyvert1);
- extern int cachewidth;
- extern pixel_t *cacheblock;
- extern int screenwidth;
- extern float pixelAspect;
- extern int r_drawnpolycount;
- extern cvar_t r_clearcolor;
- extern int sintable[1280];
- extern int intsintable[1280];
- extern vec3_t vup, base_vup;
- extern vec3_t vpn, base_vpn;
- extern vec3_t vright, base_vright;
- extern entity_t *currententity;
- #define NUMSTACKEDGES 2000
- #define MINEDGES NUMSTACKEDGES
- #define NUMSTACKSURFACES 1000
- #define MINSURFACES NUMSTACKSURFACES
- #define MAXSPANS 3000
- typedef struct espan_s
- {
- int u, v, count;
- struct espan_s *pnext;
- } espan_t;
- typedef struct surf_s
- {
- struct surf_s *next;
- struct surf_s *prev;
- struct espan_s *spans;
- int key;
- int last_u;
- int spanstate;
-
-
-
- int flags;
- void *data;
- entity_t *entity;
- float nearzi;
- qboolean insubmodel;
- float d_ziorigin, d_zistepu, d_zistepv;
- int pad[2];
- } surf_t;
- extern surf_t *surfaces, *surface_p, *surf_max;
- extern vec3_t sxformaxis[4];
- extern vec3_t txformaxis[4];
- extern vec3_t modelorg, base_modelorg;
- extern float xcenter, ycenter;
- extern float xscale, yscale;
- extern float xscaleinv, yscaleinv;
- extern float xscaleshrink, yscaleshrink;
- extern int d_lightstylevalue[256];
- extern void TransformVector (vec3_t in, vec3_t out);
- extern void SetUpForLineScan(fixed8_t startvertu, fixed8_t startvertv,
- fixed8_t endvertu, fixed8_t endvertv);
- extern int r_skymade;
- extern void R_MakeSky (void);
- extern int ubasestep, errorterm, erroradjustup, erroradjustdown;
- #define ALIAS_LEFT_CLIP 0x0001
- #define ALIAS_TOP_CLIP 0x0002
- #define ALIAS_RIGHT_CLIP 0x0004
- #define ALIAS_BOTTOM_CLIP 0x0008
- #define ALIAS_Z_CLIP 0x0010
- #define ALIAS_ONSEAM 0x0020
-
- #define ALIAS_XY_CLIP_MASK 0x000F
- typedef struct edge_s
- {
- fixed16_t u;
- fixed16_t u_step;
- struct edge_s *prev, *next;
- unsigned short surfs[2];
- struct edge_s *nextremove;
- float nearzi;
- medge_t *owner;
- } edge_t;
- #endif
- #endif
|