Mercurial > mm7
comparison Actor.h @ 0:9c0607679772
init
author | Ritor1 |
---|---|
date | Sat, 12 Jan 2013 09:45:18 +0600 |
parents | |
children | cca78efb377e |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9c0607679772 |
---|---|
1 #pragma once | |
2 #include "VectorTypes.h" | |
3 #include "Items.h" | |
4 #include "Monsters.h" | |
5 #include "Spells.h" | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 /* 357 */ | |
13 #pragma pack(push, 1) | |
14 struct stru319 | |
15 { | |
16 void LootActor(struct Actor *pActor); | |
17 int which_player_would_attack(struct Actor *pActor); | |
18 bool special_ability_use_check(struct Actor *pActor, int a2); | |
19 int _427102(struct Actor *pActor, signed int a2); | |
20 int PlayerHitOrMiss(struct Player *pPlayer, struct Actor *pActor, int a3, int a4); | |
21 bool _4273BB(struct Actor *pActor, struct Actor *a2, int a3, int a4); | |
22 bool ActorHitOrMiss(struct Actor *pActor, struct Player *pPlayer); | |
23 int _427546(int a2); | |
24 int CalcMagicalDamageToActor(struct Actor *pActor, int a2, signed int a3); | |
25 bool GetMagicalResistance(struct Actor *pActor, unsigned int uType); | |
26 int FindClosesActor(int a2, int a3, int a4); | |
27 | |
28 char field_0; | |
29 }; | |
30 #pragma pack(pop) | |
31 | |
32 | |
33 extern stru319 stru_50C198; // idb | |
34 | |
35 | |
36 | |
37 | |
38 | |
39 | |
40 /* 361 */ | |
41 enum ACTOR_BUFF_INDEX | |
42 { | |
43 ACTOR_BUFF_STONED = 0x5, | |
44 ACTOR_BUFF_PARALYZED = 0x6, | |
45 }; | |
46 | |
47 | |
48 | |
49 | |
50 | |
51 /* 295 */ | |
52 enum ObjectType | |
53 { | |
54 OBJECT_unk0 = 0x0, | |
55 OBJECT_unk1 = 0x1, | |
56 OBJECT_Item = 0x2, | |
57 OBJECT_Actor = 0x3, | |
58 OBJECT_Player = 0x4, | |
59 OBJECT_Decoration = 0x5, | |
60 OBJECT_BModel = 0x6, | |
61 }; | |
62 | |
63 | |
64 | |
65 | |
66 | |
67 | |
68 | |
69 /* 337 */ | |
70 enum AI_OBJECT_TYPE | |
71 { | |
72 AI_OBJECT_LAYING_ITEM = 0x2, | |
73 AI_OBJECT_ACTOR = 0x3, | |
74 AI_OBJECT_PARTY = 0x4, | |
75 AI_OBJECT_DECORATION = 0x5, | |
76 }; | |
77 | |
78 /* 264 */ | |
79 enum AIState : unsigned __int16 | |
80 { | |
81 Standing = 0x0, | |
82 Tethered = 0x1, | |
83 AttackingMelee = 0x2, | |
84 AttackingRanged1 = 0x3, | |
85 Dying = 0x4, | |
86 Dead = 0x5, | |
87 Pursuing = 0x6, | |
88 Fleeing = 0x7, | |
89 Stunned = 0x8, | |
90 Fidgeting = 0x9, | |
91 Interacting = 0xA, | |
92 Removed = 0xB, | |
93 AttackingRanged2 = 0xC, | |
94 AttackingRanged3 = 0xD, | |
95 Stoned = 0xE, | |
96 Paralyzed = 0xF, | |
97 Resurrected = 0x10, | |
98 Summoned = 0x11, | |
99 AttackingRanged4 = 0x12, | |
100 Disabled = 0x13, | |
101 }; | |
102 | |
103 /* 265 */ | |
104 enum ActorAnimation : __int32 | |
105 { | |
106 ANIM_Standing = 0x0, | |
107 ANIM_Walking = 0x1, | |
108 ANIM_AtkMelee = 0x2, | |
109 ANIM_AtkRanged = 0x3, | |
110 ANIM_GotHit = 0x4, | |
111 ANIM_Dying = 0x5, | |
112 ANIM_Dead = 0x6, | |
113 ANIM_Bored = 0x7, | |
114 }; | |
115 | |
116 | |
117 | |
118 | |
119 | |
120 /* 247 */ | |
121 #pragma pack(push, 1) | |
122 struct AIDirection | |
123 { | |
124 Vec3_int_ vDirection; | |
125 unsigned int uDistance; | |
126 unsigned int uDistanceXZ; | |
127 unsigned int uYawAngle; | |
128 unsigned int uPitchAngle; | |
129 }; | |
130 #pragma pack(pop) | |
131 | |
132 | |
133 | |
134 | |
135 | |
136 /* 71 */ | |
137 #pragma pack(push, 1) | |
138 struct ActorJob | |
139 { | |
140 struct Vec3_short_ vPos; | |
141 unsigned __int16 uAttributes; | |
142 unsigned __int8 uAction; | |
143 unsigned __int8 uHour; | |
144 unsigned __int8 uDay; | |
145 unsigned __int8 uMonth; | |
146 }; | |
147 #pragma pack(pop) | |
148 | |
149 | |
150 /* 66 */ | |
151 #pragma pack(push, 1) | |
152 struct Actor | |
153 { | |
154 //----- (0041F4C1) -------------------------------------------------------- | |
155 inline Actor() | |
156 { | |
157 Actor *v1; // esi@1 | |
158 SpellBuff *v2; // eax@1 | |
159 signed int v3; // edx@1 | |
160 ItemGen *v4; // edi@3 | |
161 signed int v5; // ebx@3 | |
162 | |
163 v1 = this; | |
164 v2 = this->pActorBuffs; | |
165 v3 = 22; | |
166 do | |
167 { | |
168 v2->uSkill = 0; | |
169 v2->uPower = 0; | |
170 v2->uExpireTime = 0; | |
171 v2->uCaster = 0; | |
172 v2->uFlags = 0; | |
173 ++v2; | |
174 --v3; | |
175 } | |
176 while ( v3 ); | |
177 v4 = this->array_000234; | |
178 v5 = 4; | |
179 do | |
180 { | |
181 v4->Reset(); | |
182 ++v4; | |
183 --v5; | |
184 } | |
185 while ( v5 ); | |
186 Reset(); | |
187 } | |
188 | |
189 int _44FD29(int a2); | |
190 void Reset(); | |
191 void Remove(); | |
192 void PrepareSprites(char load_sounds_if_bit1_set); | |
193 unsigned int UpdateAnimation(); | |
194 signed int GetActorsRelation(Actor *a2); | |
195 void SetRandomGoldIfTheresNoItem(); | |
196 bool CanAct(); | |
197 bool IsAlive(); | |
198 void InitializeDialogue(int bPlayerSaysHello); | |
199 char _438B9B(); | |
200 | |
201 | |
202 static void __fastcall _401221(unsigned int uActorID, int *a2, unsigned int a3); | |
203 static unsigned int __fastcall _402686(unsigned int uActorID, unsigned int a2, signed int uActionLength, struct AIDirection *a4); | |
204 static int __fastcall _40281C(unsigned int uActorID, unsigned int a2, signed int uActionLength, struct AIDirection *pDir, int a5); | |
205 static unsigned int __fastcall _402968(unsigned int uActorID, signed int edx0, int uActionLength, struct AIDirection *a4); | |
206 static unsigned int __fastcall _402AD7(unsigned int uActorID, unsigned int a2, signed int arg0, signed int uActionLength, struct AIDirection *pDir); | |
207 static void __fastcall PlaySound(unsigned int uActorID, unsigned int uSoundID); | |
208 static void __fastcall Die(unsigned int uActorID); | |
209 static unsigned int __fastcall Resurrect(unsigned int uActorID); | |
210 static int __fastcall _402F87(unsigned int uActorID, unsigned int uObjID, struct AIDirection *a4); | |
211 static __int16 __fastcall _4030AD(unsigned int uActorID, signed int edx0, int arg0); | |
212 static char __fastcall _4031C1_update_job(unsigned int uActorID, signed int a2, int a3); | |
213 static void __fastcall _4032B2(unsigned int a1, unsigned int a2, int a3, int uActionLength); | |
214 static unsigned int __fastcall _403476(unsigned int uActorID, signed int edx0, struct AIDirection *pDir); | |
215 static unsigned int __fastcall _40368B(unsigned int uActorID, signed int edx0, struct AIDirection *pDir); | |
216 static unsigned int __fastcall _403854(unsigned int uActorID, signed int edx0, struct AIDirection *pDir); | |
217 static unsigned int __fastcall _403A60(unsigned int uActorID, signed int edx0, struct AIDirection *pDir); | |
218 static unsigned int __fastcall _403C6C(unsigned int uActorID, signed int edx0, struct AIDirection *arg0); | |
219 static void __fastcall StandAwhile(unsigned int uActorID); | |
220 static unsigned int __fastcall _403EB6(unsigned int uActorID, unsigned int a2, unsigned int uActionLength, struct AIDirection *a4); | |
221 static unsigned int __fastcall _403F58(unsigned int uActorID, signed int uObjID, int uActionLength, struct AIDirection *a4); | |
222 static unsigned int __fastcall FaceObject(unsigned int uActorID, unsigned int uObjID, int _48, struct AIDirection *a4); | |
223 static struct AIDirection *__fastcall GetDirectionInfo(unsigned int uObj1ID, unsigned int uObj2ID, struct AIDirection *pOut, int a4); | |
224 static signed int __fastcall Explode(unsigned int uActorID); | |
225 static char __fastcall _404874(unsigned int uActorID, struct AIDirection *a2, int a3, char a4); | |
226 static void __fastcall _404AC7(unsigned int uActorID, struct AIDirection *pDir, int spellnum, int a4, unsigned int uSkillLevel); | |
227 static void _43AC45(unsigned int uActorID, int a2); | |
228 static bool _43ABB0(Actor *a1, Actor *a2); | |
229 static bool StealFrom(unsigned int uActorID); | |
230 static void GiveItem(unsigned int uActorID, unsigned int uItemID, unsigned int bGive); | |
231 static void ToggleFlag(signed int uActorID, unsigned int uFlag, int bToggle); | |
232 static void _438CF3(unsigned int uActorID); | |
233 static void DrawHealthBar(Actor *a1, struct GUIWindow *a2); | |
234 static int _43B3E0_CalcDamage(Actor *a1, signed int a2); | |
235 static int AddBloodsplatOnDamageOverlay(unsigned int uActorID, int a2, signed int a3); | |
236 | |
237 | |
238 char pActorName[32]; | |
239 unsigned __int16 uNPC_ID; | |
240 __int16 field_22; | |
241 unsigned int uAttributes; | |
242 __int16 sCurrentHP; | |
243 char field_2A[2]; | |
244 struct MonsterInfo pMonsterInfo; | |
245 __int16 word_000084_range_attack; | |
246 __int16 word_000086_some_monster_id; | |
247 unsigned __int16 uActorRadius; | |
248 unsigned __int16 uActorHeight; | |
249 unsigned __int16 uMovementSpeed; | |
250 struct Vec3_short_ vPosition; | |
251 struct Vec3_short_ vVelocity; | |
252 unsigned __int16 uYawAngle; | |
253 unsigned __int16 uPitchAngle; | |
254 __int16 uSectorID; | |
255 unsigned __int16 uCurrentActionLength; | |
256 struct Vec3_short_ vInitialPosition; | |
257 struct Vec3_short_ vGuardingPosition; | |
258 unsigned __int16 uTetherDistance; | |
259 AIState uAIState; | |
260 unsigned __int16 uCurrentActionAnimation; | |
261 unsigned __int16 uCarriedItemID; | |
262 char field_B6; | |
263 char field_B7; | |
264 unsigned int uCurrentActionTime; | |
265 unsigned __int16 pSpriteIDs[8]; | |
266 unsigned __int16 pSoundSampleIDs[4]; | |
267 struct SpellBuff pActorBuffs[22]; | |
268 struct ItemGen array_000234[4]; | |
269 unsigned int uGroup; | |
270 unsigned int uAlly; | |
271 struct ActorJob pScheduledJobs[8]; | |
272 unsigned int uSummonerID; | |
273 unsigned int uLastCharacterIDToHit; | |
274 int dword_000334_unique_name; | |
275 char field_338[12]; | |
276 }; | |
277 #pragma pack(pop) | |
278 | |
279 | |
280 | |
281 | |
282 | |
283 | |
284 //extern Actor pMonsterInfoUI_Doll; | |
285 | |
286 | |
287 extern Actor pActors[500]; | |
288 extern size_t uNumActors; |