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
|
|
365
|
|
366
|
|
367
|
|
368
|
|
369
|
|
370 /* 89 */
|
|
371 #pragma pack(push, 1)
|
|
372 struct IndoorLocation
|
|
373 {
|
|
374 //----- (00462592) --------------------------------------------------------
|
|
375 inline IndoorLocation()
|
|
376 {
|
|
377 bLoaded = 0;
|
|
378 ptr_0002B8_sector_lrdata = 0;
|
|
379 ptr_0002B4_doors_ddata = 0;
|
|
380 ptr_0002B0_sector_rdata = 0;
|
|
381 ptr_2AC = 0;
|
|
382 pVertices = 0;
|
|
383 pFaces = 0;
|
|
384 pFaceExtras = 0;
|
|
385 pSectors = 0;
|
|
386 pLights = 0;
|
|
387 pDoors = 0;
|
|
388 pNodes = 0;
|
|
389 pMapVertices = 0;
|
|
390 uNumSpawnPoints = 0;
|
|
391 pSpawnPoints = 0;
|
|
392 }
|
|
393
|
|
394 int GetSector(int sX, int sY, int sZ);
|
|
395 void Release();
|
|
396 int Alloc();
|
|
397 bool Load(char *pFilename, int a3, size_t i, char *pDest);
|
|
398 void Draw();
|
|
399 void ToggleLight(unsigned int uLightID, unsigned int bToggle);
|
|
400
|
|
401 static unsigned int GetLocationIndex(const char *Str1);
|
|
402 static void ExecDraw(char a1);
|
|
403 static void ExecDraw_sub1(unsigned int uFaceID);
|
|
404 static void ExecDraw_sub0(unsigned int uFaceID, struct IndoorCameraD3D_Vec4 *pVertices, unsigned int uNumVertices, struct RenderVertexSoft *a4);
|
|
405
|
|
406 char pFilename[32];
|
|
407 char field_20[48];
|
|
408 unsigned int bLoaded;
|
|
409 char field_54[404];
|
|
410 struct BLVHeader blv;
|
|
411 unsigned int uNumVertices;
|
|
412 struct Vec3_short_ *pVertices;
|
|
413 unsigned int uNumFaces;
|
|
414 struct BLVFace *pFaces;
|
|
415 unsigned int uNumFaceExtras;
|
|
416 struct BLVFaceExtra *pFaceExtras;
|
|
417 int uNumSectors;
|
|
418 struct BLVSector *pSectors;
|
|
419 int uNumLights;
|
|
420 struct BLVLightMM7 *pLights;
|
|
421 int uNumDoors;
|
|
422 struct BLVDoor *pDoors;
|
|
423 unsigned int uNumNodes;
|
|
424 struct BSPNode *pNodes;
|
|
425 unsigned int *pMapVertices;
|
|
426 unsigned __int16 *ptr_2AC;
|
|
427 unsigned __int16 *ptr_0002B0_sector_rdata;
|
|
428 unsigned __int16 *ptr_0002B4_doors_ddata;
|
|
429 unsigned __int16 *ptr_0002B8_sector_lrdata;
|
|
430 unsigned int uNumSpawnPoints;
|
|
431 struct SpawnPointMM7 *pSpawnPoints;
|
|
432 struct DDM_DLV_Header dlv;
|
|
433 unsigned __int64 uLastVisitDay;
|
|
434 char field_2F4[48];
|
|
435 char _visible_outlines[876];
|
|
436 };
|
|
437 #pragma pack(pop)
|
|
438
|
|
439 extern IndoorLocation *pIndoor;
|
|
440
|
|
441
|
|
442
|
|
443
|
|
444
|
|
445
|
|
446
|
|
447
|
|
448
|
|
449
|
|
450
|
|
451
|
|
452 /* 263 */
|
|
453 #pragma pack(push, 1)
|
|
454 struct IndoorLocation_drawstru
|
|
455 {
|
|
456 int field_0_timer;
|
|
457 int uFlags;
|
|
458 Vec3_int_ vPosition;
|
|
459 int sRotationY;
|
|
460 int sRotationX;
|
|
461 int field_1C_mb_fov;
|
|
462 unsigned __int16 *pRenderTarget;
|
|
463 unsigned int uTargetWidth;
|
|
464 unsigned int uTargetHeight;
|
|
465 unsigned int uViewportX;
|
|
466 unsigned int uViewportY;
|
|
467 unsigned int uViewportZ;
|
|
468 unsigned int uViewportW;
|
|
469 int field_3C;
|
|
470 int *pTargetZ;
|
|
471 };
|
|
472 #pragma pack(pop)
|
|
473
|
|
474
|
|
475
|
|
476
|
|
477
|
|
478
|
|
479
|
|
480
|
|
481
|
|
482
|
|
483
|
|
484
|
|
485 /* 162 */
|
|
486 #pragma pack(push, 1)
|
|
487 struct BLVRenderParams
|
|
488 {
|
|
489 int Set(struct IndoorLocation_drawstru *a2);
|
|
490
|
|
491 int field_0_timer_;
|
|
492 int uFlags;
|
|
493 Vec3_int_ vPartyPos;
|
|
494 int sPartyRotY;
|
|
495 int sPartyRotX;
|
|
496 int uRadius;
|
|
497 int sCosineY;
|
|
498 int sSineY;
|
|
499 int sCosineNegX;
|
|
500 int sSineNegX;
|
|
501 float fCosineY;
|
|
502 float fSineY;
|
|
503 float fCosineNegX;
|
|
504 float fSineNegX;
|
|
505 int field_40;
|
|
506 float field_44;
|
|
507 unsigned __int16 *pRenderTarget;
|
|
508 unsigned int uTargetWidth;
|
|
509 unsigned int uTargetHeight;
|
|
510 unsigned int uViewportX;
|
|
511 unsigned int uViewportY;
|
|
512 unsigned int uViewportZ;
|
|
513 unsigned int uViewportW;
|
|
514 int field_64;
|
|
515 int *pTargetZBuffer;
|
|
516 int uViewportHeight;
|
|
517 int field_70;
|
|
518 int uViewportCenterX;
|
|
519 int uViewportCenterY;
|
|
520 struct stru170_stru2 *field_7C;
|
|
521 int field_80;
|
|
522 int field_84;
|
|
523 int field_88;
|
|
524 int field_8C;
|
|
525 int field_90;
|
|
526 int field_94;
|
|
527 };
|
|
528 #pragma pack(pop)
|
|
529
|
|
530 extern struct BLVRenderParams *pBLVRenderParams;
|
|
531
|
|
532
|
|
533
|
|
534
|
|
535
|
|
536 #include "Indoor_stuff.h" |