Mercurial > mm7
annotate MM7.h @ 891:c684b3fb93eb
m
author | Ritor1 |
---|---|
date | Wed, 03 Apr 2013 10:01:45 +0600 |
parents | ae8f83e1b0cf |
children | 393a83dcc359 |
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 /* 285 */ | |
70 #pragma pack(push, 1) | |
71 struct stru289 | |
72 { | |
73 //----- (0046263C) -------------------------------------------------------- | |
74 inline stru289() | |
75 { | |
76 this->field_64 = 2; | |
77 this->field_74 = 0; | |
78 this->field_70 = 0; | |
79 this->field_6C = 0; | |
80 this->field_68 = 0; | |
81 } | |
82 | |
83 | |
84 char field_0[100]; | |
85 int field_64; | |
86 int field_68; | |
87 int field_6C; | |
88 int field_70; | |
89 int field_74; | |
90 }; | |
91 #pragma pack(pop) | |
92 extern stru289 stru_6BE158; | |
93 | |
94 | |
95 | |
96 /* 288 */ | |
97 #pragma pack(push, 1) | |
98 struct CheckHRESULT_stru0 | |
99 { | |
100 void CheckHRESULT(HRESULT a2, const char *Str, int a4, unsigned int uType); | |
101 void *_466D09_xcpt_string(std::string a2, const char *Str, int a4); | |
102 void ShowMessageBox(std::string *a0, std::string lpCaption, UINT uType, std::string lpText, int line); | |
103 char ddraw_error(HRESULT hr, char *Str, size_t a3); | |
104 char dinput_error(int a1, const char *Str, int a3); | |
105 | |
106 void (__thiscall ***vdestructor_ptr)(CheckHRESULT_stru0 *, bool); | |
107 }; | |
108 #pragma pack(pop) | |
109 | |
110 | |
111 | |
112 | |
113 /* 297 */ | |
114 enum SoundType | |
115 { | |
116 SOUND_EndTurnBasedMode = 0xCE, | |
117 SOUND_StartTurnBasedMode = 0xCF, | |
118 SOUND_FlipOnExit = 0x4E21, | |
119 }; | |
120 | |
121 | |
122 | |
123 /* 362 */ | |
124 #pragma pack(push, 1) | |
125 struct TravelInfo | |
126 { | |
127 char uMapID; | |
128 char pSchedule[7]; | |
129 char uDaysCount; | |
130 char field_9[3]; | |
131 int x; | |
132 int y; | |
133 int z; | |
134 int direction; | |
135 int field_1C; | |
136 }; | |
137 #pragma pack(pop) | |
138 | |
139 | |
140 | |
141 | |
142 | |
143 | |
144 /* 369 */ | |
145 #pragma pack(push, 1) | |
299 | 146 |
0 | 147 #pragma pack(pop) |
299 | 148 extern int paperdoll_Weapon[4][16][2]; |
0 | 149 |
513 | 150 /* 371 */ // stru331 - deleted |
151 | |
0 | 152 |
153 /* 372 */ | |
154 #pragma pack(push, 1) | |
155 struct stru332 | |
156 { | |
157 unsigned int texids[11]; | |
513 | 158 int texid1; |
159 int texid2; | |
160 int texid3; | |
161 int texid4; | |
162 int texid5; | |
0 | 163 }; |
164 #pragma pack(pop) | |
513 | 165 extern stru332 stru_511698[]; |
0 | 166 |
167 | |
168 /* 373 */ | |
169 #pragma pack(push, 1) | |
170 struct stru333 | |
171 { | |
172 unsigned int texids[5]; | |
513 | 173 int texid1; |
174 int texid2; | |
0 | 175 }; |
176 #pragma pack(pop) | |
513 | 177 extern stru333 stru_511718[]; |
0 | 178 |
179 | |
180 /* 374 */ | |
181 #pragma pack(push, 1) | |
182 struct stru334 | |
183 { | |
184 __int16 field_0; | |
185 __int16 field_2; | |
186 __int16 field_4; | |
187 __int16 field_6; | |
188 }; | |
189 #pragma pack(pop) | |
190 extern stru334 array_4E2940[26]; | |
191 | |
192 /* 376 */ | |
193 #pragma pack(push, 1) | |
194 struct stru336 | |
195 { | |
196 int field_0; | |
197 int field_4; | |
198 int field_8; | |
199 int field_C; | |
200 int field_10; | |
201 int field_14; | |
202 __int16 field_18[480]; | |
203 __int16 field_3D8[480]; | |
204 }; | |
205 #pragma pack(pop) | |
206 | |
207 | |
208 | |
209 | |
210 | |
211 | |
212 | |
213 | |
214 | |
215 | |
216 | |
217 | |
218 | |
219 /* 388 */ | |
220 #pragma pack(push, 1) | |
221 struct stru348 | |
222 { | |
223 __int16 field_0; | |
224 __int16 field_2; | |
225 __int16 field_4; | |
226 __int16 field_6; | |
227 __int16 field_8; | |
228 __int16 field_A; | |
229 __int16 field_C; | |
230 __int16 field_E; | |
231 __int16 field_10; | |
232 __int16 field_12; | |
233 int field_14; | |
234 }; | |
235 #pragma pack(pop) | |
236 | |
237 extern stru348 stru_4E1890[13]; | |
238 | |
239 | |
240 | |
241 |