Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5131 | clevermous | 1 | /* |
2 | Copyright (C) 1996-1997 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 | // |
||
21 | // asm_draw.h |
||
22 | // |
||
23 | // Include file for asm drawing routines. |
||
24 | // |
||
25 | |||
26 | // |
||
27 | // !!! note that this file must match the corresponding C structures at all |
||
28 | // times !!! |
||
29 | // |
||
30 | |||
31 | // !!! if this is changed, it must be changed in r_local.h too !!! |
||
32 | #define NEAR_CLIP 0.01 |
||
33 | |||
34 | // !!! if this is changed, it must be changed in r_local.h too !!! |
||
35 | #define CYCLE 128 |
||
36 | |||
37 | // espan_t structure |
||
38 | // !!! if this is changed, it must be changed in r_shared.h too !!! |
||
39 | #define espan_t_u 0 |
||
40 | #define espan_t_v 4 |
||
41 | #define espan_t_count 8 |
||
42 | #define espan_t_pnext 12 |
||
43 | #define espan_t_size 16 |
||
44 | |||
45 | // sspan_t structure |
||
46 | // !!! if this is changed, it must be changed in d_local.h too !!! |
||
47 | #define sspan_t_u 0 |
||
48 | #define sspan_t_v 4 |
||
49 | #define sspan_t_count 8 |
||
50 | #define sspan_t_size 12 |
||
51 | |||
52 | // spanpackage_t structure |
||
53 | // !!! if this is changed, it must be changed in d_polyset.c too !!! |
||
54 | #define spanpackage_t_pdest 0 |
||
55 | #define spanpackage_t_pz 4 |
||
56 | #define spanpackage_t_count 8 |
||
57 | #define spanpackage_t_ptex 12 |
||
58 | #define spanpackage_t_sfrac 16 |
||
59 | #define spanpackage_t_tfrac 20 |
||
60 | #define spanpackage_t_light 24 |
||
61 | #define spanpackage_t_zi 28 |
||
62 | #define spanpackage_t_size 32 |
||
63 | |||
64 | // edge_t structure |
||
65 | // !!! if this is changed, it must be changed in r_shared.h too !!! |
||
66 | #define et_u 0 |
||
67 | #define et_u_step 4 |
||
68 | #define et_prev 8 |
||
69 | #define et_next 12 |
||
70 | #define et_surfs 16 |
||
71 | #define et_nextremove 20 |
||
72 | #define et_nearzi 24 |
||
73 | #define et_owner 28 |
||
74 | #define et_size 32 |
||
75 | |||
76 | // surf_t structure |
||
77 | // !!! if this is changed, it must be changed in r_shared.h too !!! |
||
78 | #define SURF_T_SHIFT 6 |
||
79 | #define st_next 0 |
||
80 | #define st_prev 4 |
||
81 | #define st_spans 8 |
||
82 | #define st_key 12 |
||
83 | #define st_last_u 16 |
||
84 | #define st_spanstate 20 |
||
85 | #define st_flags 24 |
||
86 | #define st_data 28 |
||
87 | #define st_entity 32 |
||
88 | #define st_nearzi 36 |
||
89 | #define st_insubmodel 40 |
||
90 | #define st_d_ziorigin 44 |
||
91 | #define st_d_zistepu 48 |
||
92 | #define st_d_zistepv 52 |
||
93 | #define st_pad 56 |
||
94 | #define st_size 64 |
||
95 | |||
96 | // clipplane_t structure |
||
97 | // !!! if this is changed, it must be changed in r_local.h too !!! |
||
98 | #define cp_normal 0 |
||
99 | #define cp_dist 12 |
||
100 | #define cp_next 16 |
||
101 | #define cp_leftedge 20 |
||
102 | #define cp_rightedge 21 |
||
103 | #define cp_reserved 22 |
||
104 | #define cp_size 24 |
||
105 | |||
106 | // medge_t structure |
||
107 | // !!! if this is changed, it must be changed in model.h too !!! |
||
108 | #define me_v 0 |
||
109 | #define me_cachededgeoffset 4 |
||
110 | #define me_size 8 |
||
111 | |||
112 | // mvertex_t structure |
||
113 | // !!! if this is changed, it must be changed in model.h too !!! |
||
114 | #define mv_position 0 |
||
115 | #define mv_size 12 |
||
116 | |||
117 | // refdef_t structure |
||
118 | // !!! if this is changed, it must be changed in render.h too !!! |
||
119 | #define rd_vrect 0 |
||
120 | #define rd_aliasvrect 20 |
||
121 | #define rd_vrectright 40 |
||
122 | #define rd_vrectbottom 44 |
||
123 | #define rd_aliasvrectright 48 |
||
124 | #define rd_aliasvrectbottom 52 |
||
125 | #define rd_vrectrightedge 56 |
||
126 | #define rd_fvrectx 60 |
||
127 | #define rd_fvrecty 64 |
||
128 | #define rd_fvrectx_adj 68 |
||
129 | #define rd_fvrecty_adj 72 |
||
130 | #define rd_vrect_x_adj_shift20 76 |
||
131 | #define rd_vrectright_adj_shift20 80 |
||
132 | #define rd_fvrectright_adj 84 |
||
133 | #define rd_fvrectbottom_adj 88 |
||
134 | #define rd_fvrectright 92 |
||
135 | #define rd_fvrectbottom 96 |
||
136 | #define rd_horizontalFieldOfView 100 |
||
137 | #define rd_xOrigin 104 |
||
138 | #define rd_yOrigin 108 |
||
139 | #define rd_vieworg 112 |
||
140 | #define rd_viewangles 124 |
||
141 | #define rd_ambientlight 136 |
||
142 | #define rd_size 140 |
||
143 | |||
144 | // mtriangle_t structure |
||
145 | // !!! if this is changed, it must be changed in model.h too !!! |
||
146 | #define mtri_facesfront 0 |
||
147 | #define mtri_vertindex 4 |
||
148 | #define mtri_size 16 // !!! if this changes, array indexing in !!! |
||
149 | // !!! d_polysa.s must be changed to match !!! |
||
150 | #define mtri_shift 4 |
||
151 |