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 | // d_varsa.s |
||
22 | // |
||
23 | |||
24 | #include "asm_i386.h" |
||
25 | #include "quakeasm.h" |
||
26 | #include "asm_draw.h" |
||
27 | #include "d_ifacea.h" |
||
28 | |||
29 | #if id386 |
||
30 | |||
31 | .data |
||
32 | |||
33 | //------------------------------------------------------- |
||
34 | // global refresh variables |
||
35 | //------------------------------------------------------- |
||
36 | |||
37 | // FIXME: put all refresh variables into one contiguous block. Make into one |
||
38 | // big structure, like cl or sv? |
||
39 | |||
40 | .align 4 |
||
41 | .globl C(d_sdivzstepu) |
||
42 | .globl C(d_tdivzstepu) |
||
43 | .globl C(d_zistepu) |
||
44 | .globl C(d_sdivzstepv) |
||
45 | .globl C(d_tdivzstepv) |
||
46 | .globl C(d_zistepv) |
||
47 | .globl C(d_sdivzorigin) |
||
48 | .globl C(d_tdivzorigin) |
||
49 | .globl C(d_ziorigin) |
||
50 | C(d_sdivzstepu): .single 0 |
||
51 | C(d_tdivzstepu): .single 0 |
||
52 | C(d_zistepu): .single 0 |
||
53 | C(d_sdivzstepv): .single 0 |
||
54 | C(d_tdivzstepv): .single 0 |
||
55 | C(d_zistepv): .single 0 |
||
56 | C(d_sdivzorigin): .single 0 |
||
57 | C(d_tdivzorigin): .single 0 |
||
58 | C(d_ziorigin): .single 0 |
||
59 | |||
60 | .globl C(sadjust) |
||
61 | .globl C(tadjust) |
||
62 | .globl C(bbextents) |
||
63 | .globl C(bbextentt) |
||
64 | C(sadjust): .long 0 |
||
65 | C(tadjust): .long 0 |
||
66 | C(bbextents): .long 0 |
||
67 | C(bbextentt): .long 0 |
||
68 | |||
69 | .globl C(cacheblock) |
||
70 | .globl C(d_viewbuffer) |
||
71 | .globl C(cachewidth) |
||
72 | .globl C(d_pzbuffer) |
||
73 | .globl C(d_zrowbytes) |
||
74 | .globl C(d_zwidth) |
||
75 | C(cacheblock): .long 0 |
||
76 | C(cachewidth): .long 0 |
||
77 | C(d_viewbuffer): .long 0 |
||
78 | C(d_pzbuffer): .long 0 |
||
79 | C(d_zrowbytes): .long 0 |
||
80 | C(d_zwidth): .long 0 |
||
81 | |||
82 | |||
83 | //------------------------------------------------------- |
||
84 | // ASM-only variables |
||
85 | //------------------------------------------------------- |
||
86 | .globl izi |
||
87 | izi: .long 0 |
||
88 | |||
89 | .globl pbase, s, t, sfracf, tfracf, snext, tnext |
||
90 | .globl spancountminus1, zi16stepu, sdivz16stepu, tdivz16stepu |
||
91 | .globl zi8stepu, sdivz8stepu, tdivz8stepu, pz |
||
92 | s: .long 0 |
||
93 | t: .long 0 |
||
94 | snext: .long 0 |
||
95 | tnext: .long 0 |
||
96 | sfracf: .long 0 |
||
97 | tfracf: .long 0 |
||
98 | pbase: .long 0 |
||
99 | zi8stepu: .long 0 |
||
100 | sdivz8stepu: .long 0 |
||
101 | tdivz8stepu: .long 0 |
||
102 | zi16stepu: .long 0 |
||
103 | sdivz16stepu: .long 0 |
||
104 | tdivz16stepu: .long 0 |
||
105 | spancountminus1: .long 0 |
||
106 | pz: .long 0 |
||
107 | |||
108 | .globl izistep |
||
109 | izistep: .long 0 |
||
110 | |||
111 | //------------------------------------------------------- |
||
112 | // local variables for d_draw16.s |
||
113 | //------------------------------------------------------- |
||
114 | |||
115 | .globl reciprocal_table_16, entryvec_table_16 |
||
116 | // 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, |
||
117 | // 1/14, and 1/15 in 0.32 form |
||
118 | reciprocal_table_16: .long 0x40000000, 0x2aaaaaaa, 0x20000000 |
||
119 | .long 0x19999999, 0x15555555, 0x12492492 |
||
120 | .long 0x10000000, 0xe38e38e, 0xccccccc, 0xba2e8ba |
||
121 | .long 0xaaaaaaa, 0x9d89d89, 0x9249249, 0x8888888 |
||
122 | |||
123 | #ifndef NeXT |
||
124 | .extern Entry2_16 |
||
125 | .extern Entry3_16 |
||
126 | .extern Entry4_16 |
||
127 | .extern Entry5_16 |
||
128 | .extern Entry6_16 |
||
129 | .extern Entry7_16 |
||
130 | .extern Entry8_16 |
||
131 | .extern Entry9_16 |
||
132 | .extern Entry10_16 |
||
133 | .extern Entry11_16 |
||
134 | .extern Entry12_16 |
||
135 | .extern Entry13_16 |
||
136 | .extern Entry14_16 |
||
137 | .extern Entry15_16 |
||
138 | .extern Entry16_16 |
||
139 | #endif |
||
140 | |||
141 | entryvec_table_16: .long 0, Entry2_16, Entry3_16, Entry4_16 |
||
142 | .long Entry5_16, Entry6_16, Entry7_16, Entry8_16 |
||
143 | .long Entry9_16, Entry10_16, Entry11_16, Entry12_16 |
||
144 | .long Entry13_16, Entry14_16, Entry15_16, Entry16_16 |
||
145 | |||
146 | //------------------------------------------------------- |
||
147 | // local variables for d_parta.s |
||
148 | //------------------------------------------------------- |
||
149 | .globl DP_Count, DP_u, DP_v, DP_32768, DP_Color, DP_Pix, DP_EntryTable |
||
150 | DP_Count: .long 0 |
||
151 | DP_u: .long 0 |
||
152 | DP_v: .long 0 |
||
153 | DP_32768: .single 32768.0 |
||
154 | DP_Color: .long 0 |
||
155 | DP_Pix: .long 0 |
||
156 | |||
157 | |||
158 | #ifndef NeXT |
||
159 | .extern DP_1x1 |
||
160 | .extern DP_2x2 |
||
161 | .extern DP_3x3 |
||
162 | .extern DP_4x4 |
||
163 | #endif |
||
164 | |||
165 | DP_EntryTable: .long DP_1x1, DP_2x2, DP_3x3, DP_4x4 |
||
166 | |||
167 | // |
||
168 | // advancetable is 8 bytes, but points to the middle of that range so negative |
||
169 | // offsets will work |
||
170 | // |
||
171 | .globl advancetable, sstep, tstep, pspantemp, counttemp, jumptemp |
||
172 | advancetable: .long 0, 0 |
||
173 | sstep: .long 0 |
||
174 | tstep: .long 0 |
||
175 | |||
176 | pspantemp: .long 0 |
||
177 | counttemp: .long 0 |
||
178 | jumptemp: .long 0 |
||
179 | |||
180 | // 1/2, 1/3, 1/4, 1/5, 1/6, and 1/7 in 0.32 form |
||
181 | .globl reciprocal_table, entryvec_table |
||
182 | reciprocal_table: .long 0x40000000, 0x2aaaaaaa, 0x20000000 |
||
183 | .long 0x19999999, 0x15555555, 0x12492492 |
||
184 | |||
185 | #ifndef NeXT |
||
186 | .extern Entry2_8 |
||
187 | .extern Entry3_8 |
||
188 | .extern Entry4_8 |
||
189 | .extern Entry5_8 |
||
190 | .extern Entry6_8 |
||
191 | .extern Entry7_8 |
||
192 | .extern Entry8_8 |
||
193 | #endif |
||
194 | |||
195 | entryvec_table: .long 0, Entry2_8, Entry3_8, Entry4_8 |
||
196 | .long Entry5_8, Entry6_8, Entry7_8, Entry8_8 |
||
197 | |||
198 | #ifndef NeXT |
||
199 | .extern Spr8Entry2_8 |
||
200 | .extern Spr8Entry3_8 |
||
201 | .extern Spr8Entry4_8 |
||
202 | .extern Spr8Entry5_8 |
||
203 | .extern Spr8Entry6_8 |
||
204 | .extern Spr8Entry7_8 |
||
205 | .extern Spr8Entry8_8 |
||
206 | #endif |
||
207 | |||
208 | .globl spr8entryvec_table |
||
209 | spr8entryvec_table: .long 0, Spr8Entry2_8, Spr8Entry3_8, Spr8Entry4_8 |
||
210 | .long Spr8Entry5_8, Spr8Entry6_8, Spr8Entry7_8, Spr8Entry8_8 |
||
211 | |||
212 | #endif // id386 |
||
213 |