Mercurial > mm7
annotate MM7.h @ 831:9c3f28b31b4a
Party actions in blv
author | Nomad |
---|---|
date | Wed, 27 Mar 2013 15:04:59 +0200 |
parents | 0f56abdcce94 |
children | ae8f83e1b0cf |
rev | line source |
---|---|
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 | |
823 | 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 | 27 |
0 | 28 |
29 typedef unsigned __int16 _WORD; | |
30 typedef unsigned __int64 _QWORD; | |
31 | |
32 | |
33 #include "VectorTypes.h" | |
34 #include "IndoorCameraD3D.h" | |
35 /*#include "LOD.h" | |
36 #include "Texture.h" | |
37 #include "Mouse.h" | |
38 #include "Overlays.h" | |
39 #include "Game.h" | |
40 #include "Items.h" | |
41 #include "Actor.h" | |
42 #include "Arcomage.h" | |
43 #include "Render.h" | |
44 #include "Time.h" | |
45 #include "GUIWindow.h" | |
46 #include "GUIButton.h" | |
47 #include "GUIProgressBar.h" | |
48 #include "GUIFont.h" | |
49 #include "NPC.h" | |
50 #include "PaletteManager.h" | |
51 #include "Party.h" | |
52 #include "AudioPlayer.h" | |
53 #include "VideoPlayer.h" | |
54 #include "Chest.h" | |
55 #include "Allocator.h" | |
56 #include "IndoorCamera.h" | |
57 #include "Party.h" | |
58 #include "Outdoor.h" | |
59 | |
60 #include "mm7_data.h" | |
61 */ | |
62 | |
63 | |
64 | |
65 | |
66 | |
67 | |
68 | |
69 | |
70 | |
71 | |
72 | |
73 /* 154 */ | |
74 #pragma pack(push, 1) | |
75 struct stru161 | |
76 { | |
77 Vec3_int_ pos; | |
78 __int16 rot_y; | |
79 __int16 rot_x; | |
80 unsigned __int16 uMapInfoID; | |
81 __int16 field_12; | |
82 }; | |
83 #pragma pack(pop) | |
84 extern stru161 stru_4ECBB8[6]; // weak | |
85 | |
86 | |
87 | |
88 | |
89 | |
90 | |
91 | |
92 | |
93 | |
94 | |
95 | |
96 /* 285 */ | |
97 #pragma pack(push, 1) | |
98 struct stru289 | |
99 { | |
100 //----- (0046263C) -------------------------------------------------------- | |
101 inline stru289() | |
102 { | |
103 this->field_64 = 2; | |
104 this->field_74 = 0; | |
105 this->field_70 = 0; | |
106 this->field_6C = 0; | |
107 this->field_68 = 0; | |
108 } | |
109 | |
110 | |
111 char field_0[100]; | |
112 int field_64; | |
113 int field_68; | |
114 int field_6C; | |
115 int field_70; | |
116 int field_74; | |
117 }; | |
118 #pragma pack(pop) | |
119 extern stru289 stru_6BE158; | |
120 | |
121 | |
122 | |
123 /* 288 */ | |
124 #pragma pack(push, 1) | |
125 struct CheckHRESULT_stru0 | |
126 { | |
127 void CheckHRESULT(HRESULT a2, const char *Str, int a4, unsigned int uType); | |
128 void *_466D09_xcpt_string(std::string a2, const char *Str, int a4); | |
129 void ShowMessageBox(std::string *a0, std::string lpCaption, UINT uType, std::string lpText, int line); | |
130 char ddraw_error(HRESULT hr, char *Str, size_t a3); | |
131 char dinput_error(int a1, const char *Str, int a3); | |
132 | |
133 void (__thiscall ***vdestructor_ptr)(CheckHRESULT_stru0 *, bool); | |
134 }; | |
135 #pragma pack(pop) | |
136 | |
137 | |
138 | |
139 | |
140 /* 297 */ | |
141 enum SoundType | |
142 { | |
143 SOUND_EndTurnBasedMode = 0xCE, | |
144 SOUND_StartTurnBasedMode = 0xCF, | |
145 SOUND_FlipOnExit = 0x4E21, | |
146 }; | |
147 | |
148 | |
149 | |
150 /* 362 */ | |
151 #pragma pack(push, 1) | |
152 struct TravelInfo | |
153 { | |
154 char uMapID; | |
155 char pSchedule[7]; | |
156 char uDaysCount; | |
157 char field_9[3]; | |
158 int x; | |
159 int y; | |
160 int z; | |
161 int direction; | |
162 int field_1C; | |
163 }; | |
164 #pragma pack(pop) | |
165 | |
166 | |
167 | |
168 | |
169 | |
170 | |
171 /* 369 */ | |
172 #pragma pack(push, 1) | |
299 | 173 |
0 | 174 #pragma pack(pop) |
299 | 175 extern int paperdoll_Weapon[4][16][2]; |
0 | 176 |
513 | 177 /* 371 */ // stru331 - deleted |
178 | |
0 | 179 |
180 /* 372 */ | |
181 #pragma pack(push, 1) | |
182 struct stru332 | |
183 { | |
184 unsigned int texids[11]; | |
513 | 185 int texid1; |
186 int texid2; | |
187 int texid3; | |
188 int texid4; | |
189 int texid5; | |
0 | 190 }; |
191 #pragma pack(pop) | |
513 | 192 extern stru332 stru_511698[]; |
0 | 193 |
194 | |
195 /* 373 */ | |
196 #pragma pack(push, 1) | |
197 struct stru333 | |
198 { | |
199 unsigned int texids[5]; | |
513 | 200 int texid1; |
201 int texid2; | |
0 | 202 }; |
203 #pragma pack(pop) | |
513 | 204 extern stru333 stru_511718[]; |
0 | 205 |
206 | |
207 /* 374 */ | |
208 #pragma pack(push, 1) | |
209 struct stru334 | |
210 { | |
211 __int16 field_0; | |
212 __int16 field_2; | |
213 __int16 field_4; | |
214 __int16 field_6; | |
215 }; | |
216 #pragma pack(pop) | |
217 extern stru334 array_4E2940[26]; | |
218 | |
219 /* 376 */ | |
220 #pragma pack(push, 1) | |
221 struct stru336 | |
222 { | |
223 int field_0; | |
224 int field_4; | |
225 int field_8; | |
226 int field_C; | |
227 int field_10; | |
228 int field_14; | |
229 __int16 field_18[480]; | |
230 __int16 field_3D8[480]; | |
231 }; | |
232 #pragma pack(pop) | |
233 | |
234 | |
235 | |
236 | |
237 | |
238 | |
239 | |
240 | |
241 | |
242 | |
243 | |
244 | |
245 | |
246 /* 388 */ | |
247 #pragma pack(push, 1) | |
248 struct stru348 | |
249 { | |
250 __int16 field_0; | |
251 __int16 field_2; | |
252 __int16 field_4; | |
253 __int16 field_6; | |
254 __int16 field_8; | |
255 __int16 field_A; | |
256 __int16 field_C; | |
257 __int16 field_E; | |
258 __int16 field_10; | |
259 __int16 field_12; | |
260 int field_14; | |
261 }; | |
262 #pragma pack(pop) | |
263 | |
264 extern stru348 stru_4E1890[13]; | |
265 | |
266 | |
267 | |
268 |