annotate Indoor.h @ 2261:236d8d7c7295

Fixing a bug in tokenization
author Grumpy7
date Sat, 08 Mar 2014 16:04:44 +0100
parents 00bd098f6435
children 5d263539bbec
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
1512
af57b3b76fe4 Clean and decouple. (1)
yoctozepto
parents: 1480
diff changeset
2
1262
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1202
diff changeset
3 #include "Indoor_stuff.h"
0
Ritor1
parents:
diff changeset
4
Ritor1
parents:
diff changeset
5
1323
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
6 #pragma pack(push, 1)
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
7 struct LocationTime_stru1
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
8 {
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
9 unsigned __int64 uLastVisitDay;
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
10 char sky_texture_name[12];
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
11 int day_attrib;
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
12 int day_fogrange_1;
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
13 int day_fogrange_2;
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
14 char field_2F4[24];
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
15 };
bfde0563ecdc removed weather.h from indoor.h
Grumpy7
parents: 1262
diff changeset
16 #pragma pack(pop)
0
Ritor1
parents:
diff changeset
17
Ritor1
parents:
diff changeset
18 /* 319 */
Ritor1
parents:
diff changeset
19 enum LEVEL_TYPE
Ritor1
parents:
diff changeset
20 {
Ritor1
parents:
diff changeset
21 LEVEL_null = 0,
Ritor1
parents:
diff changeset
22 LEVEL_Indoor = 0x1,
Ritor1
parents:
diff changeset
23 LEVEL_Outdoor = 0x2,
Ritor1
parents:
diff changeset
24 };
Ritor1
parents:
diff changeset
25 extern LEVEL_TYPE uCurrentlyLoadedLevelType;
Ritor1
parents:
diff changeset
26
Ritor1
parents:
diff changeset
27
Ritor1
parents:
diff changeset
28
Ritor1
parents:
diff changeset
29
Ritor1
parents:
diff changeset
30
Ritor1
parents:
diff changeset
31
Ritor1
parents:
diff changeset
32
Ritor1
parents:
diff changeset
33
Ritor1
parents:
diff changeset
34
Ritor1
parents:
diff changeset
35
Ritor1
parents:
diff changeset
36
Ritor1
parents:
diff changeset
37
Ritor1
parents:
diff changeset
38
Ritor1
parents:
diff changeset
39 /* 86 */
Ritor1
parents:
diff changeset
40 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
41 struct SpawnPointMM6
Ritor1
parents:
diff changeset
42 {
Ritor1
parents:
diff changeset
43 Vec3_int_ vPosition;
Ritor1
parents:
diff changeset
44 unsigned __int16 uRadius;
Ritor1
parents:
diff changeset
45 unsigned __int16 uKind;
Ritor1
parents:
diff changeset
46 unsigned __int16 uIndex;
Ritor1
parents:
diff changeset
47 unsigned __int16 uAttributes;
Ritor1
parents:
diff changeset
48 };
Ritor1
parents:
diff changeset
49 #pragma pack(pop)
Ritor1
parents:
diff changeset
50
Ritor1
parents:
diff changeset
51
Ritor1
parents:
diff changeset
52
Ritor1
parents:
diff changeset
53 /* 102 */
Ritor1
parents:
diff changeset
54 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
55 struct SpawnPointMM7
Ritor1
parents:
diff changeset
56 {
Ritor1
parents:
diff changeset
57 //----- (00448DD6) --------------------------------------------------------
Ritor1
parents:
diff changeset
58 SpawnPointMM7()
Ritor1
parents:
diff changeset
59 {
Ritor1
parents:
diff changeset
60 uRadius = 32;
Ritor1
parents:
diff changeset
61 uAttributes = 0;
Ritor1
parents:
diff changeset
62 uIndex = 0;
Ritor1
parents:
diff changeset
63 uKind = 0;
Ritor1
parents:
diff changeset
64 uGroup = 0;
Ritor1
parents:
diff changeset
65 }
Ritor1
parents:
diff changeset
66
Ritor1
parents:
diff changeset
67
Ritor1
parents:
diff changeset
68 Vec3_int_ vPosition;
Ritor1
parents:
diff changeset
69 unsigned __int16 uRadius;
Ritor1
parents:
diff changeset
70 unsigned __int16 uKind;
Ritor1
parents:
diff changeset
71 unsigned __int16 uIndex;
Ritor1
parents:
diff changeset
72 unsigned __int16 uAttributes;
Ritor1
parents:
diff changeset
73 unsigned int uGroup;
Ritor1
parents:
diff changeset
74 };
Ritor1
parents:
diff changeset
75 #pragma pack(pop)
Ritor1
parents:
diff changeset
76
Ritor1
parents:
diff changeset
77
Ritor1
parents:
diff changeset
78
Ritor1
parents:
diff changeset
79
Ritor1
parents:
diff changeset
80
Ritor1
parents:
diff changeset
81
Ritor1
parents:
diff changeset
82
Ritor1
parents:
diff changeset
83
Ritor1
parents:
diff changeset
84
Ritor1
parents:
diff changeset
85
Ritor1
parents:
diff changeset
86 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
87 struct DDM_DLV_Header
Ritor1
parents:
diff changeset
88 {
Ritor1
parents:
diff changeset
89 //----- (00462607) --------------------------------------------------------
Ritor1
parents:
diff changeset
90 inline DDM_DLV_Header()
Ritor1
parents:
diff changeset
91 {
Ritor1
parents:
diff changeset
92 this->uLastRepawnDay = 0;
Ritor1
parents:
diff changeset
93 this->uNumRespawns = 0;
Ritor1
parents:
diff changeset
94 this->uReputation = 0;
Ritor1
parents:
diff changeset
95 this->field_C_alert = 0;
Ritor1
parents:
diff changeset
96 this->uNumFacesInBModels = 0;
Ritor1
parents:
diff changeset
97 this->uNumDecorations = 0;
Ritor1
parents:
diff changeset
98 this->uNumBModels = 0;
Ritor1
parents:
diff changeset
99 }
Ritor1
parents:
diff changeset
100
Ritor1
parents:
diff changeset
101
Ritor1
parents:
diff changeset
102 int uNumRespawns;
Ritor1
parents:
diff changeset
103 int uLastRepawnDay;
Ritor1
parents:
diff changeset
104 int uReputation;
Ritor1
parents:
diff changeset
105 int field_C_alert;
Ritor1
parents:
diff changeset
106 unsigned int uNumFacesInBModels;
Ritor1
parents:
diff changeset
107 unsigned int uNumDecorations;
Ritor1
parents:
diff changeset
108 unsigned int uNumBModels;
Ritor1
parents:
diff changeset
109 int field_1C;
Ritor1
parents:
diff changeset
110 int field_20;
Ritor1
parents:
diff changeset
111 int field_24;
Ritor1
parents:
diff changeset
112 };
Ritor1
parents:
diff changeset
113 #pragma pack(pop)
Ritor1
parents:
diff changeset
114
Ritor1
parents:
diff changeset
115
Ritor1
parents:
diff changeset
116
Ritor1
parents:
diff changeset
117
Ritor1
parents:
diff changeset
118 /* 90 */
Ritor1
parents:
diff changeset
119 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
120 struct BLVHeader
Ritor1
parents:
diff changeset
121 {
Ritor1
parents:
diff changeset
122 char field_0[104];
Ritor1
parents:
diff changeset
123 unsigned int uFaces_fdata_Size;
Ritor1
parents:
diff changeset
124 unsigned int uSector_rdata_Size;
Ritor1
parents:
diff changeset
125 unsigned int uSector_lrdata_Size;
Ritor1
parents:
diff changeset
126 unsigned int uDoors_ddata_Size;
Ritor1
parents:
diff changeset
127 char field_78[16];
Ritor1
parents:
diff changeset
128 };
Ritor1
parents:
diff changeset
129 #pragma pack(pop)
Ritor1
parents:
diff changeset
130
Ritor1
parents:
diff changeset
131
Ritor1
parents:
diff changeset
132
Ritor1
parents:
diff changeset
133 /* 96 */
Ritor1
parents:
diff changeset
134 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
135 struct BLVSectorMM8
Ritor1
parents:
diff changeset
136 {
Ritor1
parents:
diff changeset
137 int dword_000074;
Ritor1
parents:
diff changeset
138 };
Ritor1
parents:
diff changeset
139 #pragma pack(pop)
Ritor1
parents:
diff changeset
140
Ritor1
parents:
diff changeset
141 /* 97 */
Ritor1
parents:
diff changeset
142 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
143 struct BLVLightMM6
Ritor1
parents:
diff changeset
144 {
Ritor1
parents:
diff changeset
145 Vec3_short_ vPosition;
Ritor1
parents:
diff changeset
146 __int16 uRadius;
Ritor1
parents:
diff changeset
147 __int16 uAttributes;
Ritor1
parents:
diff changeset
148 unsigned __int16 uBrightness;
Ritor1
parents:
diff changeset
149 };
Ritor1
parents:
diff changeset
150 #pragma pack(pop)
Ritor1
parents:
diff changeset
151
Ritor1
parents:
diff changeset
152 /* 98 */
Ritor1
parents:
diff changeset
153 #pragma pack(push, 1)
711
a5e587c8e30e some cleaning
Gloval
parents: 676
diff changeset
154 struct BLVLightMM7 //10h
0
Ritor1
parents:
diff changeset
155 {
Ritor1
parents:
diff changeset
156 struct Vec3_short_ vPosition;
Ritor1
parents:
diff changeset
157 __int16 uRadius;
Ritor1
parents:
diff changeset
158 char uRed;
Ritor1
parents:
diff changeset
159 char uGreen;
Ritor1
parents:
diff changeset
160 char uBlue;
Ritor1
parents:
diff changeset
161 char uType;
Ritor1
parents:
diff changeset
162 __int16 uAtributes; // & 0x08 doesn't light faces
Ritor1
parents:
diff changeset
163 __int16 uBrightness;
Ritor1
parents:
diff changeset
164 };
Ritor1
parents:
diff changeset
165 #pragma pack(pop)
Ritor1
parents:
diff changeset
166
Ritor1
parents:
diff changeset
167 /* 99 */
Ritor1
parents:
diff changeset
168 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
169 struct BLVLightMM8
Ritor1
parents:
diff changeset
170 {
Ritor1
parents:
diff changeset
171 int uID;
Ritor1
parents:
diff changeset
172 };
Ritor1
parents:
diff changeset
173 #pragma pack(pop)
Ritor1
parents:
diff changeset
174
Ritor1
parents:
diff changeset
175
Ritor1
parents:
diff changeset
176
Ritor1
parents:
diff changeset
177 /* 100 */
Ritor1
parents:
diff changeset
178 #pragma pack(push, 1)
711
a5e587c8e30e some cleaning
Gloval
parents: 676
diff changeset
179 struct BLVDoor //50h
0
Ritor1
parents:
diff changeset
180 {
Ritor1
parents:
diff changeset
181 enum State: unsigned __int16
Ritor1
parents:
diff changeset
182 {
Ritor1
parents:
diff changeset
183 Closed = 0,
Ritor1
parents:
diff changeset
184 Opening = 1,
Ritor1
parents:
diff changeset
185 Open = 2,
Ritor1
parents:
diff changeset
186 Closing = 3
Ritor1
parents:
diff changeset
187 };
Ritor1
parents:
diff changeset
188
Ritor1
parents:
diff changeset
189 unsigned int uAttributes;
Ritor1
parents:
diff changeset
190 unsigned int uDoorID;
Ritor1
parents:
diff changeset
191 unsigned int uTimeSinceTriggered;
Ritor1
parents:
diff changeset
192 Vec3_int_ vDirection;
Ritor1
parents:
diff changeset
193 int uMoveLength;
Ritor1
parents:
diff changeset
194 int uOpenSpeed;
Ritor1
parents:
diff changeset
195 int uCloseSpeed;
Ritor1
parents:
diff changeset
196 unsigned __int16 *pVertexIDs;
Ritor1
parents:
diff changeset
197 unsigned __int16 *pFaceIDs;
Ritor1
parents:
diff changeset
198 unsigned __int16 *pSectorIDs;
Ritor1
parents:
diff changeset
199 __int16 *pDeltaUs;
Ritor1
parents:
diff changeset
200 __int16 *pDeltaVs;
Ritor1
parents:
diff changeset
201 unsigned __int16 *pXOffsets;
Ritor1
parents:
diff changeset
202 unsigned __int16 *pYOffsets;
Ritor1
parents:
diff changeset
203 unsigned __int16 *pZOffsets;
Ritor1
parents:
diff changeset
204 unsigned __int16 uNumVertices;
Ritor1
parents:
diff changeset
205 unsigned __int16 uNumFaces;
Ritor1
parents:
diff changeset
206 __int16 field_48;
Ritor1
parents:
diff changeset
207 unsigned __int16 uNumOffsets;
Ritor1
parents:
diff changeset
208 State uState;
Ritor1
parents:
diff changeset
209 __int16 field_4E;
Ritor1
parents:
diff changeset
210 };
Ritor1
parents:
diff changeset
211 #pragma pack(pop)
Ritor1
parents:
diff changeset
212
Ritor1
parents:
diff changeset
213 /* 101 */
Ritor1
parents:
diff changeset
214 #pragma pack(push, 1)
711
a5e587c8e30e some cleaning
Gloval
parents: 676
diff changeset
215 struct BLVMapOutline //0C
0
Ritor1
parents:
diff changeset
216 {
Ritor1
parents:
diff changeset
217 unsigned __int16 uVertex1ID;
Ritor1
parents:
diff changeset
218 unsigned __int16 uVertex2ID;
Ritor1
parents:
diff changeset
219 unsigned __int16 uFace1ID;
Ritor1
parents:
diff changeset
220 unsigned __int16 uFace2ID;
Ritor1
parents:
diff changeset
221 __int16 sZ;
Ritor1
parents:
diff changeset
222 unsigned __int16 uFlags;
Ritor1
parents:
diff changeset
223 };
Ritor1
parents:
diff changeset
224 #pragma pack(pop)
Ritor1
parents:
diff changeset
225
Ritor1
parents:
diff changeset
226
676
ecfb1b3c9a39 BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents: 638
diff changeset
227 #define FACE_PORTAL 0x00000001 // portal/two-sided
638
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 595
diff changeset
228 #define FACE_CAN_SATURATE_COLOR 0x00000002
2166
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2092
diff changeset
229 #define FACE_UNKNOW8 0x00000004
791
346f7069676a Indoor::GetSector and various stuff
Nomad
parents: 711
diff changeset
230 #define FACE_FLUID 0x00000010 // wavy animated water or lava
2166
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2092
diff changeset
231 #define FACE_UNKNOW9 0x00000020
1030
7735bdb3c30f Doors and other bmodel triggers are now clickable.
Nomad
parents: 1026
diff changeset
232 #define FACE_DONT_CACHE_TEXTURE 0x00000040 // do not load face texture if it isn't loaded already
2092
a869b0376b48 enums and BLV_UpdateDoors()
Ritor1
parents: 2086
diff changeset
233 #define FACE_UNKNOW4 0x00000080
795
472ca68386d4 more stru10 & stru9
Nomad
parents: 794
diff changeset
234 #define FACE_XY_PLANE 0x00000100
472ca68386d4 more stru10 & stru9
Nomad
parents: 794
diff changeset
235 #define FACE_XZ_PLANE 0x00000200
472ca68386d4 more stru10 & stru9
Nomad
parents: 794
diff changeset
236 #define FACE_YZ_PLANE 0x00000400
2166
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2092
diff changeset
237 #define FACE_UNKNOW10 0x00000800
2092
a869b0376b48 enums and BLV_UpdateDoors()
Ritor1
parents: 2086
diff changeset
238 #define FACE_UNKNOW3 0x00001000
638
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 595
diff changeset
239 #define FACE_INVISIBLE 0x00002000
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 595
diff changeset
240 #define FACE_TEXTURE_FRAME 0x00004000 // Texture ID is a frameset from TextureFrameTable, otherwise BitmapID
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 595
diff changeset
241 #define FACE_OUTLINED 0x00010000 // outline face edges
2166
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2092
diff changeset
242 #define FACE_UNKNOW7 0x00020000
638
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 595
diff changeset
243 #define FACE_TEXTURE_FLOW 0x00040000 // The texture moves slowly. For horizontal facets only.
2092
a869b0376b48 enums and BLV_UpdateDoors()
Ritor1
parents: 2086
diff changeset
244 #define FACE_UNKNOW 0x00100000
2166
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2092
diff changeset
245 #define FACE_UNKNOW6 0x00200000
2069
259df09dfb50 32bits almost there
Nomad
parents: 2027
diff changeset
246 #define FACE_INDOOR_SKY 0x00400000
638
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 595
diff changeset
247 #define FACE_CLICKABLE 0x02000000 // Event can be triggered by clicking on the facet.
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 595
diff changeset
248 #define FACE_PRESSURE_PLATE 0x04000000 // Event can be triggered by stepping on the facet.
2092
a869b0376b48 enums and BLV_UpdateDoors()
Ritor1
parents: 2086
diff changeset
249 #define FACE_INDICATE 0x06000000 // Event can be triggered by indicating on the facet.
a869b0376b48 enums and BLV_UpdateDoors()
Ritor1
parents: 2086
diff changeset
250 #define FACE_UNKNOW2 0x10000000
638
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 595
diff changeset
251 #define FACE_ETHEREAL 0x20000000 // Untouchable. You can pass through it.
2166
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2092
diff changeset
252 #define FACE_UNKNOW5 0x40000000
1053
1c10b24a4159 BLV picky-blicky
Nomad
parents: 1030
diff changeset
253 #define FACE_PICKED 0x80000000
0
Ritor1
parents:
diff changeset
254
Ritor1
parents:
diff changeset
255 /* 93 */
Ritor1
parents:
diff changeset
256 #pragma pack(push, 1)
711
a5e587c8e30e some cleaning
Gloval
parents: 676
diff changeset
257 struct BLVFace //60h
0
Ritor1
parents:
diff changeset
258 {
Ritor1
parents:
diff changeset
259 //----- (0046ED02) --------------------------------------------------------
Ritor1
parents:
diff changeset
260 inline BLVFace()
Ritor1
parents:
diff changeset
261 {
Ritor1
parents:
diff changeset
262 this->uNumVertices = 0;
Ritor1
parents:
diff changeset
263 this->uAttributes = 0;
Ritor1
parents:
diff changeset
264 this->uFaceExtraID = 0;
Ritor1
parents:
diff changeset
265 this->pVertexIDs = 0;
Ritor1
parents:
diff changeset
266 this->pZInterceptDisplacements = 0;
Ritor1
parents:
diff changeset
267 this->pYInterceptDisplacements = 0;
Ritor1
parents:
diff changeset
268 this->pXInterceptDisplacements = 0;
Ritor1
parents:
diff changeset
269 }
Ritor1
parents:
diff changeset
270
2092
a869b0376b48 enums and BLV_UpdateDoors()
Ritor1
parents: 2086
diff changeset
271 void _get_normals(Vec3_int_ *a2, Vec3_int_ *a3);
0
Ritor1
parents:
diff changeset
272 struct Texture *GetTexture();
1025
8b492d4722d4 Intersection
Ritor1
parents: 837
diff changeset
273 void FromODM(struct ODMFace *face);
0
Ritor1
parents:
diff changeset
274
1113
39eaa6b00141 something to bool cast (performance warning) mostly fixed
Grumpy7
parents: 1053
diff changeset
275 inline bool Invisible() const {return (uAttributes & FACE_INVISIBLE) != 0;}
0
Ritor1
parents:
diff changeset
276 inline bool Visible() const {return !Invisible();}
1113
39eaa6b00141 something to bool cast (performance warning) mostly fixed
Grumpy7
parents: 1053
diff changeset
277 inline bool Portal() const {return (uAttributes & FACE_PORTAL) != 0;}
39eaa6b00141 something to bool cast (performance warning) mostly fixed
Grumpy7
parents: 1053
diff changeset
278 inline bool Fluid() const {return (uAttributes & FACE_FLUID) != 0;}
2092
a869b0376b48 enums and BLV_UpdateDoors()
Ritor1
parents: 2086
diff changeset
279 inline bool Indoor_sky() const {return (uAttributes & FACE_INDOOR_SKY) != 0;}
1113
39eaa6b00141 something to bool cast (performance warning) mostly fixed
Grumpy7
parents: 1053
diff changeset
280 inline bool Clickable() const {return (uAttributes & FACE_CLICKABLE) != 0;}
2092
a869b0376b48 enums and BLV_UpdateDoors()
Ritor1
parents: 2086
diff changeset
281 inline bool Pressure_Plate() const {return (uAttributes & FACE_PRESSURE_PLATE) != 0;}
2027
3fa489e0a3f2 pFloor->Ethereal()
Ritor1
parents: 1922
diff changeset
282 inline bool Ethereal() const {return (uAttributes & FACE_ETHEREAL) != 0;}
0
Ritor1
parents:
diff changeset
283
Ritor1
parents:
diff changeset
284 struct Plane_float_ pFacePlane;
Ritor1
parents:
diff changeset
285 struct Plane_int_ pFacePlane_old;
Ritor1
parents:
diff changeset
286 int zCalc1;
Ritor1
parents:
diff changeset
287 int zCalc2;
Ritor1
parents:
diff changeset
288 int zCalc3;
Ritor1
parents:
diff changeset
289 unsigned int uAttributes;
Ritor1
parents:
diff changeset
290 unsigned __int16 *pVertexIDs;
676
ecfb1b3c9a39 BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents: 638
diff changeset
291 signed __int16 *pXInterceptDisplacements;
ecfb1b3c9a39 BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents: 638
diff changeset
292 signed __int16 *pYInterceptDisplacements;
ecfb1b3c9a39 BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents: 638
diff changeset
293 signed __int16 *pZInterceptDisplacements;
0
Ritor1
parents:
diff changeset
294 signed __int16 *pVertexUIDs;
Ritor1
parents:
diff changeset
295 signed __int16 *pVertexVIDs;
Ritor1
parents:
diff changeset
296 unsigned __int16 uFaceExtraID;
Ritor1
parents:
diff changeset
297 unsigned __int16 uBitmapID;
Ritor1
parents:
diff changeset
298 unsigned __int16 uSectorID;
Ritor1
parents:
diff changeset
299 __int16 uBackSectorID;
Ritor1
parents:
diff changeset
300 struct BBox_short_ pBounding;
Ritor1
parents:
diff changeset
301 PolygonType uPolygonType;
Ritor1
parents:
diff changeset
302 unsigned __int8 uNumVertices;
Ritor1
parents:
diff changeset
303 char field_5E;
Ritor1
parents:
diff changeset
304 char field_5F;
Ritor1
parents:
diff changeset
305 };
Ritor1
parents:
diff changeset
306 #pragma pack(pop)
Ritor1
parents:
diff changeset
307
Ritor1
parents:
diff changeset
308 /* 94 */
Ritor1
parents:
diff changeset
309 #pragma pack(push, 1)
711
a5e587c8e30e some cleaning
Gloval
parents: 676
diff changeset
310 struct BLVFaceExtra //24h
0
Ritor1
parents:
diff changeset
311 {
428
24936a5ff8ca level hints
Gloval
parents: 194
diff changeset
312 bool HasEventint();
0
Ritor1
parents:
diff changeset
313
Ritor1
parents:
diff changeset
314 __int16 field_0;
Ritor1
parents:
diff changeset
315 __int16 field_2;
Ritor1
parents:
diff changeset
316 __int16 field_4;
Ritor1
parents:
diff changeset
317 __int16 field_6;
Ritor1
parents:
diff changeset
318 __int16 field_8;
Ritor1
parents:
diff changeset
319 __int16 field_A;
Ritor1
parents:
diff changeset
320 __int16 field_C;
Ritor1
parents:
diff changeset
321 unsigned __int16 uAdditionalBitmapID;
Ritor1
parents:
diff changeset
322 __int16 field_10;
Ritor1
parents:
diff changeset
323 __int16 field_12;
Ritor1
parents:
diff changeset
324 __int16 sTextureDeltaU;
Ritor1
parents:
diff changeset
325 __int16 sTextureDeltaV;
Ritor1
parents:
diff changeset
326 __int16 sCogNumber;
Ritor1
parents:
diff changeset
327 unsigned __int16 uEventID;
Ritor1
parents:
diff changeset
328 __int16 field_1C;
Ritor1
parents:
diff changeset
329 __int16 field_1E;
Ritor1
parents:
diff changeset
330 __int16 field_20;
Ritor1
parents:
diff changeset
331 __int16 field_22;
Ritor1
parents:
diff changeset
332 };
Ritor1
parents:
diff changeset
333 #pragma pack(pop)
Ritor1
parents:
diff changeset
334
Ritor1
parents:
diff changeset
335 /* 95 */
Ritor1
parents:
diff changeset
336 #pragma pack(push, 1)
711
a5e587c8e30e some cleaning
Gloval
parents: 676
diff changeset
337 struct BLVSector //0x74
0
Ritor1
parents:
diff changeset
338 {
Ritor1
parents:
diff changeset
339 int field_0;
Ritor1
parents:
diff changeset
340 unsigned __int16 uNumFloors;
Ritor1
parents:
diff changeset
341 __int16 field_6;
Ritor1
parents:
diff changeset
342 unsigned __int16 *pFloors;
554
9caf59edb1ee Cave and Temple load and even doesn't crash (for a while).
Nomad
parents: 520
diff changeset
343 unsigned __int16 uNumWalls;
0
Ritor1
parents:
diff changeset
344 __int16 field_E;
Ritor1
parents:
diff changeset
345 unsigned __int16 *pWalls;
554
9caf59edb1ee Cave and Temple load and even doesn't crash (for a while).
Nomad
parents: 520
diff changeset
346 unsigned __int16 uNumCeilings;
0
Ritor1
parents:
diff changeset
347 __int16 field_16;
Ritor1
parents:
diff changeset
348 unsigned __int16 *pCeilings;
554
9caf59edb1ee Cave and Temple load and even doesn't crash (for a while).
Nomad
parents: 520
diff changeset
349 unsigned __int16 uNumFluids;
0
Ritor1
parents:
diff changeset
350 __int16 field_1E;
Ritor1
parents:
diff changeset
351 unsigned __int16 *pFluids;
Ritor1
parents:
diff changeset
352 __int16 uNumPortals;
Ritor1
parents:
diff changeset
353 __int16 field_26;
Ritor1
parents:
diff changeset
354 unsigned __int16 *pPortals;
554
9caf59edb1ee Cave and Temple load and even doesn't crash (for a while).
Nomad
parents: 520
diff changeset
355 unsigned __int16 uNumFaces;
9caf59edb1ee Cave and Temple load and even doesn't crash (for a while).
Nomad
parents: 520
diff changeset
356 unsigned __int16 uNumNonBSPFaces;
0
Ritor1
parents:
diff changeset
357 unsigned __int16 *pFaceIDs;
554
9caf59edb1ee Cave and Temple load and even doesn't crash (for a while).
Nomad
parents: 520
diff changeset
358 unsigned __int16 uNumCylinderFaces;
0
Ritor1
parents:
diff changeset
359 __int16 field_36;
Ritor1
parents:
diff changeset
360 int pCylinderFaces;
554
9caf59edb1ee Cave and Temple load and even doesn't crash (for a while).
Nomad
parents: 520
diff changeset
361 unsigned __int16 uNumCogs;
0
Ritor1
parents:
diff changeset
362 __int16 field_3E;
Ritor1
parents:
diff changeset
363 unsigned __int16 *pCogs;
Ritor1
parents:
diff changeset
364 unsigned __int16 uNumDecorations;
Ritor1
parents:
diff changeset
365 __int16 field_46;
Ritor1
parents:
diff changeset
366 unsigned __int16 *pDecorationIDs;
554
9caf59edb1ee Cave and Temple load and even doesn't crash (for a while).
Nomad
parents: 520
diff changeset
367 unsigned __int16 uNumMarkers;
0
Ritor1
parents:
diff changeset
368 __int16 field_4E;
Ritor1
parents:
diff changeset
369 unsigned __int16 *pMarkers;
554
9caf59edb1ee Cave and Temple load and even doesn't crash (for a while).
Nomad
parents: 520
diff changeset
370 unsigned __int16 uNumLights;
0
Ritor1
parents:
diff changeset
371 __int16 field_56;
Ritor1
parents:
diff changeset
372 unsigned __int16 *pLights;
Ritor1
parents:
diff changeset
373 __int16 uWaterLevel;
Ritor1
parents:
diff changeset
374 __int16 uMistLevel;
Ritor1
parents:
diff changeset
375 __int16 uLightDistanceMultiplier;
Ritor1
parents:
diff changeset
376 __int16 uMinAmbientLightLevel;
Ritor1
parents:
diff changeset
377 __int16 uFirstBSPNode;
Ritor1
parents:
diff changeset
378 __int16 exit_tag;
Ritor1
parents:
diff changeset
379 BBox_short_ pBounding;
Ritor1
parents:
diff changeset
380 };
Ritor1
parents:
diff changeset
381 #pragma pack(pop)
Ritor1
parents:
diff changeset
382
Ritor1
parents:
diff changeset
383
Ritor1
parents:
diff changeset
384 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
385 struct BLVMapOutlines
Ritor1
parents:
diff changeset
386 {
711
a5e587c8e30e some cleaning
Gloval
parents: 676
diff changeset
387 int uNumOutlines;
a5e587c8e30e some cleaning
Gloval
parents: 676
diff changeset
388 BLVMapOutline pOutlines[7000];
0
Ritor1
parents:
diff changeset
389 };
Ritor1
parents:
diff changeset
390 #pragma pack(pop)
Ritor1
parents:
diff changeset
391
Ritor1
parents:
diff changeset
392
Ritor1
parents:
diff changeset
393
810
f5156b8c61ad savegame refactoring
Gloval
parents: 795
diff changeset
394
0
Ritor1
parents:
diff changeset
395
Ritor1
parents:
diff changeset
396
Ritor1
parents:
diff changeset
397
Ritor1
parents:
diff changeset
398 /* 89 */
Ritor1
parents:
diff changeset
399 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
400 struct IndoorLocation
Ritor1
parents:
diff changeset
401 {
Ritor1
parents:
diff changeset
402 //----- (00462592) --------------------------------------------------------
Ritor1
parents:
diff changeset
403 inline IndoorLocation()
Ritor1
parents:
diff changeset
404 {
Ritor1
parents:
diff changeset
405 bLoaded = 0;
Ritor1
parents:
diff changeset
406 ptr_0002B8_sector_lrdata = 0;
Ritor1
parents:
diff changeset
407 ptr_0002B4_doors_ddata = 0;
Ritor1
parents:
diff changeset
408 ptr_0002B0_sector_rdata = 0;
1006
e865f349aa41 ui cleanup
Gloval
parents: 837
diff changeset
409 pLFaces = 0;
0
Ritor1
parents:
diff changeset
410 pVertices = 0;
Ritor1
parents:
diff changeset
411 pFaces = 0;
Ritor1
parents:
diff changeset
412 pFaceExtras = 0;
Ritor1
parents:
diff changeset
413 pSectors = 0;
Ritor1
parents:
diff changeset
414 pLights = 0;
Ritor1
parents:
diff changeset
415 pDoors = 0;
Ritor1
parents:
diff changeset
416 pNodes = 0;
Ritor1
parents:
diff changeset
417 pMapOutlines = 0;
Ritor1
parents:
diff changeset
418 uNumSpawnPoints = 0;
Ritor1
parents:
diff changeset
419 pSpawnPoints = 0;
Ritor1
parents:
diff changeset
420 }
Ritor1
parents:
diff changeset
421
Ritor1
parents:
diff changeset
422 int GetSector(int sX, int sY, int sZ);
Ritor1
parents:
diff changeset
423 void Release();
711
a5e587c8e30e some cleaning
Gloval
parents: 676
diff changeset
424 bool Alloc();
0
Ritor1
parents:
diff changeset
425 bool Load(char *pFilename, int a3, size_t i, char *pDest);
Ritor1
parents:
diff changeset
426 void Draw();
711
a5e587c8e30e some cleaning
Gloval
parents: 676
diff changeset
427 void ToggleLight(signed int uLightID, unsigned int bToggle);
0
Ritor1
parents:
diff changeset
428
Ritor1
parents:
diff changeset
429 static unsigned int GetLocationIndex(const char *Str1);
Ritor1
parents:
diff changeset
430 static void ExecDraw(bool bD3D);
1391
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 1376
diff changeset
431 //static void ExecDraw_sw(unsigned int uFaceID);
794
Nomad
parents: 791
diff changeset
432 static void ExecDraw_d3d(unsigned int uFaceID, struct IndoorCameraD3D_Vec4 *pVertices, unsigned int uNumVertices, struct RenderVertexSoft *pPortalBounding);
0
Ritor1
parents:
diff changeset
433
Ritor1
parents:
diff changeset
434 char pFilename[32];
Ritor1
parents:
diff changeset
435 char field_20[48];
Ritor1
parents:
diff changeset
436 unsigned int bLoaded;
Ritor1
parents:
diff changeset
437 char field_54[404];
Ritor1
parents:
diff changeset
438 struct BLVHeader blv;
Ritor1
parents:
diff changeset
439 unsigned int uNumVertices;
Ritor1
parents:
diff changeset
440 struct Vec3_short_ *pVertices;
Ritor1
parents:
diff changeset
441 unsigned int uNumFaces;
Ritor1
parents:
diff changeset
442 struct BLVFace *pFaces;
Ritor1
parents:
diff changeset
443 unsigned int uNumFaceExtras;
Ritor1
parents:
diff changeset
444 struct BLVFaceExtra *pFaceExtras;
Ritor1
parents:
diff changeset
445 int uNumSectors;
Ritor1
parents:
diff changeset
446 struct BLVSector *pSectors;
Ritor1
parents:
diff changeset
447 int uNumLights;
Ritor1
parents:
diff changeset
448 struct BLVLightMM7 *pLights;
Ritor1
parents:
diff changeset
449 int uNumDoors;
Ritor1
parents:
diff changeset
450 struct BLVDoor *pDoors;
Ritor1
parents:
diff changeset
451 unsigned int uNumNodes;
Ritor1
parents:
diff changeset
452 struct BSPNode *pNodes;
Ritor1
parents:
diff changeset
453 BLVMapOutlines *pMapOutlines;
1006
e865f349aa41 ui cleanup
Gloval
parents: 837
diff changeset
454 unsigned __int16 *pLFaces;
0
Ritor1
parents:
diff changeset
455 unsigned __int16 *ptr_0002B0_sector_rdata;
Ritor1
parents:
diff changeset
456 unsigned __int16 *ptr_0002B4_doors_ddata;
Ritor1
parents:
diff changeset
457 unsigned __int16 *ptr_0002B8_sector_lrdata;
Ritor1
parents:
diff changeset
458 unsigned int uNumSpawnPoints;
Ritor1
parents:
diff changeset
459 struct SpawnPointMM7 *pSpawnPoints;
Ritor1
parents:
diff changeset
460 struct DDM_DLV_Header dlv;
810
f5156b8c61ad savegame refactoring
Gloval
parents: 795
diff changeset
461 LocationTime_stru1 stru1;
837
bebc19f3d2af Save/load work with some problems
Gloval
parents: 810
diff changeset
462 char _visible_outlines[875];
bebc19f3d2af Save/load work with some problems
Gloval
parents: 810
diff changeset
463 char padding;
0
Ritor1
parents:
diff changeset
464 };
Ritor1
parents:
diff changeset
465 #pragma pack(pop)
Ritor1
parents:
diff changeset
466
Ritor1
parents:
diff changeset
467 extern IndoorLocation *pIndoor;
Ritor1
parents:
diff changeset
468
Ritor1
parents:
diff changeset
469
Ritor1
parents:
diff changeset
470
Ritor1
parents:
diff changeset
471
Ritor1
parents:
diff changeset
472
Ritor1
parents:
diff changeset
473
Ritor1
parents:
diff changeset
474
Ritor1
parents:
diff changeset
475
Ritor1
parents:
diff changeset
476
Ritor1
parents:
diff changeset
477
Ritor1
parents:
diff changeset
478
1641
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
479
0
Ritor1
parents:
diff changeset
480
Ritor1
parents:
diff changeset
481 /* 162 */
Ritor1
parents:
diff changeset
482 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
483 struct BLVRenderParams
Ritor1
parents:
diff changeset
484 {
1642
8971dc85b8fb More camera unifications.
Nomad
parents: 1641
diff changeset
485 inline BLVRenderParams()
1641
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
486 {
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
487 uViewportX = 0;
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
488 uViewportY = 0;
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
489 uViewportZ = 0;
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
490 uViewportW = 0;
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
491 }
791
346f7069676a Indoor::GetSector and various stuff
Nomad
parents: 711
diff changeset
492
1641
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
493 void Reset();
0
Ritor1
parents:
diff changeset
494
Ritor1
parents:
diff changeset
495 int field_0_timer_;
1642
8971dc85b8fb More camera unifications.
Nomad
parents: 1641
diff changeset
496 int _unused_uFlags; // & INDOOR_CAMERA_DRAW_D3D_OUTLINES: render d3d outlines
1640
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1638
diff changeset
497 Vec3_int_ _unused_vPartyPos;
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1638
diff changeset
498 int _unused_sPartyRotY;
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1638
diff changeset
499 int _unused_sPartyRotX;
0
Ritor1
parents:
diff changeset
500 int uPartySectorID;
1642
8971dc85b8fb More camera unifications.
Nomad
parents: 1641
diff changeset
501 int _unused_sCosineY; // matches ODMRenderParams::int sines and cosines
8971dc85b8fb More camera unifications.
Nomad
parents: 1641
diff changeset
502 int _unused_sSineY; // computed in 0048600E
8971dc85b8fb More camera unifications.
Nomad
parents: 1641
diff changeset
503 int _unused_sCosineNegX; // merged into IndoorCameraD3D
8971dc85b8fb More camera unifications.
Nomad
parents: 1641
diff changeset
504 int _unused_sSineNegX; // --//--
8971dc85b8fb More camera unifications.
Nomad
parents: 1641
diff changeset
505 float _unused_fCosineY; // matches old IndoorCamera::fRotationCosineY (new IndoorCameraD3D::fRotationCosineY)
8971dc85b8fb More camera unifications.
Nomad
parents: 1641
diff changeset
506 float _unused_fSineY; // matches old IndoorCamera::fRotationSineY (new IndoorCameraD3D::fRotationSineY)
8971dc85b8fb More camera unifications.
Nomad
parents: 1641
diff changeset
507 float _unused_fCosineNegX; // the same
8971dc85b8fb More camera unifications.
Nomad
parents: 1641
diff changeset
508 float _unused_fSineNegX; // the same
1641
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
509 int fov_rad_fixpoint;
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
510 int fov_rad_inv_fixpoint;//float
2069
259df09dfb50 32bits almost there
Nomad
parents: 2027
diff changeset
511 void *pRenderTarget;
0
Ritor1
parents:
diff changeset
512 unsigned int uTargetWidth;
Ritor1
parents:
diff changeset
513 unsigned int uTargetHeight;
Ritor1
parents:
diff changeset
514 unsigned int uViewportX;
Ritor1
parents:
diff changeset
515 unsigned int uViewportY;
Ritor1
parents:
diff changeset
516 unsigned int uViewportZ;
Ritor1
parents:
diff changeset
517 unsigned int uViewportW;
Ritor1
parents:
diff changeset
518 int field_64;
Ritor1
parents:
diff changeset
519 int *pTargetZBuffer;
Ritor1
parents:
diff changeset
520 int uViewportHeight;
1641
466c5e15f524 Excess wrapper (IndoorLocation_drawstru) removed.
Nomad
parents: 1640
diff changeset
521 int uViewportWidth;
0
Ritor1
parents:
diff changeset
522 int uViewportCenterX;
Ritor1
parents:
diff changeset
523 int uViewportCenterY;
1376
78671379d8da PortalFrustrum
Ritor1
parents: 1323
diff changeset
524 struct BspRenderer_PortalViewportData *field_7C;
0
Ritor1
parents:
diff changeset
525 unsigned int uNumFacesRenderedThisFrame;
Ritor1
parents:
diff changeset
526 int field_84;
Ritor1
parents:
diff changeset
527 int field_88;
Ritor1
parents:
diff changeset
528 int field_8C;
Ritor1
parents:
diff changeset
529 int field_90;
Ritor1
parents:
diff changeset
530 int field_94;
Ritor1
parents:
diff changeset
531 };
Ritor1
parents:
diff changeset
532 #pragma pack(pop)
1637
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1512
diff changeset
533 extern BLVRenderParams *pBLVRenderParams;
0
Ritor1
parents:
diff changeset
534
Ritor1
parents:
diff changeset
535
Ritor1
parents:
diff changeset
536
Ritor1
parents:
diff changeset
537