0
|
1 #pragma once
|
|
2 #include "OSAPI.h"
|
|
3 #include <math.h>
|
|
4 #include <stdio.h>
|
|
5 #include <stdarg.h>
|
|
6 #include <string>
|
|
7
|
|
8 typedef unsigned int uint;
|
|
9 #define LOWORD(a) (*((unsigned short *)&a))
|
|
10 #define HIWORD(a) (*((unsigned short *)&a + 1))
|
|
11 #define SHIWORD(a) (*((short *)&a + 1))
|
|
12
|
|
13 #define LODWORD(a) (*((unsigned int *)&a))
|
|
14 #define HIDWORD(a) (*((unsigned int *)&a + 1))
|
|
15 #define SLODWORD(a) (*((int *)&a))
|
|
16 #define SHIDWORD(a) (*((int *)&a + 1))
|
|
17
|
|
18 #define LOBYTE(a) (*((unsigned char *)&a))
|
|
19 #define HIBYTE(a) (*((unsigned char *)&a + sizeof(a) - 1))
|
|
20 #define BYTE1(a) (*((unsigned char *)&a + 1))
|
|
21 #define BYTE2(a) (*((unsigned char *)&a + 2))
|
|
22 #define BYTE3(a) (*((unsigned char *)&a + 3))
|
|
23
|
|
24
|
|
25 typedef unsigned __int16 _WORD;
|
|
26 typedef unsigned __int64 _QWORD;
|
|
27
|
|
28
|
|
29 #include "VectorTypes.h"
|
|
30 #include "IndoorCameraD3D.h"
|
|
31 /*#include "LOD.h"
|
|
32 #include "Texture.h"
|
|
33 #include "Mouse.h"
|
|
34 #include "Overlays.h"
|
|
35 #include "Game.h"
|
|
36 #include "Items.h"
|
|
37 #include "Actor.h"
|
|
38 #include "Arcomage.h"
|
|
39 #include "Render.h"
|
|
40 #include "Time.h"
|
|
41 #include "GUIWindow.h"
|
|
42 #include "GUIButton.h"
|
|
43 #include "GUIProgressBar.h"
|
|
44 #include "GUIFont.h"
|
|
45 #include "NPC.h"
|
|
46 #include "PaletteManager.h"
|
|
47 #include "Party.h"
|
|
48 #include "AudioPlayer.h"
|
|
49 #include "VideoPlayer.h"
|
|
50 #include "Chest.h"
|
|
51 #include "Allocator.h"
|
|
52 #include "IndoorCamera.h"
|
|
53 #include "Party.h"
|
|
54 #include "Outdoor.h"
|
|
55
|
|
56 #include "mm7_data.h"
|
|
57 */
|
|
58
|
|
59
|
|
60
|
|
61
|
|
62
|
|
63
|
|
64
|
|
65
|
|
66
|
|
67
|
|
68
|
|
69
|
|
70
|
|
71
|
|
72
|
|
73
|
|
74
|
|
75
|
|
76
|
|
77
|
|
78
|
|
79
|
|
80
|
|
81
|
|
82
|
|
83
|
|
84
|
|
85
|
|
86
|
|
87
|
|
88
|
|
89
|
|
90
|
|
91
|
|
92
|
|
93
|
|
94
|
|
95
|
|
96
|
|
97
|
|
98
|
|
99
|
|
100
|
|
101
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
107
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112
|
|
113
|
|
114
|
|
115
|
|
116
|
|
117
|
|
118
|
|
119
|
|
120
|
|
121 /* 154 */
|
|
122 #pragma pack(push, 1)
|
|
123 struct stru161
|
|
124 {
|
|
125 Vec3_int_ pos;
|
|
126 __int16 rot_y;
|
|
127 __int16 rot_x;
|
|
128 unsigned __int16 uMapInfoID;
|
|
129 __int16 field_12;
|
|
130 };
|
|
131 #pragma pack(pop)
|
|
132 extern stru161 stru_4ECBB8[6]; // weak
|
|
133
|
|
134
|
|
135
|
|
136
|
|
137
|
|
138
|
|
139
|
|
140
|
|
141
|
|
142
|
|
143
|
|
144
|
|
145
|
|
146
|
|
147
|
|
148
|
|
149
|
|
150
|
|
151
|
|
152
|
|
153
|
|
154
|
|
155
|
|
156
|
|
157
|
|
158
|
|
159
|
|
160
|
|
161
|
|
162
|
|
163
|
|
164
|
|
165
|
|
166
|
|
167
|
|
168
|
|
169
|
|
170
|
|
171
|
|
172 /* 285 */
|
|
173 #pragma pack(push, 1)
|
|
174 struct stru289
|
|
175 {
|
|
176 //----- (0046263C) --------------------------------------------------------
|
|
177 inline stru289()
|
|
178 {
|
|
179 this->field_64 = 2;
|
|
180 this->field_74 = 0;
|
|
181 this->field_70 = 0;
|
|
182 this->field_6C = 0;
|
|
183 this->field_68 = 0;
|
|
184 }
|
|
185
|
|
186
|
|
187 char field_0[100];
|
|
188 int field_64;
|
|
189 int field_68;
|
|
190 int field_6C;
|
|
191 int field_70;
|
|
192 int field_74;
|
|
193 };
|
|
194 #pragma pack(pop)
|
|
195 extern stru289 stru_6BE158;
|
|
196
|
|
197
|
|
198
|
|
199 /* 288 */
|
|
200 #pragma pack(push, 1)
|
|
201 struct CheckHRESULT_stru0
|
|
202 {
|
|
203 void CheckHRESULT(HRESULT a2, const char *Str, int a4, unsigned int uType);
|
|
204 void *_466D09_xcpt_string(std::string a2, const char *Str, int a4);
|
|
205 void ShowMessageBox(std::string *a0, std::string lpCaption, UINT uType, std::string lpText, int line);
|
|
206 char ddraw_error(HRESULT hr, char *Str, size_t a3);
|
|
207 char dinput_error(int a1, const char *Str, int a3);
|
|
208
|
|
209 void (__thiscall ***vdestructor_ptr)(CheckHRESULT_stru0 *, bool);
|
|
210 };
|
|
211 #pragma pack(pop)
|
|
212
|
|
213
|
|
214
|
|
215
|
|
216 /* 297 */
|
|
217 enum SoundType
|
|
218 {
|
|
219 SOUND_EndTurnBasedMode = 0xCE,
|
|
220 SOUND_StartTurnBasedMode = 0xCF,
|
|
221 SOUND_FlipOnExit = 0x4E21,
|
|
222 };
|
|
223
|
|
224
|
|
225
|
|
226
|
|
227
|
|
228
|
|
229
|
|
230
|
|
231
|
|
232
|
|
233
|
|
234
|
|
235
|
|
236
|
|
237
|
|
238
|
|
239
|
|
240
|
|
241
|
|
242
|
|
243
|
|
244
|
|
245 /* 349 */
|
|
246 enum HOUSE_TYPE
|
|
247 {
|
|
248 HOUSE_BODY_GUILD_NOVICE_EMERALD_ISLE = 0xA3,
|
|
249 };
|
|
250
|
|
251
|
|
252
|
|
253
|
|
254
|
|
255
|
|
256
|
|
257
|
|
258
|
|
259
|
|
260
|
|
261 /* 362 */
|
|
262 #pragma pack(push, 1)
|
|
263 struct TravelInfo
|
|
264 {
|
|
265 char uMapID;
|
|
266 char pSchedule[7];
|
|
267 char uDaysCount;
|
|
268 char field_9[3];
|
|
269 int x;
|
|
270 int y;
|
|
271 int z;
|
|
272 int direction;
|
|
273 int field_1C;
|
|
274 };
|
|
275 #pragma pack(pop)
|
|
276
|
|
277
|
|
278
|
|
279
|
|
280
|
|
281
|
|
282 /* 369 */
|
|
283 #pragma pack(push, 1)
|
|
284 struct stru329
|
|
285 {
|
|
286 int field_0;
|
|
287 float field_4;
|
|
288 int field_8;
|
|
289 int field_C;
|
|
290 int equip_x;
|
|
291 int equip_y;
|
|
292 int field_18;
|
|
293 int field_1C;
|
|
294 int field_20;
|
|
295 int field_24;
|
|
296 int field_28;
|
|
297 int field_2C;
|
|
298 int field_30;
|
|
299 int field_34;
|
|
300 int field_38;
|
|
301 int field_3C;
|
|
302 int field_40;
|
|
303 int field_44;
|
|
304 int field_48;
|
|
305 int field_4C;
|
|
306 int field_50;
|
|
307 int field_54;
|
|
308 int field_58;
|
|
309 int field_5C;
|
|
310 int field_60;
|
|
311 int field_64;
|
|
312 int field_68;
|
|
313 int field_6C;
|
|
314 int field_70;
|
|
315 int field_74;
|
|
316 int field_78;
|
|
317 int field_7C;
|
|
318 };
|
|
319 #pragma pack(pop)
|
|
320 extern stru329 array_4E4C30[4];
|
|
321
|
|
322 /* 371 */
|
|
323 #pragma pack(push, 1)
|
|
324 struct stru331
|
|
325 {
|
|
326 int field_0;
|
|
327 int field_4;
|
|
328 int field_8;
|
|
329 int field_C;
|
|
330 int field_10;
|
|
331 int field_14;
|
|
332 int field_18;
|
|
333 int field_1C;
|
|
334 int field_20;
|
|
335 int field_24;
|
|
336 int field_28;
|
|
337 int field_2C;
|
|
338 int field_30;
|
|
339 int field_34;
|
|
340 int field_38;
|
|
341 int field_3C;
|
|
342 };
|
|
343 #pragma pack(pop)
|
|
344
|
|
345 /* 372 */
|
|
346 #pragma pack(push, 1)
|
|
347 struct stru332
|
|
348 {
|
|
349 unsigned int texids[11];
|
|
350 stru331 field_2C;
|
|
351 };
|
|
352 #pragma pack(pop)
|
|
353 extern stru332 stru_511698;
|
|
354
|
|
355
|
|
356 /* 373 */
|
|
357 #pragma pack(push, 1)
|
|
358 struct stru333
|
|
359 {
|
|
360 unsigned int texids[5];
|
|
361 unsigned int *texid1;
|
|
362 int field_18;
|
|
363 };
|
|
364 #pragma pack(pop)
|
|
365 extern stru333 stru_511718;
|
|
366
|
|
367
|
|
368 /* 374 */
|
|
369 #pragma pack(push, 1)
|
|
370 struct stru334
|
|
371 {
|
|
372 __int16 field_0;
|
|
373 __int16 field_2;
|
|
374 __int16 field_4;
|
|
375 __int16 field_6;
|
|
376 };
|
|
377 #pragma pack(pop)
|
|
378 extern stru334 array_4E2940[26];
|
|
379
|
|
380 /* 376 */
|
|
381 #pragma pack(push, 1)
|
|
382 struct stru336
|
|
383 {
|
|
384 int field_0;
|
|
385 int field_4;
|
|
386 int field_8;
|
|
387 int field_C;
|
|
388 int field_10;
|
|
389 int field_14;
|
|
390 __int16 field_18[480];
|
|
391 __int16 field_3D8[480];
|
|
392 };
|
|
393 #pragma pack(pop)
|
|
394
|
|
395
|
|
396
|
|
397
|
|
398
|
|
399
|
|
400
|
|
401
|
|
402
|
|
403
|
|
404
|
|
405
|
|
406
|
|
407 /* 388 */
|
|
408 #pragma pack(push, 1)
|
|
409 struct stru348
|
|
410 {
|
|
411 __int16 field_0;
|
|
412 __int16 field_2;
|
|
413 __int16 field_4;
|
|
414 __int16 field_6;
|
|
415 __int16 field_8;
|
|
416 __int16 field_A;
|
|
417 __int16 field_C;
|
|
418 __int16 field_E;
|
|
419 __int16 field_10;
|
|
420 __int16 field_12;
|
|
421 int field_14;
|
|
422 };
|
|
423 #pragma pack(pop)
|
|
424
|
|
425 extern stru348 stru_4E1890[13];
|
|
426
|
|
427
|
|
428
|
|
429
|
|
430
|
|
431
|