0
|
1 #pragma once
|
|
2 #include "VectorTypes.h"
|
|
3 #include "IndoorCameraD3D.h"
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8 /* 319 */
|
|
9 enum LEVEL_TYPE
|
|
10 {
|
3
|
11 LEVEL_null = 0,
|
0
|
12 LEVEL_Indoor = 0x1,
|
|
13 LEVEL_Outdoor = 0x2,
|
|
14 };
|
|
15 extern LEVEL_TYPE uCurrentlyLoadedLevelType;
|
|
16
|
|
17
|
|
18
|
|
19
|
|
20
|
|
21 /* 74 */
|
|
22 #pragma pack(push, 1)
|
|
23 struct LevelDecoration
|
|
24 {
|
|
25 LevelDecoration();
|
|
26 int GetGlobalEvent();
|
|
27 int IsInteractive();
|
|
28 bool _47A825();
|
|
29
|
|
30
|
|
31 unsigned __int16 uDecorationDescID;
|
|
32 __int16 field_2;
|
|
33 struct Vec3_int_ vPosition;
|
|
34 int field_10_y_rot;
|
|
35 __int16 uCog;
|
|
36 __int16 field_16_event_id;
|
|
37 __int16 field_18;
|
|
38 __int16 field_1A;
|
|
39 __int16 field_1C;
|
|
40 __int16 field_1E;
|
|
41 };
|
|
42 #pragma pack(pop)
|
|
43 extern LevelDecoration pLevelDecorations[3000];
|
|
44 extern size_t uNumLevelDecorations;
|
|
45 extern LevelDecoration *_5C3420_pDecoration;
|
|
46
|
|
47
|
|
48
|
|
49
|
|
50
|
|
51
|
|
52
|
|
53
|
|
54 /* 86 */
|
|
55 #pragma pack(push, 1)
|
|
56 struct SpawnPointMM6
|
|
57 {
|
|
58 Vec3_int_ vPosition;
|
|
59 unsigned __int16 uRadius;
|
|
60 unsigned __int16 uKind;
|
|
61 unsigned __int16 uIndex;
|
|
62 unsigned __int16 uAttributes;
|
|
63 };
|
|
64 #pragma pack(pop)
|
|
65
|
|
66
|
|
67
|
|
68 /* 102 */
|
|
69 #pragma pack(push, 1)
|
|
70 struct SpawnPointMM7
|
|
71 {
|
|
72 //----- (00448DD6) --------------------------------------------------------
|
|
73 SpawnPointMM7()
|
|
74 {
|
|
75 uRadius = 32;
|
|
76 uAttributes = 0;
|
|
77 uIndex = 0;
|
|
78 uKind = 0;
|
|
79 uGroup = 0;
|
|
80 }
|
|
81
|
|
82
|
|
83 Vec3_int_ vPosition;
|
|
84 unsigned __int16 uRadius;
|
|
85 unsigned __int16 uKind;
|
|
86 unsigned __int16 uIndex;
|
|
87 unsigned __int16 uAttributes;
|
|
88 unsigned int uGroup;
|
|
89 };
|
|
90 #pragma pack(pop)
|
|
91
|
|
92
|
|
93
|
|
94
|
|
95
|
|
96
|
|
97
|
|
98
|
|
99
|
|
100
|
|
101 #pragma pack(push, 1)
|
|
102 struct DDM_DLV_Header
|
|
103 {
|
|
104 //----- (00462607) --------------------------------------------------------
|
|
105 inline DDM_DLV_Header()
|
|
106 {
|
|
107 this->uLastRepawnDay = 0;
|
|
108 this->uNumRespawns = 0;
|
|
109 this->uReputation = 0;
|
|
110 this->field_C_alert = 0;
|
|
111 this->uNumFacesInBModels = 0;
|
|
112 this->uNumDecorations = 0;
|
|
113 this->uNumBModels = 0;
|
|
114 }
|
|
115
|
|
116
|
|
117 int uNumRespawns;
|
|
118 int uLastRepawnDay;
|
|
119 int uReputation;
|
|
120 int field_C_alert;
|
|
121 unsigned int uNumFacesInBModels;
|
|
122 unsigned int uNumDecorations;
|
|
123 unsigned int uNumBModels;
|
|
124 int field_1C;
|
|
125 int field_20;
|
|
126 int field_24;
|
|
127 };
|
|
128 #pragma pack(pop)
|
|
129
|
|
130
|
|
131
|
|
132 /* 291 */
|
|
133 enum PolygonType : __int8
|
|
134 {
|
|
135 POLYGON_Invalid = 0x0,
|
|
136 POLYGON_VerticalWall = 0x1,
|
|
137 POLYGON_unk = 0x2,
|
|
138 POLYGON_Floor = 0x3,
|
|
139 POLYGON_InBetweenFloorAndWall = 0x4,
|
|
140 POLYGON_Ceiling = 0x5,
|
|
141 POLYGON_InBetweenCeilingAndWall = 0x6,
|
|
142 };
|
|
143
|
|
144 /* 90 */
|
|
145 #pragma pack(push, 1)
|
|
146 struct BLVHeader
|
|
147 {
|
|
148 char field_0[104];
|
|
149 unsigned int uFaces_fdata_Size;
|
|
150 unsigned int uSector_rdata_Size;
|
|
151 unsigned int uSector_lrdata_Size;
|
|
152 unsigned int uDoors_ddata_Size;
|
|
153 char field_78[16];
|
|
154 };
|
|
155 #pragma pack(pop)
|
|
156
|
|
157
|
|
158
|
|
159 /* 96 */
|
|
160 #pragma pack(push, 1)
|
|
161 struct BLVSectorMM8
|
|
162 {
|
|
163 int dword_000074;
|
|
164 };
|
|
165 #pragma pack(pop)
|
|
166
|
|
167 /* 97 */
|
|
168 #pragma pack(push, 1)
|
|
169 struct BLVLightMM6
|
|
170 {
|
|
171 Vec3_short_ vPosition;
|
|
172 __int16 uRadius;
|
|
173 __int16 uAttributes;
|
|
174 unsigned __int16 uBrightness;
|
|
175 };
|
|
176 #pragma pack(pop)
|
|
177
|
|
178 /* 98 */
|
|
179 #pragma pack(push, 1)
|
|
180 struct BLVLightMM7
|
|
181 {
|
|
182 struct Vec3_short_ vPosition;
|
|
183 __int16 uRadius;
|
|
184 char uRed;
|
|
185 char uGreen;
|
|
186 char uBlue;
|
|
187 char uType;
|
|
188 __int16 uAtributes;
|
|
189 __int16 uBrightness;
|
|
190 };
|
|
191 #pragma pack(pop)
|
|
192
|
|
193 /* 99 */
|
|
194 #pragma pack(push, 1)
|
|
195 struct BLVLightMM8
|
|
196 {
|
|
197 int uID;
|
|
198 };
|
|
199 #pragma pack(pop)
|
|
200
|
|
201 /* 100 */
|
|
202 #pragma pack(push, 1)
|
|
203 struct BLVDoor
|
|
204 {
|
|
205 unsigned int uAttributes;
|
|
206 unsigned int uDoorID;
|
|
207 unsigned int uTimeSinceTriggered;
|
|
208 Vec3_int_ vDirection;
|
|
209 int uMoveLength;
|
|
210 int uOpenSpeed;
|
|
211 int uCloseSpeed;
|
|
212 unsigned __int16 *pVertexIDs;
|
|
213 unsigned __int16 *pFaceIDs;
|
|
214 unsigned __int16 *pSectorIDs;
|
|
215 __int16 *pDeltaUs;
|
|
216 __int16 *pDeltaVs;
|
|
217 unsigned __int16 *pXOffsets;
|
|
218 unsigned __int16 *pYOffsets;
|
|
219 unsigned __int16 *pZOffsets;
|
|
220 unsigned __int16 uNumVertices;
|
|
221 unsigned __int16 uNumFaces;
|
|
222 __int16 field_48;
|
|
223 unsigned __int16 uNumOffsets;
|
|
224 unsigned __int16 uState;
|
|
225 __int16 field_4E;
|
|
226 };
|
|
227 #pragma pack(pop)
|
|
228
|
|
229 /* 101 */
|
|
230 #pragma pack(push, 1)
|
|
231 struct BLVMapVertex
|
|
232 {
|
|
233 unsigned __int16 uVertex1ID;
|
|
234 unsigned __int16 uVertex2ID;
|
|
235 unsigned __int16 uFace1ID;
|
|
236 unsigned __int16 uFace2ID;
|
|
237 __int16 sZ;
|
|
238 unsigned __int16 uFlags;
|
|
239 };
|
|
240 #pragma pack(pop)
|
|
241
|
|
242
|
|
243
|
|
244 /* 93 */
|
|
245 #pragma pack(push, 1)
|
|
246 struct BLVFace
|
|
247 {
|
|
248 //----- (0046ED02) --------------------------------------------------------
|
|
249 inline BLVFace()
|
|
250 {
|
|
251 this->uNumVertices = 0;
|
|
252 this->uAttributes = 0;
|
|
253 this->uFaceExtraID = 0;
|
|
254 this->pVertexIDs = 0;
|
|
255 this->pZInterceptDisplacements = 0;
|
|
256 this->pYInterceptDisplacements = 0;
|
|
257 this->pXInterceptDisplacements = 0;
|
|
258 }
|
|
259
|
|
260 char _get_normals(Vec3_int_ *a2, Vec3_int_ *a3);
|
|
261 struct Texture *GetTexture();
|
|
262 void FromODM(struct ODMFace *a2);
|
|
263
|
|
264
|
|
265 struct Plane_float_ pFacePlane;
|
|
266 struct Plane_int_ pFacePlane_old;
|
|
267 int zCalc1;
|
|
268 int zCalc2;
|
|
269 int zCalc3;
|
|
270 unsigned int uAttributes;
|
|
271 unsigned __int16 *pVertexIDs;
|
|
272 unsigned __int16 *pXInterceptDisplacements;
|
|
273 unsigned __int16 *pYInterceptDisplacements;
|
|
274 unsigned __int16 *pZInterceptDisplacements;
|
|
275 unsigned __int16 *pVertexUIDs;
|
|
276 unsigned __int16 *pVertexVIDs;
|
|
277 unsigned __int16 uFaceExtraID;
|
|
278 unsigned __int16 uBitmapID;
|
|
279 unsigned __int16 uSectorID;
|
|
280 __int16 uBackSectorID;
|
|
281 struct BBox_short_ pBounding;
|
|
282 PolygonType uPolygonType;
|
|
283 unsigned __int8 uNumVertices;
|
|
284 char field_5E;
|
|
285 char field_5F;
|
|
286 };
|
|
287 #pragma pack(pop)
|
|
288
|
|
289 /* 94 */
|
|
290 #pragma pack(push, 1)
|
|
291 struct BLVFaceExtra
|
|
292 {
|
|
293 int HasEventint();
|
|
294
|
|
295 __int16 field_0;
|
|
296 __int16 field_2;
|
|
297 __int16 field_4;
|
|
298 __int16 field_6;
|
|
299 __int16 field_8;
|
|
300 __int16 field_A;
|
|
301 __int16 field_C;
|
|
302 unsigned __int16 uAdditionalBitmapID;
|
|
303 __int16 field_10;
|
|
304 __int16 field_12;
|
|
305 __int16 sTextureDeltaU;
|
|
306 __int16 sTextureDeltaV;
|
|
307 __int16 sCogNumber;
|
|
308 unsigned __int16 uEventID;
|
|
309 __int16 field_1C;
|
|
310 __int16 field_1E;
|
|
311 __int16 field_20;
|
|
312 __int16 field_22;
|
|
313 };
|
|
314 #pragma pack(pop)
|
|
315
|
|
316 /* 95 */
|
|
317 #pragma pack(push, 1)
|
|
318 struct BLVSector
|
|
319 {
|
|
320 int field_0;
|
|
321 __int16 field_4;
|
|
322 __int16 field_6;
|
|
323 unsigned __int16 *pFloors;
|
|
324 __int16 field_C;
|
|
325 __int16 field_E;
|
|
326 unsigned __int16 *pWalls;
|
|
327 __int16 field_14;
|
|
328 __int16 field_16;
|
|
329 unsigned __int16 *pCeilings;
|
|
330 __int16 field_1C;
|
|
331 __int16 field_1E;
|
|
332 unsigned __int16 *pFluids;
|
|
333 __int16 uNumPortals;
|
|
334 __int16 field_26;
|
|
335 unsigned __int16 *pPortals;
|
|
336 __int16 field_2C;
|
|
337 __int16 uNumNonBSPFaces;
|
|
338 unsigned __int16 *pFaceIDs;
|
|
339 __int16 uNumCylinderFaces;
|
|
340 __int16 field_36;
|
|
341 int pCylinderFaces;
|
|
342 __int16 field_3C;
|
|
343 __int16 field_3E;
|
|
344 unsigned __int16 *pCogs;
|
|
345 unsigned __int16 uNumDecorations;
|
|
346 __int16 field_46;
|
|
347 unsigned __int16 *pDecorationIDs;
|
|
348 __int16 field_4C;
|
|
349 __int16 field_4E;
|
|
350 unsigned __int16 *pMarkers;
|
|
351 __int16 uNumLights;
|
|
352 __int16 field_56;
|
|
353 BLVLightMM7 *pLights;
|
|
354 __int16 uWaterLevel;
|
|
355 __int16 uMistLevel;
|
|
356 __int16 uLightDistanceMultiplier;
|
|
357 __int16 uMinAmbientLightLevel;
|
|
358 __int16 uFirstBSPNode;
|
|
359 __int16 exit_tag;
|
|
360 BBox_short_ pBounding;
|
|
361 };
|
|
362 #pragma pack(pop)
|
|
363
|
|
364
|
28
|
365 #pragma pack(push, 1)
|
|
366 struct BLVMapVertices
|
|
367 {
|
|
368 uint uNumVertices;
|
|
369 BLVMapVertex pVertices[1];
|
|
370 };
|
|
371 #pragma pack(pop)
|
0
|
372
|
|
373
|
|
374
|
28
|
375 #pragma pack(push, 1)
|
|
376 struct IndoorLocation_stru1
|
|
377 {
|
|
378 unsigned __int64 uLastVisitDay;
|
|
379 char field_2F4[48];
|
|
380 };
|
|
381 #pragma pack(pop)
|
|
382
|
0
|
383
|
|
384
|
|
385 /* 89 */
|
|
386 #pragma pack(push, 1)
|
|
387 struct IndoorLocation
|
|
388 {
|
|
389 //----- (00462592) --------------------------------------------------------
|
|
390 inline IndoorLocation()
|
|
391 {
|
|
392 bLoaded = 0;
|
|
393 ptr_0002B8_sector_lrdata = 0;
|
|
394 ptr_0002B4_doors_ddata = 0;
|
|
395 ptr_0002B0_sector_rdata = 0;
|
|
396 ptr_2AC = 0;
|
|
397 pVertices = 0;
|
|
398 pFaces = 0;
|
|
399 pFaceExtras = 0;
|
|
400 pSectors = 0;
|
|
401 pLights = 0;
|
|
402 pDoors = 0;
|
|
403 pNodes = 0;
|
|
404 pMapVertices = 0;
|
|
405 uNumSpawnPoints = 0;
|
|
406 pSpawnPoints = 0;
|
|
407 }
|
|
408
|
|
409 int GetSector(int sX, int sY, int sZ);
|
|
410 void Release();
|
|
411 int Alloc();
|
|
412 bool Load(char *pFilename, int a3, size_t i, char *pDest);
|
|
413 void Draw();
|
|
414 void ToggleLight(unsigned int uLightID, unsigned int bToggle);
|
|
415
|
|
416 static unsigned int GetLocationIndex(const char *Str1);
|
|
417 static void ExecDraw(char a1);
|
|
418 static void ExecDraw_sub1(unsigned int uFaceID);
|
|
419 static void ExecDraw_sub0(unsigned int uFaceID, struct IndoorCameraD3D_Vec4 *pVertices, unsigned int uNumVertices, struct RenderVertexSoft *a4);
|
|
420
|
|
421 char pFilename[32];
|
|
422 char field_20[48];
|
|
423 unsigned int bLoaded;
|
|
424 char field_54[404];
|
|
425 struct BLVHeader blv;
|
|
426 unsigned int uNumVertices;
|
|
427 struct Vec3_short_ *pVertices;
|
|
428 unsigned int uNumFaces;
|
|
429 struct BLVFace *pFaces;
|
|
430 unsigned int uNumFaceExtras;
|
|
431 struct BLVFaceExtra *pFaceExtras;
|
|
432 int uNumSectors;
|
|
433 struct BLVSector *pSectors;
|
|
434 int uNumLights;
|
|
435 struct BLVLightMM7 *pLights;
|
|
436 int uNumDoors;
|
|
437 struct BLVDoor *pDoors;
|
|
438 unsigned int uNumNodes;
|
|
439 struct BSPNode *pNodes;
|
28
|
440 BLVMapVertices *pMapVertices;
|
0
|
441 unsigned __int16 *ptr_2AC;
|
|
442 unsigned __int16 *ptr_0002B0_sector_rdata;
|
|
443 unsigned __int16 *ptr_0002B4_doors_ddata;
|
|
444 unsigned __int16 *ptr_0002B8_sector_lrdata;
|
|
445 unsigned int uNumSpawnPoints;
|
|
446 struct SpawnPointMM7 *pSpawnPoints;
|
|
447 struct DDM_DLV_Header dlv;
|
28
|
448 IndoorLocation_stru1 stru1;
|
0
|
449 char _visible_outlines[876];
|
|
450 };
|
|
451 #pragma pack(pop)
|
|
452
|
|
453 extern IndoorLocation *pIndoor;
|
|
454
|
|
455
|
|
456
|
|
457
|
|
458
|
|
459
|
|
460
|
|
461
|
|
462
|
|
463
|
|
464
|
|
465
|
|
466 /* 263 */
|
|
467 #pragma pack(push, 1)
|
|
468 struct IndoorLocation_drawstru
|
|
469 {
|
|
470 int field_0_timer;
|
|
471 int uFlags;
|
|
472 Vec3_int_ vPosition;
|
|
473 int sRotationY;
|
|
474 int sRotationX;
|
|
475 int field_1C_mb_fov;
|
|
476 unsigned __int16 *pRenderTarget;
|
|
477 unsigned int uTargetWidth;
|
|
478 unsigned int uTargetHeight;
|
|
479 unsigned int uViewportX;
|
|
480 unsigned int uViewportY;
|
|
481 unsigned int uViewportZ;
|
|
482 unsigned int uViewportW;
|
|
483 int field_3C;
|
|
484 int *pTargetZ;
|
|
485 };
|
|
486 #pragma pack(pop)
|
|
487
|
|
488
|
|
489
|
|
490
|
|
491
|
|
492
|
|
493
|
|
494
|
|
495
|
|
496
|
|
497
|
|
498
|
|
499 /* 162 */
|
|
500 #pragma pack(push, 1)
|
|
501 struct BLVRenderParams
|
|
502 {
|
|
503 int Set(struct IndoorLocation_drawstru *a2);
|
|
504
|
|
505 int field_0_timer_;
|
|
506 int uFlags;
|
|
507 Vec3_int_ vPartyPos;
|
|
508 int sPartyRotY;
|
|
509 int sPartyRotX;
|
|
510 int uRadius;
|
|
511 int sCosineY;
|
|
512 int sSineY;
|
|
513 int sCosineNegX;
|
|
514 int sSineNegX;
|
|
515 float fCosineY;
|
|
516 float fSineY;
|
|
517 float fCosineNegX;
|
|
518 float fSineNegX;
|
|
519 int field_40;
|
|
520 float field_44;
|
|
521 unsigned __int16 *pRenderTarget;
|
|
522 unsigned int uTargetWidth;
|
|
523 unsigned int uTargetHeight;
|
|
524 unsigned int uViewportX;
|
|
525 unsigned int uViewportY;
|
|
526 unsigned int uViewportZ;
|
|
527 unsigned int uViewportW;
|
|
528 int field_64;
|
|
529 int *pTargetZBuffer;
|
|
530 int uViewportHeight;
|
|
531 int field_70;
|
|
532 int uViewportCenterX;
|
|
533 int uViewportCenterY;
|
|
534 struct stru170_stru2 *field_7C;
|
|
535 int field_80;
|
|
536 int field_84;
|
|
537 int field_88;
|
|
538 int field_8C;
|
|
539 int field_90;
|
|
540 int field_94;
|
|
541 };
|
|
542 #pragma pack(pop)
|
|
543
|
|
544 extern struct BLVRenderParams *pBLVRenderParams;
|
|
545
|
|
546
|
|
547
|
|
548
|
|
549
|
|
550 #include "Indoor_stuff.h" |