icculus quake2 doxygen  1.0 dev
asm_draw.h
Go to the documentation of this file.
1 //
2 // asm_draw.h
3 //
4 // Include file for asm drawing routines.
5 //
6 
7 //
8 // !!! note that this file must match the corresponding C structures at all
9 // times !!!
10 //
11 
12 // !!! if this is changed, it must be changed in r_local.h too !!!
13 #define NEAR_CLIP 0.01
14 
15 // !!! if this is changed, it must be changed in r_local.h too !!!
16 #define CYCLE 128
17 
18 // espan_t structure
19 // !!! if this is changed, it must be changed in r_shared.h too !!!
20 #define espan_t_u 0
21 #define espan_t_v 4
22 #define espan_t_count 8
23 #define espan_t_pnext 12
24 #define espan_t_size 16
25 
26 // sspan_t structure
27 // !!! if this is changed, it must be changed in d_local.h too !!!
28 #define sspan_t_u 0
29 #define sspan_t_v 4
30 #define sspan_t_count 8
31 #define sspan_t_pnext 12
32 #define sspan_t_size 16
33 
34 // edge_t structure
35 // !!! if this is changed, it must be changed in r_shared.h too !!!
36 #define et_u 0
37 #define et_u_step 4
38 #define et_prev 8
39 #define et_next 12
40 #define et_surfs 16
41 #define et_nextremove 20
42 #define et_nearzi 24
43 #define et_owner 28
44 #define et_size 32
45 
46 // surf_t structure
47 // !!! if this is changed, it must be changed in r_shared.h too !!!
48 #define SURF_T_SHIFT 6
49 #define st_next 0
50 #define st_prev 4
51 #define st_spans 8
52 #define st_key 12
53 #define st_last_u 16
54 #define st_spanstate 20
55 #define st_flags 24
56 #define st_data 28
57 #define st_entity 32
58 #define st_nearzi 36
59 #define st_insubmodel 40
60 #define st_d_ziorigin 44
61 #define st_d_zistepu 48
62 #define st_d_zistepv 52
63 #define st_pad 56
64 #define st_size 64
65 
66 // clipplane_t structure
67 // !!! if this is changed, it must be changed in r_local.h too !!!
68 #define cp_normal 0
69 #define cp_dist 12
70 #define cp_next 16
71 #define cp_leftedge 20
72 #define cp_rightedge 21
73 #define cp_reserved 22
74 #define cp_size 24
75 
76 // medge_t structure
77 // !!! if this is changed, it must be changed in model.h too !!!
78 #define me_v 0
79 #define me_cachededgeoffset 4
80 #define me_size 8
81 
82 // mvertex_t structure
83 // !!! if this is changed, it must be changed in model.h too !!!
84 #define mv_position 0
85 #define mv_size 12
86 
87 // refdef_t structure
88 // !!! if this is changed, it must be changed in render.h too !!!
89 #define rd_vrect 0
90 #define rd_aliasvrect 20
91 #define rd_vrectright 40
92 #define rd_vrectbottom 44
93 #define rd_aliasvrectright 48
94 #define rd_aliasvrectbottom 52
95 #define rd_vrectrightedge 56
96 #define rd_fvrectx 60
97 #define rd_fvrecty 64
98 #define rd_fvrectx_adj 68
99 #define rd_fvrecty_adj 72
100 #define rd_vrect_x_adj_shift20 76
101 #define rd_vrectright_adj_shift20 80
102 #define rd_fvrectright_adj 84
103 #define rd_fvrectbottom_adj 88
104 #define rd_fvrectright 92
105 #define rd_fvrectbottom 96
106 #define rd_horizontalFieldOfView 100
107 #define rd_xOrigin 104
108 #define rd_yOrigin 108
109 #define rd_vieworg 112
110 #define rd_viewangles 124
111 #define rd_ambientlight 136
112 #define rd_size 140
113 
114 // mtriangle_t structure
115 // !!! if this is changed, it must be changed in model.h too !!!
116 #define mtri_facesfront 0
117 #define mtri_vertindex 4
118 #define mtri_size 16 // !!! if this changes, array indexing in !!!
119  // !!! d_polysa.s must be changed to match !!!
120 #define mtri_shift 4
121