annotate MM7.h @ 326:ead95219160c

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