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