Mercurial > mm7
annotate Indoor_stuff.h @ 1505:6306a33af531
UIGame.cpp cleaning(continue) wizard_eye
author | Ritor1 |
---|---|
date | Mon, 02 Sep 2013 12:03:25 +0600 |
parents | 934074e7fcc1 |
children | af57b3b76fe4 |
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) | |
1376 | 9 struct BspRenderer_PortalViewportData |
0 | 10 { |
1291 | 11 void GetViewportData(__int16 x, int y, __int16 z, int w); |
0 | 12 |
13 int _viewport_space_y; | |
14 int _viewport_space_w; | |
1376 | 15 int _viewport_space_x; |
16 int _viewport_space_z; | |
17 int _viewport_x_minID; | |
18 int _viewport_z_maxID; | |
1281 | 19 __int16 viewport_left_side[480]; |
20 __int16 viewport_right_side[480]; | |
0 | 21 }; |
22 #pragma pack(pop) | |
1376 | 23 extern BspRenderer_PortalViewportData stru_F8A590; |
0 | 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, | |
1458 | 36 // (void ( *)(void *))IndoorCameraD3D_Vec4::IndoorCameraD3D_Vec4, |
37 // (void ( *)(void *))IndoorCameraD3D_Vec4::dtor); | |
0 | 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; | |
1376 | 54 BspRenderer_PortalViewportData PortalScreenData; |
0 | 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, | |
1458 | 83 // (void ( *)(void *))stru170_stru0::stru170_stru0, |
84 // (void ( *)(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 | |
115 | |
116 | |
117 | |
118 | |
119 | |
120 /* 358 */ | |
121 #pragma pack(push, 1) | |
122 struct stru320 | |
123 { | |
124 int field_0; | |
125 Plane_int_ plane_4; | |
126 Vec3_int_ vec_14; | |
127 Vec3_int_ vec_20; | |
128 unsigned int uCurrentAmbientLightLevel; | |
129 int field_30; | |
130 int field_34; | |
131 int field_38; | |
132 int pDeltaUV[2]; | |
133 int field_44; | |
134 int field_48; | |
135 char field_4C[8]; | |
136 Vec3_int_ rotated_normal; | |
137 Vec3_int_ vec_60; | |
138 int field_6C; | |
139 Vec3_int_ vec_70; | |
140 int field_7C; | |
141 Vec3_int_ vec_80; | |
142 Vec3_int_ vec_8C; | |
143 int field_98; | |
144 Vec3_int_ vec_9C; | |
145 int field_A8; | |
146 unsigned int uNumLightsApplied; | |
147 int _blv_lights_radii[20]; | |
148 int _blv_lights_inv_radii[20]; | |
149 int _blv_lights_xs[20]; | |
150 int _blv_lights_ys[20]; | |
151 int _blv_lights_light_dot_faces[20]; | |
152 int field_240; | |
153 int field_244; | |
154 int field_248; | |
155 int field_24C; | |
156 int field_250; | |
157 int field_254; | |
158 int field_258; | |
159 int field_25C; | |
160 int field_260; | |
161 int field_264; | |
162 int field_268; | |
163 int field_26C; | |
164 int field_270; | |
165 int field_274; | |
166 int field_278; | |
167 int field_27C; | |
168 int field_280; | |
169 int field_284; | |
170 int field_288; | |
171 int field_28C; | |
172 int _blv_lights_zs[20]; | |
173 float _blv_lights_rs[20]; | |
174 float _blv_lights_gs[20]; | |
175 float _blv_lights_bs[20]; | |
176 char _blv_lights_types[20]; | |
177 int field_3E4; | |
178 int field_3E8; | |
179 int field_3EC; | |
180 int field_3F0; | |
181 int field_3F4; | |
182 unsigned int uDefaultAmbientLightLevel; | |
183 }; | |
184 #pragma pack(pop) | |
185 | |
186 extern stru320 stru_F8AD28; // idb | |
187 | |
188 | |
189 | |
190 | |
191 | |
192 | |
193 | |
194 | |
195 /* 345 */ | |
196 #pragma pack(push, 1) | |
197 struct stru315 | |
198 { | |
199 int field_0; | |
200 int field_4; | |
201 int field_8; | |
202 int field_C; | |
203 int field_10; | |
204 int field_14; | |
205 int field_18; | |
206 int field_1C; | |
207 int field_20; | |
208 int field_24; | |
209 int field_28; | |
210 int field_2C; | |
211 int field_30; | |
212 unsigned __int16 *field_34_palette; | |
213 unsigned __int16 *pTextureLOD; | |
214 unsigned int *pDepthBuffer; | |
215 unsigned __int16 *pColorBuffer; | |
216 }; | |
217 #pragma pack(pop) | |
218 | |
219 | |
220 | |
221 | |
222 | |
223 /* 346 */ | |
224 #pragma pack(push, 1) | |
225 struct stru316 | |
226 { | |
227 int field_0; | |
228 int field_4; | |
229 int field_8; | |
230 int field_C; | |
231 int field_10; | |
232 int field_14; | |
233 int field_18; | |
234 int field_1C; | |
235 int field_20; | |
236 unsigned __int16 *field_24_palette; | |
237 }; | |
238 #pragma pack(pop) | |
239 | |
240 | |
241 | |
242 | |
243 | |
244 | |
245 /* 134 */ | |
246 #pragma pack(push, 1) | |
247 struct stru141 | |
248 { | |
249 int _47050A(int a2); | |
250 | |
251 int field_0; | |
252 int prolly_normal_d; | |
253 int field_8; | |
254 int field_C; | |
255 int field_10; | |
256 int field_14; | |
257 int field_18; | |
258 int field_1C; | |
259 int field_20; | |
260 int field_24; | |
261 Vec3_int_ normal; | |
262 Vec3_int_ field_34; | |
263 Vec3_int_ normal2; | |
264 int field_4C; | |
265 int field_50; | |
266 int field_54; | |
267 Vec3_int_ field_58; | |
268 int field_64; | |
269 int field_68; | |
270 int field_6C; | |
271 int field_70; | |
272 unsigned int uSectorID; | |
273 unsigned int uFaceID; | |
274 int field_7C; | |
275 int field_80; | |
276 int field_84; | |
277 int field_88; | |
278 int sMaxX; | |
279 int sMinX; | |
280 int sMaxY; | |
281 int sMinY; | |
282 int sMaxZ; | |
283 int sMinZ; | |
284 int field_A4; | |
285 }; | |
286 #pragma pack(pop) | |
287 extern stru141 stru_721530; | |
288 | |
289 | |
290 | |
291 | |
292 | |
293 | |
294 /* 378 */ | |
295 #pragma pack(push, 1) | |
296 struct stru337_stru0 | |
297 { | |
298 int field_0; | |
299 int field_4; | |
300 int field_8; | |
301 int field_C; | |
302 int field_10; | |
303 }; | |
304 #pragma pack(pop) | |
305 | |
306 | |
307 | |
308 /* 377 */ | |
309 #pragma pack(push, 1) | |
310 struct stru337 | |
311 { | |
312 stru337_stru0 field_0; | |
313 int field_14; | |
314 int field_18; | |
315 int field_1C; | |
316 int field_20; | |
317 int field_24; | |
318 int field_28; | |
319 int field_2C; | |
320 int field_30; | |
321 stru337_stru0 field_34; | |
322 }; | |
323 #pragma pack(pop) | |
324 extern stru337 stru_F81018; | |
325 | |
326 | |
1262 | 327 /* 291 */ |
328 enum PolygonType : __int8 | |
329 { | |
330 POLYGON_Invalid = 0x0, | |
331 POLYGON_VerticalWall = 0x1, | |
332 POLYGON_unk = 0x2, | |
333 POLYGON_Floor = 0x3, | |
334 POLYGON_InBetweenFloorAndWall = 0x4, | |
335 POLYGON_Ceiling = 0x5, | |
336 POLYGON_InBetweenCeilingAndWall = 0x6, | |
337 }; | |
0 | 338 |
339 | |
340 /* 147 */ | |
341 #pragma pack(push, 1) | |
67 | 342 |
0 | 343 struct stru154 |
344 { | |
345 //----- (0049B001) -------------------------------------------------------- | |
346 inline stru154() | |
347 {} | |
348 | |
349 //----- (0049B027) -------------------------------------------------------- | |
350 inline ~stru154() | |
351 {} | |
352 | |
734 | 353 void GetFacePlaneAndClassify(struct ODMFace *a2, struct BSPVertexBuffer *a3); |
354 void ClassifyPolygon(struct Vec3_float_ *pNormal, float dist); | |
355 void GetFacePlane(struct ODMFace *pFace, struct BSPVertexBuffer *pVertices, struct Vec3_float_ *pOutNormal, float *pOutDist); | |
0 | 356 |
357 | |
1458 | 358 void ( ***vdestructor_ptr)(stru154 *, bool); |
0 | 359 Plane_float_ face_plane; |
360 PolygonType polygonType; | |
361 char field_15; | |
362 char field_16; | |
363 char field_17; | |
364 }; | |
365 #pragma pack(pop) | |
366 | |
367 | |
368 | |
369 | |
370 | |
371 /* 392 */ | |
372 #pragma pack(push, 1) | |
373 struct stru352 | |
374 { | |
375 int field_0; | |
376 int field_4; | |
377 int field_8; | |
378 int field_C; | |
379 int field_10; | |
380 int field_14; | |
381 int field_18; | |
382 int field_1C; | |
383 int field_20; | |
384 int field_24; | |
385 int field_28; | |
386 int field_2C; | |
387 int field_30; | |
388 int field_34; | |
389 }; | |
390 #pragma pack(pop) | |
1202 | 391 extern std::array<stru352, 480> stru_F83B80; |