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
|
29
|
201
|
|
202
|
0
|
203 /* 100 */
|
|
204 #pragma pack(push, 1)
|
|
205 struct BLVDoor
|
|
206 {
|
29
|
207 enum State: unsigned __int16
|
|
208 {
|
|
209 Closed = 0,
|
|
210 Opening = 1,
|
|
211 Open = 2,
|
|
212 Closing = 3
|
|
213 };
|
|
214
|
0
|
215 unsigned int uAttributes;
|
|
216 unsigned int uDoorID;
|
|
217 unsigned int uTimeSinceTriggered;
|
|
218 Vec3_int_ vDirection;
|
|
219 int uMoveLength;
|
|
220 int uOpenSpeed;
|
|
221 int uCloseSpeed;
|
|
222 unsigned __int16 *pVertexIDs;
|
|
223 unsigned __int16 *pFaceIDs;
|
|
224 unsigned __int16 *pSectorIDs;
|
|
225 __int16 *pDeltaUs;
|
|
226 __int16 *pDeltaVs;
|
|
227 unsigned __int16 *pXOffsets;
|
|
228 unsigned __int16 *pYOffsets;
|
|
229 unsigned __int16 *pZOffsets;
|
|
230 unsigned __int16 uNumVertices;
|
|
231 unsigned __int16 uNumFaces;
|
|
232 __int16 field_48;
|
|
233 unsigned __int16 uNumOffsets;
|
29
|
234 State uState;
|
0
|
235 __int16 field_4E;
|
|
236 };
|
|
237 #pragma pack(pop)
|
|
238
|
|
239 /* 101 */
|
|
240 #pragma pack(push, 1)
|
53
|
241 struct BLVMapOutline
|
0
|
242 {
|
|
243 unsigned __int16 uVertex1ID;
|
|
244 unsigned __int16 uVertex2ID;
|
|
245 unsigned __int16 uFace1ID;
|
|
246 unsigned __int16 uFace2ID;
|
|
247 __int16 sZ;
|
|
248 unsigned __int16 uFlags;
|
|
249 };
|
|
250 #pragma pack(pop)
|
|
251
|
|
252
|
|
253
|
|
254 /* 93 */
|
|
255 #pragma pack(push, 1)
|
|
256 struct BLVFace
|
|
257 {
|
|
258 //----- (0046ED02) --------------------------------------------------------
|
|
259 inline BLVFace()
|
|
260 {
|
|
261 this->uNumVertices = 0;
|
|
262 this->uAttributes = 0;
|
|
263 this->uFaceExtraID = 0;
|
|
264 this->pVertexIDs = 0;
|
|
265 this->pZInterceptDisplacements = 0;
|
|
266 this->pYInterceptDisplacements = 0;
|
|
267 this->pXInterceptDisplacements = 0;
|
|
268 }
|
|
269
|
|
270 char _get_normals(Vec3_int_ *a2, Vec3_int_ *a3);
|
|
271 struct Texture *GetTexture();
|
|
272 void FromODM(struct ODMFace *a2);
|
|
273
|
|
274
|
|
275 struct Plane_float_ pFacePlane;
|
|
276 struct Plane_int_ pFacePlane_old;
|
|
277 int zCalc1;
|
|
278 int zCalc2;
|
|
279 int zCalc3;
|
|
280 unsigned int uAttributes;
|
|
281 unsigned __int16 *pVertexIDs;
|
|
282 unsigned __int16 *pXInterceptDisplacements;
|
|
283 unsigned __int16 *pYInterceptDisplacements;
|
|
284 unsigned __int16 *pZInterceptDisplacements;
|
|
285 unsigned __int16 *pVertexUIDs;
|
|
286 unsigned __int16 *pVertexVIDs;
|
|
287 unsigned __int16 uFaceExtraID;
|
|
288 unsigned __int16 uBitmapID;
|
|
289 unsigned __int16 uSectorID;
|
|
290 __int16 uBackSectorID;
|
|
291 struct BBox_short_ pBounding;
|
|
292 PolygonType uPolygonType;
|
|
293 unsigned __int8 uNumVertices;
|
|
294 char field_5E;
|
|
295 char field_5F;
|
|
296 };
|
|
297 #pragma pack(pop)
|
|
298
|
|
299 /* 94 */
|
|
300 #pragma pack(push, 1)
|
|
301 struct BLVFaceExtra
|
|
302 {
|
|
303 int HasEventint();
|
|
304
|
|
305 __int16 field_0;
|
|
306 __int16 field_2;
|
|
307 __int16 field_4;
|
|
308 __int16 field_6;
|
|
309 __int16 field_8;
|
|
310 __int16 field_A;
|
|
311 __int16 field_C;
|
|
312 unsigned __int16 uAdditionalBitmapID;
|
|
313 __int16 field_10;
|
|
314 __int16 field_12;
|
|
315 __int16 sTextureDeltaU;
|
|
316 __int16 sTextureDeltaV;
|
|
317 __int16 sCogNumber;
|
|
318 unsigned __int16 uEventID;
|
|
319 __int16 field_1C;
|
|
320 __int16 field_1E;
|
|
321 __int16 field_20;
|
|
322 __int16 field_22;
|
|
323 };
|
|
324 #pragma pack(pop)
|
|
325
|
|
326 /* 95 */
|
|
327 #pragma pack(push, 1)
|
|
328 struct BLVSector
|
|
329 {
|
|
330 int field_0;
|
58
|
331 unsigned __int16 uNumFloors;
|
0
|
332 __int16 field_6;
|
|
333 unsigned __int16 *pFloors;
|
|
334 __int16 field_C;
|
|
335 __int16 field_E;
|
|
336 unsigned __int16 *pWalls;
|
|
337 __int16 field_14;
|
|
338 __int16 field_16;
|
|
339 unsigned __int16 *pCeilings;
|
|
340 __int16 field_1C;
|
|
341 __int16 field_1E;
|
|
342 unsigned __int16 *pFluids;
|
|
343 __int16 uNumPortals;
|
|
344 __int16 field_26;
|
|
345 unsigned __int16 *pPortals;
|
|
346 __int16 field_2C;
|
|
347 __int16 uNumNonBSPFaces;
|
|
348 unsigned __int16 *pFaceIDs;
|
|
349 __int16 uNumCylinderFaces;
|
|
350 __int16 field_36;
|
|
351 int pCylinderFaces;
|
|
352 __int16 field_3C;
|
|
353 __int16 field_3E;
|
|
354 unsigned __int16 *pCogs;
|
|
355 unsigned __int16 uNumDecorations;
|
|
356 __int16 field_46;
|
|
357 unsigned __int16 *pDecorationIDs;
|
|
358 __int16 field_4C;
|
|
359 __int16 field_4E;
|
|
360 unsigned __int16 *pMarkers;
|
|
361 __int16 uNumLights;
|
|
362 __int16 field_56;
|
|
363 BLVLightMM7 *pLights;
|
|
364 __int16 uWaterLevel;
|
|
365 __int16 uMistLevel;
|
|
366 __int16 uLightDistanceMultiplier;
|
|
367 __int16 uMinAmbientLightLevel;
|
|
368 __int16 uFirstBSPNode;
|
|
369 __int16 exit_tag;
|
|
370 BBox_short_ pBounding;
|
|
371 };
|
|
372 #pragma pack(pop)
|
|
373
|
|
374
|
28
|
375 #pragma pack(push, 1)
|
53
|
376 struct BLVMapOutlines
|
28
|
377 {
|
53
|
378 uint uNumOutlines;
|
|
379 BLVMapOutline pOutlines[1];
|
28
|
380 };
|
|
381 #pragma pack(pop)
|
0
|
382
|
|
383
|
|
384
|
28
|
385 #pragma pack(push, 1)
|
|
386 struct IndoorLocation_stru1
|
|
387 {
|
|
388 unsigned __int64 uLastVisitDay;
|
|
389 char field_2F4[48];
|
|
390 };
|
|
391 #pragma pack(pop)
|
|
392
|
0
|
393
|
|
394
|
|
395 /* 89 */
|
|
396 #pragma pack(push, 1)
|
|
397 struct IndoorLocation
|
|
398 {
|
|
399 //----- (00462592) --------------------------------------------------------
|
|
400 inline IndoorLocation()
|
|
401 {
|
|
402 bLoaded = 0;
|
|
403 ptr_0002B8_sector_lrdata = 0;
|
|
404 ptr_0002B4_doors_ddata = 0;
|
|
405 ptr_0002B0_sector_rdata = 0;
|
|
406 ptr_2AC = 0;
|
|
407 pVertices = 0;
|
|
408 pFaces = 0;
|
|
409 pFaceExtras = 0;
|
|
410 pSectors = 0;
|
|
411 pLights = 0;
|
|
412 pDoors = 0;
|
|
413 pNodes = 0;
|
53
|
414 pMapOutlines = 0;
|
0
|
415 uNumSpawnPoints = 0;
|
|
416 pSpawnPoints = 0;
|
|
417 }
|
|
418
|
|
419 int GetSector(int sX, int sY, int sZ);
|
|
420 void Release();
|
|
421 int Alloc();
|
|
422 bool Load(char *pFilename, int a3, size_t i, char *pDest);
|
|
423 void Draw();
|
|
424 void ToggleLight(unsigned int uLightID, unsigned int bToggle);
|
|
425
|
|
426 static unsigned int GetLocationIndex(const char *Str1);
|
50
|
427 static void ExecDraw(bool bD3D);
|
|
428 static void ExecDraw_sw(unsigned int uFaceID);
|
|
429 static void ExecDraw_d3d(unsigned int uFaceID, struct IndoorCameraD3D_Vec4 *pVertices, unsigned int uNumVertices, struct RenderVertexSoft *a4);
|
0
|
430
|
|
431 char pFilename[32];
|
|
432 char field_20[48];
|
|
433 unsigned int bLoaded;
|
|
434 char field_54[404];
|
|
435 struct BLVHeader blv;
|
|
436 unsigned int uNumVertices;
|
|
437 struct Vec3_short_ *pVertices;
|
|
438 unsigned int uNumFaces;
|
|
439 struct BLVFace *pFaces;
|
|
440 unsigned int uNumFaceExtras;
|
|
441 struct BLVFaceExtra *pFaceExtras;
|
|
442 int uNumSectors;
|
|
443 struct BLVSector *pSectors;
|
|
444 int uNumLights;
|
|
445 struct BLVLightMM7 *pLights;
|
|
446 int uNumDoors;
|
|
447 struct BLVDoor *pDoors;
|
|
448 unsigned int uNumNodes;
|
|
449 struct BSPNode *pNodes;
|
53
|
450 BLVMapOutlines *pMapOutlines;
|
0
|
451 unsigned __int16 *ptr_2AC;
|
|
452 unsigned __int16 *ptr_0002B0_sector_rdata;
|
|
453 unsigned __int16 *ptr_0002B4_doors_ddata;
|
|
454 unsigned __int16 *ptr_0002B8_sector_lrdata;
|
|
455 unsigned int uNumSpawnPoints;
|
|
456 struct SpawnPointMM7 *pSpawnPoints;
|
|
457 struct DDM_DLV_Header dlv;
|
28
|
458 IndoorLocation_stru1 stru1;
|
0
|
459 char _visible_outlines[876];
|
|
460 };
|
|
461 #pragma pack(pop)
|
|
462
|
|
463 extern IndoorLocation *pIndoor;
|
|
464
|
|
465
|
|
466
|
|
467
|
|
468
|
|
469
|
|
470
|
|
471
|
|
472
|
|
473
|
|
474
|
|
475
|
|
476 /* 263 */
|
|
477 #pragma pack(push, 1)
|
|
478 struct IndoorLocation_drawstru
|
|
479 {
|
|
480 int field_0_timer;
|
|
481 int uFlags;
|
|
482 Vec3_int_ vPosition;
|
|
483 int sRotationY;
|
|
484 int sRotationX;
|
|
485 int field_1C_mb_fov;
|
|
486 unsigned __int16 *pRenderTarget;
|
|
487 unsigned int uTargetWidth;
|
|
488 unsigned int uTargetHeight;
|
|
489 unsigned int uViewportX;
|
|
490 unsigned int uViewportY;
|
|
491 unsigned int uViewportZ;
|
|
492 unsigned int uViewportW;
|
|
493 int field_3C;
|
|
494 int *pTargetZ;
|
|
495 };
|
|
496 #pragma pack(pop)
|
|
497
|
|
498
|
|
499
|
|
500
|
|
501
|
|
502
|
|
503
|
|
504
|
|
505
|
|
506
|
|
507
|
|
508
|
|
509 /* 162 */
|
|
510 #pragma pack(push, 1)
|
|
511 struct BLVRenderParams
|
|
512 {
|
|
513 int Set(struct IndoorLocation_drawstru *a2);
|
|
514
|
|
515 int field_0_timer_;
|
|
516 int uFlags;
|
|
517 Vec3_int_ vPartyPos;
|
|
518 int sPartyRotY;
|
|
519 int sPartyRotX;
|
58
|
520 int uPartySectorID;
|
0
|
521 int sCosineY;
|
|
522 int sSineY;
|
|
523 int sCosineNegX;
|
|
524 int sSineNegX;
|
|
525 float fCosineY;
|
|
526 float fSineY;
|
|
527 float fCosineNegX;
|
|
528 float fSineNegX;
|
|
529 int field_40;
|
|
530 float field_44;
|
|
531 unsigned __int16 *pRenderTarget;
|
|
532 unsigned int uTargetWidth;
|
|
533 unsigned int uTargetHeight;
|
|
534 unsigned int uViewportX;
|
|
535 unsigned int uViewportY;
|
|
536 unsigned int uViewportZ;
|
|
537 unsigned int uViewportW;
|
|
538 int field_64;
|
|
539 int *pTargetZBuffer;
|
|
540 int uViewportHeight;
|
|
541 int field_70;
|
|
542 int uViewportCenterX;
|
|
543 int uViewportCenterY;
|
|
544 struct stru170_stru2 *field_7C;
|
|
545 int field_80;
|
|
546 int field_84;
|
|
547 int field_88;
|
|
548 int field_8C;
|
|
549 int field_90;
|
|
550 int field_94;
|
|
551 };
|
|
552 #pragma pack(pop)
|
|
553
|
|
554 extern struct BLVRenderParams *pBLVRenderParams;
|
|
555
|
|
556
|
|
557
|
|
558
|
|
559
|
|
560 #include "Indoor_stuff.h" |