annotate Indoor.h @ 114:9df890bf7e6f

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