annotate MM7.h @ 931:6dd1766051cf

Слияние
author Ritor1
date Wed, 01 May 2013 15:17:43 +0600
parents 4dc2252e0b03
children 016e3577865c
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
823
c1da83d8223f More spell renames
Nomad
parents: 786
diff changeset
24 #define PID(type, id) (unsigned int)((((8 * (id))) | (type)) & 0xFFFF) // packed id
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 823
diff changeset
25 #define PID_TYPE(pid) (unsigned int)((pid) & 7) // extract type
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 823
diff changeset
26 #define PID_ID(pid) (unsigned int)(((pid) & 0xFFFF) >> 3) // extract value
823
c1da83d8223f More spell renames
Nomad
parents: 786
diff changeset
27
0
Ritor1
parents:
diff changeset
28
Ritor1
parents:
diff changeset
29 typedef unsigned __int16 _WORD;
Ritor1
parents:
diff changeset
30 typedef unsigned __int64 _QWORD;
Ritor1
parents:
diff changeset
31
Ritor1
parents:
diff changeset
32
Ritor1
parents:
diff changeset
33 #include "VectorTypes.h"
Ritor1
parents:
diff changeset
34 #include "IndoorCameraD3D.h"
Ritor1
parents:
diff changeset
35 /*#include "LOD.h"
Ritor1
parents:
diff changeset
36 #include "Texture.h"
Ritor1
parents:
diff changeset
37 #include "Mouse.h"
Ritor1
parents:
diff changeset
38 #include "Overlays.h"
Ritor1
parents:
diff changeset
39 #include "Game.h"
Ritor1
parents:
diff changeset
40 #include "Items.h"
Ritor1
parents:
diff changeset
41 #include "Actor.h"
Ritor1
parents:
diff changeset
42 #include "Arcomage.h"
Ritor1
parents:
diff changeset
43 #include "Render.h"
Ritor1
parents:
diff changeset
44 #include "Time.h"
Ritor1
parents:
diff changeset
45 #include "GUIWindow.h"
Ritor1
parents:
diff changeset
46 #include "GUIButton.h"
Ritor1
parents:
diff changeset
47 #include "GUIProgressBar.h"
Ritor1
parents:
diff changeset
48 #include "GUIFont.h"
Ritor1
parents:
diff changeset
49 #include "NPC.h"
Ritor1
parents:
diff changeset
50 #include "PaletteManager.h"
Ritor1
parents:
diff changeset
51 #include "Party.h"
Ritor1
parents:
diff changeset
52 #include "AudioPlayer.h"
Ritor1
parents:
diff changeset
53 #include "VideoPlayer.h"
Ritor1
parents:
diff changeset
54 #include "Chest.h"
Ritor1
parents:
diff changeset
55 #include "Allocator.h"
Ritor1
parents:
diff changeset
56 #include "IndoorCamera.h"
Ritor1
parents:
diff changeset
57 #include "Party.h"
Ritor1
parents:
diff changeset
58 #include "Outdoor.h"
Ritor1
parents:
diff changeset
59
Ritor1
parents:
diff changeset
60 #include "mm7_data.h"
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 /* 285 */
Ritor1
parents:
diff changeset
70 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
71 struct stru289
Ritor1
parents:
diff changeset
72 {
Ritor1
parents:
diff changeset
73 //----- (0046263C) --------------------------------------------------------
Ritor1
parents:
diff changeset
74 inline stru289()
Ritor1
parents:
diff changeset
75 {
Ritor1
parents:
diff changeset
76 this->field_64 = 2;
Ritor1
parents:
diff changeset
77 this->field_74 = 0;
Ritor1
parents:
diff changeset
78 this->field_70 = 0;
Ritor1
parents:
diff changeset
79 this->field_6C = 0;
Ritor1
parents:
diff changeset
80 this->field_68 = 0;
Ritor1
parents:
diff changeset
81 }
Ritor1
parents:
diff changeset
82
Ritor1
parents:
diff changeset
83
Ritor1
parents:
diff changeset
84 char field_0[100];
Ritor1
parents:
diff changeset
85 int field_64;
Ritor1
parents:
diff changeset
86 int field_68;
Ritor1
parents:
diff changeset
87 int field_6C;
Ritor1
parents:
diff changeset
88 int field_70;
Ritor1
parents:
diff changeset
89 int field_74;
Ritor1
parents:
diff changeset
90 };
Ritor1
parents:
diff changeset
91 #pragma pack(pop)
Ritor1
parents:
diff changeset
92 extern stru289 stru_6BE158;
Ritor1
parents:
diff changeset
93
Ritor1
parents:
diff changeset
94
Ritor1
parents:
diff changeset
95
Ritor1
parents:
diff changeset
96 /* 288 */
Ritor1
parents:
diff changeset
97 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
98 struct CheckHRESULT_stru0
Ritor1
parents:
diff changeset
99 {
Ritor1
parents:
diff changeset
100 void CheckHRESULT(HRESULT a2, const char *Str, int a4, unsigned int uType);
Ritor1
parents:
diff changeset
101 void *_466D09_xcpt_string(std::string a2, const char *Str, int a4);
Ritor1
parents:
diff changeset
102 void ShowMessageBox(std::string *a0, std::string lpCaption, UINT uType, std::string lpText, int line);
Ritor1
parents:
diff changeset
103 char ddraw_error(HRESULT hr, char *Str, size_t a3);
Ritor1
parents:
diff changeset
104 char dinput_error(int a1, const char *Str, int a3);
Ritor1
parents:
diff changeset
105
Ritor1
parents:
diff changeset
106 void (__thiscall ***vdestructor_ptr)(CheckHRESULT_stru0 *, bool);
Ritor1
parents:
diff changeset
107 };
Ritor1
parents:
diff changeset
108 #pragma pack(pop)
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 /* 297 */
Ritor1
parents:
diff changeset
114 enum SoundType
Ritor1
parents:
diff changeset
115 {
Ritor1
parents:
diff changeset
116 SOUND_EndTurnBasedMode = 0xCE,
Ritor1
parents:
diff changeset
117 SOUND_StartTurnBasedMode = 0xCF,
Ritor1
parents:
diff changeset
118 SOUND_FlipOnExit = 0x4E21,
Ritor1
parents:
diff changeset
119 };
Ritor1
parents:
diff changeset
120
Ritor1
parents:
diff changeset
121
Ritor1
parents:
diff changeset
122
Ritor1
parents:
diff changeset
123 /* 362 */
Ritor1
parents:
diff changeset
124 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
125 struct TravelInfo
Ritor1
parents:
diff changeset
126 {
Ritor1
parents:
diff changeset
127 char uMapID;
Ritor1
parents:
diff changeset
128 char pSchedule[7];
Ritor1
parents:
diff changeset
129 char uDaysCount;
Ritor1
parents:
diff changeset
130 char field_9[3];
Ritor1
parents:
diff changeset
131 int x;
Ritor1
parents:
diff changeset
132 int y;
Ritor1
parents:
diff changeset
133 int z;
Ritor1
parents:
diff changeset
134 int direction;
Ritor1
parents:
diff changeset
135 int field_1C;
Ritor1
parents:
diff changeset
136 };
Ritor1
parents:
diff changeset
137 #pragma pack(pop)
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 /* 369 */
Ritor1
parents:
diff changeset
145 #pragma pack(push, 1)
299
b0db84628733 paperdoll array
Ritor1
parents: 187
diff changeset
146
0
Ritor1
parents:
diff changeset
147 #pragma pack(pop)
299
b0db84628733 paperdoll array
Ritor1
parents: 187
diff changeset
148 extern int paperdoll_Weapon[4][16][2];
0
Ritor1
parents:
diff changeset
149
513
3ee1e351e710 Some CharacterUI_LoadPaperdollTextures overflows
Nomad
parents: 481
diff changeset
150 /* 371 */ // stru331 - deleted
3ee1e351e710 Some CharacterUI_LoadPaperdollTextures overflows
Nomad
parents: 481
diff changeset
151
0
Ritor1
parents:
diff changeset
152
Ritor1
parents:
diff changeset
153 /* 372 */
Ritor1
parents:
diff changeset
154 #pragma pack(push, 1)
899
393a83dcc359 Paperdoll equipment error fixed
Ritor1
parents: 839
diff changeset
155 /*struct stru332
0
Ritor1
parents:
diff changeset
156 {
Ritor1
parents:
diff changeset
157 unsigned int texids[11];
513
3ee1e351e710 Some CharacterUI_LoadPaperdollTextures overflows
Nomad
parents: 481
diff changeset
158 int texid1;
3ee1e351e710 Some CharacterUI_LoadPaperdollTextures overflows
Nomad
parents: 481
diff changeset
159 int texid2;
3ee1e351e710 Some CharacterUI_LoadPaperdollTextures overflows
Nomad
parents: 481
diff changeset
160 int texid3;
3ee1e351e710 Some CharacterUI_LoadPaperdollTextures overflows
Nomad
parents: 481
diff changeset
161 int texid4;
3ee1e351e710 Some CharacterUI_LoadPaperdollTextures overflows
Nomad
parents: 481
diff changeset
162 int texid5;
899
393a83dcc359 Paperdoll equipment error fixed
Ritor1
parents: 839
diff changeset
163 };*/
0
Ritor1
parents:
diff changeset
164 #pragma pack(pop)
899
393a83dcc359 Paperdoll equipment error fixed
Ritor1
parents: 839
diff changeset
165 extern int paperdoll_helm_texture[2][16];
0
Ritor1
parents:
diff changeset
166
Ritor1
parents:
diff changeset
167
Ritor1
parents:
diff changeset
168 /* 373 */
Ritor1
parents:
diff changeset
169 #pragma pack(push, 1)
899
393a83dcc359 Paperdoll equipment error fixed
Ritor1
parents: 839
diff changeset
170 /*struct stru333
0
Ritor1
parents:
diff changeset
171 {
Ritor1
parents:
diff changeset
172 unsigned int texids[5];
513
3ee1e351e710 Some CharacterUI_LoadPaperdollTextures overflows
Nomad
parents: 481
diff changeset
173 int texid1;
3ee1e351e710 Some CharacterUI_LoadPaperdollTextures overflows
Nomad
parents: 481
diff changeset
174 int texid2;
899
393a83dcc359 Paperdoll equipment error fixed
Ritor1
parents: 839
diff changeset
175 };*/
0
Ritor1
parents:
diff changeset
176 #pragma pack(pop)
899
393a83dcc359 Paperdoll equipment error fixed
Ritor1
parents: 839
diff changeset
177 extern int paperdoll_belt_texture[2][7];
0
Ritor1
parents:
diff changeset
178
Ritor1
parents:
diff changeset
179
Ritor1
parents:
diff changeset
180 /* 374 */
Ritor1
parents:
diff changeset
181 #pragma pack(push, 1)
900
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
182 struct stat_coord
0
Ritor1
parents:
diff changeset
183 {
900
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
184 __int16 x;
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
185 __int16 y;
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
186 __int16 width;
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
187 __int16 height;
0
Ritor1
parents:
diff changeset
188 };
Ritor1
parents:
diff changeset
189 #pragma pack(pop)
900
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
190 extern stat_coord stat_string_coord[26];
0
Ritor1
parents:
diff changeset
191
Ritor1
parents:
diff changeset
192 /* 376 */
Ritor1
parents:
diff changeset
193 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
194 struct stru336
Ritor1
parents:
diff changeset
195 {
Ritor1
parents:
diff changeset
196 int field_0;
Ritor1
parents:
diff changeset
197 int field_4;
Ritor1
parents:
diff changeset
198 int field_8;
Ritor1
parents:
diff changeset
199 int field_C;
Ritor1
parents:
diff changeset
200 int field_10;
Ritor1
parents:
diff changeset
201 int field_14;
Ritor1
parents:
diff changeset
202 __int16 field_18[480];
Ritor1
parents:
diff changeset
203 __int16 field_3D8[480];
Ritor1
parents:
diff changeset
204 };
Ritor1
parents:
diff changeset
205 #pragma pack(pop)
Ritor1
parents:
diff changeset
206
Ritor1
parents:
diff changeset
207
Ritor1
parents:
diff changeset
208
Ritor1
parents:
diff changeset
209
Ritor1
parents:
diff changeset
210
Ritor1
parents:
diff changeset
211
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
Ritor1
parents:
diff changeset
217
Ritor1
parents:
diff changeset
218
Ritor1
parents:
diff changeset
219 /* 388 */
Ritor1
parents:
diff changeset
220 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
221 struct stru348
Ritor1
parents:
diff changeset
222 {
Ritor1
parents:
diff changeset
223 __int16 field_0;
Ritor1
parents:
diff changeset
224 __int16 field_2;
Ritor1
parents:
diff changeset
225 __int16 field_4;
Ritor1
parents:
diff changeset
226 __int16 field_6;
Ritor1
parents:
diff changeset
227 __int16 field_8;
Ritor1
parents:
diff changeset
228 __int16 field_A;
Ritor1
parents:
diff changeset
229 __int16 field_C;
Ritor1
parents:
diff changeset
230 __int16 field_E;
Ritor1
parents:
diff changeset
231 __int16 field_10;
Ritor1
parents:
diff changeset
232 __int16 field_12;
Ritor1
parents:
diff changeset
233 int field_14;
Ritor1
parents:
diff changeset
234 };
Ritor1
parents:
diff changeset
235 #pragma pack(pop)
Ritor1
parents:
diff changeset
236
Ritor1
parents:
diff changeset
237 extern stru348 stru_4E1890[13];
Ritor1
parents:
diff changeset
238
Ritor1
parents:
diff changeset
239
Ritor1
parents:
diff changeset
240
Ritor1
parents:
diff changeset
241