Mercurial > mm7
annotate Indoor_stuff.h @ 1205:8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
author | Grumpy7 |
---|---|
date | Sun, 09 Jun 2013 00:30:48 +0200 |
parents | 0dbf6c4dd029 |
children | 0aeac0b9ca30 21a46b38ca24 1577d75db258 |
rev | line source |
---|---|
0 | 1 #pragma once |
2 #include "Render.h" | |
1016 | 3 #include "IndoorCameraD3D.h" |
0 | 4 |
5 | |
6 | |
7 /* 165 */ | |
8 #pragma pack(push, 1) | |
9 struct BspRenderer_stru2 | |
10 { | |
11 void _43F9E1(__int16 x, int y, __int16 z, int w); | |
12 | |
13 int _viewport_space_y; | |
14 int _viewport_space_w; | |
15 int field_8; | |
16 int field_C; | |
17 int field_10; | |
18 int field_14; | |
19 __int16 array_18[480]; | |
20 __int16 array_3D8[480]; | |
21 }; | |
22 #pragma pack(pop) | |
23 extern BspRenderer_stru2 stru_F8A590; | |
24 | |
25 | |
26 | |
27 | |
28 /* 164 */ | |
29 #pragma pack(push, 1) | |
30 struct BspRenderer_stru0 | |
31 { | |
32 //----- (0043F2BF) -------------------------------------------------------- | |
33 inline BspRenderer_stru0() | |
34 { | |
35 //_eh_vector_constructor_iterator_(std__vector_0007AC, 24, 4, | |
36 // (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::IndoorCameraD3D_Vec4, | |
37 // (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::dtor); | |
38 //for (int i = 0; i < 4; ++i) | |
39 // pVertices[i].flt_2C = 0.0f; | |
40 } | |
41 | |
42 //----- (0043F2A9) -------------------------------------------------------- | |
43 ~BspRenderer_stru0() | |
44 { | |
45 //_eh_vector_destructor_iterator_(this->std__vector_0007AC, 24, 4, IndoorCameraD3D_Vec4::dtor); | |
46 } | |
47 | |
48 unsigned __int16 uSectorID; | |
49 unsigned __int16 uViewportX; | |
50 unsigned __int16 uViewportY; | |
51 unsigned __int16 uViewportZ; | |
52 unsigned __int16 uViewportW; | |
53 __int16 field_A; | |
54 BspRenderer_stru2 field_C; | |
55 unsigned __int16 uFaceID; | |
56 __int16 field_7A6; | |
795 | 57 unsigned int viewing_portal_id; // portal through which we're seeing this node |
0 | 58 IndoorCameraD3D_Vec4 std__vector_0007AC[4]; |
795 | 59 RenderVertexSoft pPortalBounding[4]; |
0 | 60 }; |
61 #pragma pack(pop) | |
62 | |
63 | |
64 | |
65 | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
66 #pragma pack(push, 1) |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
67 struct BspFace |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
68 { |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
69 unsigned __int16 uFaceID; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
70 unsigned __int16 uNodeID; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
71 }; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
72 #pragma pack(pop) |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
73 |
0 | 74 |
75 /* 163 */ | |
76 #pragma pack(push, 1) | |
486 | 77 struct BspRenderer // stru170 |
0 | 78 { |
79 //----- (0043F282) -------------------------------------------------------- | |
80 inline BspRenderer() | |
81 { | |
82 // _eh_vector_constructor_iterator_(field_FA8, 2252, 150, | |
83 // (void (__thiscall *)(void *))stru170_stru0::stru170_stru0, | |
84 // (void (__thiscall *)(void *))stru170_stru0::dtor); | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
85 num_faces = 0; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
86 num_nodes = 0; |
0 | 87 uNumVisibleNotEmptySectors = 0; |
88 } | |
89 | |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
90 void AddFaceToRenderList_sw(unsigned int node_id, unsigned int uFaceID); |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
91 void AddFaceToRenderList_d3d(unsigned int node_id, unsigned int uFaceID); |
0 | 92 void MakeVisibleSectorList(); |
486 | 93 void DrawFaceOutlines(); |
0 | 94 |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
95 unsigned int num_faces; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
96 //__int16 pFaceIDs[2000]; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
97 BspFace faces[1000]; |
666 | 98 //char field_130[3700]; |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
99 unsigned int num_nodes; |
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
666
diff
changeset
|
100 BspRenderer_stru0 nodes[150]; |
0 | 101 unsigned int uNumVisibleNotEmptySectors; |
102 unsigned __int16 pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[6]; | |
103 }; | |
104 #pragma pack(pop) | |
105 | |
106 | |
107 extern struct BspRenderer *pBspRenderer; // idb | |
108 | |
109 | |
110 | |
111 | |
112 | |
113 | |
114 /* 160 */ | |
115 #pragma pack(push, 1) | |
116 struct stru167 | |
117 { | |
118 char field_0; | |
119 char field_1; | |
120 char field_2; | |
121 char field_3; | |
122 char field_4; | |
123 char field_5; | |
124 __int16 field_6_rnd_value; | |
125 __int16 field_8_rnd_value; | |
126 __int16 field_A_rnd_value; | |
127 __int16 field_C_time_left; | |
128 __int16 field_E_time_to_live; | |
129 char field_10; | |
130 char field_11; | |
131 char field_12; | |
132 char field_13; | |
133 __int16 bgr16; | |
134 char field_16; | |
135 char field_17; | |
136 }; | |
137 #pragma pack(pop) | |
138 | |
139 | |
140 | |
141 /* 363 */ | |
142 #pragma pack(push, 1) | |
143 struct stru167_wrap | |
144 { | |
145 void _440F07(); | |
146 int Push(__int16 a2, __int16 a3, __int16 a4, int a5, __int16 bgr); | |
147 void _440E91(__int16 x, int y, int z, int a5, __int16 bgr); | |
148 | |
149 stru167 pElements[100]; | |
150 int uNumElements; | |
151 int field_964; | |
152 }; | |
153 #pragma pack(pop) | |
154 extern stru167_wrap array_5118E8; | |
155 | |
156 | |
157 | |
158 | |
159 | |
160 | |
161 | |
162 | |
163 | |
164 | |
165 | |
166 /* 358 */ | |
167 #pragma pack(push, 1) | |
168 struct stru320 | |
169 { | |
170 int field_0; | |
171 Plane_int_ plane_4; | |
172 Vec3_int_ vec_14; | |
173 Vec3_int_ vec_20; | |
174 unsigned int uCurrentAmbientLightLevel; | |
175 int field_30; | |
176 int field_34; | |
177 int field_38; | |
178 int pDeltaUV[2]; | |
179 int field_44; | |
180 int field_48; | |
181 char field_4C[8]; | |
182 Vec3_int_ rotated_normal; | |
183 Vec3_int_ vec_60; | |
184 int field_6C; | |
185 Vec3_int_ vec_70; | |
186 int field_7C; | |
187 Vec3_int_ vec_80; | |
188 Vec3_int_ vec_8C; | |
189 int field_98; | |
190 Vec3_int_ vec_9C; | |
191 int field_A8; | |
192 unsigned int uNumLightsApplied; | |
193 int _blv_lights_radii[20]; | |
194 int _blv_lights_inv_radii[20]; | |
195 int _blv_lights_xs[20]; | |
196 int _blv_lights_ys[20]; | |
197 int _blv_lights_light_dot_faces[20]; | |
198 int field_240; | |
199 int field_244; | |
200 int field_248; | |
201 int field_24C; | |
202 int field_250; | |
203 int field_254; | |
204 int field_258; | |
205 int field_25C; | |
206 int field_260; | |
207 int field_264; | |
208 int field_268; | |
209 int field_26C; | |
210 int field_270; | |
211 int field_274; | |
212 int field_278; | |
213 int field_27C; | |
214 int field_280; | |
215 int field_284; | |
216 int field_288; | |
217 int field_28C; | |
218 int _blv_lights_zs[20]; | |
219 float _blv_lights_rs[20]; | |
220 float _blv_lights_gs[20]; | |
221 float _blv_lights_bs[20]; | |
222 char _blv_lights_types[20]; | |
223 int field_3E4; | |
224 int field_3E8; | |
225 int field_3EC; | |
226 int field_3F0; | |
227 int field_3F4; | |
228 unsigned int uDefaultAmbientLightLevel; | |
229 }; | |
230 #pragma pack(pop) | |
231 | |
232 extern stru320 stru_F8AD28; // idb | |
233 | |
234 | |
235 | |
236 | |
237 | |
238 | |
239 | |
240 | |
241 /* 345 */ | |
242 #pragma pack(push, 1) | |
243 struct stru315 | |
244 { | |
245 int field_0; | |
246 int field_4; | |
247 int field_8; | |
248 int field_C; | |
249 int field_10; | |
250 int field_14; | |
251 int field_18; | |
252 int field_1C; | |
253 int field_20; | |
254 int field_24; | |
255 int field_28; | |
256 int field_2C; | |
257 int field_30; | |
258 unsigned __int16 *field_34_palette; | |
259 unsigned __int16 *pTextureLOD; | |
260 unsigned int *pDepthBuffer; | |
261 unsigned __int16 *pColorBuffer; | |
262 }; | |
263 #pragma pack(pop) | |
264 | |
265 | |
266 | |
267 | |
268 | |
269 /* 346 */ | |
270 #pragma pack(push, 1) | |
271 struct stru316 | |
272 { | |
273 int field_0; | |
274 int field_4; | |
275 int field_8; | |
276 int field_C; | |
277 int field_10; | |
278 int field_14; | |
279 int field_18; | |
280 int field_1C; | |
281 int field_20; | |
282 unsigned __int16 *field_24_palette; | |
283 }; | |
284 #pragma pack(pop) | |
285 | |
286 | |
287 | |
288 | |
289 | |
290 | |
291 /* 134 */ | |
292 #pragma pack(push, 1) | |
293 struct stru141 | |
294 { | |
295 int _47050A(int a2); | |
296 | |
297 int field_0; | |
298 int prolly_normal_d; | |
299 int field_8; | |
300 int field_C; | |
301 int field_10; | |
302 int field_14; | |
303 int field_18; | |
304 int field_1C; | |
305 int field_20; | |
306 int field_24; | |
307 Vec3_int_ normal; | |
308 Vec3_int_ field_34; | |
309 Vec3_int_ normal2; | |
310 int field_4C; | |
311 int field_50; | |
312 int field_54; | |
313 Vec3_int_ field_58; | |
314 int field_64; | |
315 int field_68; | |
316 int field_6C; | |
317 int field_70; | |
318 unsigned int uSectorID; | |
319 unsigned int uFaceID; | |
320 int field_7C; | |
321 int field_80; | |
322 int field_84; | |
323 int field_88; | |
324 int sMaxX; | |
325 int sMinX; | |
326 int sMaxY; | |
327 int sMinY; | |
328 int sMaxZ; | |
329 int sMinZ; | |
330 int field_A4; | |
331 }; | |
332 #pragma pack(pop) | |
333 extern stru141 stru_721530; | |
334 | |
335 | |
336 | |
337 | |
338 | |
339 | |
340 /* 378 */ | |
341 #pragma pack(push, 1) | |
342 struct stru337_stru0 | |
343 { | |
344 int field_0; | |
345 int field_4; | |
346 int field_8; | |
347 int field_C; | |
348 int field_10; | |
349 }; | |
350 #pragma pack(pop) | |
351 | |
352 | |
353 | |
354 /* 377 */ | |
355 #pragma pack(push, 1) | |
356 struct stru337 | |
357 { | |
358 stru337_stru0 field_0; | |
359 int field_14; | |
360 int field_18; | |
361 int field_1C; | |
362 int field_20; | |
363 int field_24; | |
364 int field_28; | |
365 int field_2C; | |
366 int field_30; | |
367 stru337_stru0 field_34; | |
368 }; | |
369 #pragma pack(pop) | |
370 extern stru337 stru_F81018; | |
371 | |
372 | |
373 | |
374 | |
375 /* 147 */ | |
376 #pragma pack(push, 1) | |
67 | 377 |
0 | 378 struct stru154 |
379 { | |
380 //----- (0049B001) -------------------------------------------------------- | |
381 inline stru154() | |
382 {} | |
383 | |
384 //----- (0049B027) -------------------------------------------------------- | |
385 inline ~stru154() | |
386 {} | |
387 | |
734 | 388 void GetFacePlaneAndClassify(struct ODMFace *a2, struct BSPVertexBuffer *a3); |
389 void ClassifyPolygon(struct Vec3_float_ *pNormal, float dist); | |
390 void GetFacePlane(struct ODMFace *pFace, struct BSPVertexBuffer *pVertices, struct Vec3_float_ *pOutNormal, float *pOutDist); | |
0 | 391 |
392 | |
393 void (__thiscall ***vdestructor_ptr)(stru154 *, bool); | |
394 Plane_float_ face_plane; | |
395 PolygonType polygonType; | |
396 char field_15; | |
397 char field_16; | |
398 char field_17; | |
399 }; | |
400 #pragma pack(pop) | |
401 | |
402 | |
403 | |
404 | |
405 | |
406 /* 392 */ | |
407 #pragma pack(push, 1) | |
408 struct stru352 | |
409 { | |
410 int field_0; | |
411 int field_4; | |
412 int field_8; | |
413 int field_C; | |
414 int field_10; | |
415 int field_14; | |
416 int field_18; | |
417 int field_1C; | |
418 int field_20; | |
419 int field_24; | |
420 int field_28; | |
421 int field_2C; | |
422 int field_30; | |
423 int field_34; | |
424 }; | |
425 #pragma pack(pop) | |
1202 | 426 extern std::array<stru352, 480> stru_F83B80; |