annotate Actor.h @ 2152:d44b7775fc06

Removed DirectDraw2 compatibility. 3D Sound enabled (change 3DSoundProvider registry entry to activate it). Moved all forward declarations to mm7_unsorted_subs.h (many cpp files do not need them anyweay).
author Nomad
date Thu, 09 Jan 2014 01:37:34 +0200
parents 0f62a2b8bd0a
children 5b27c035a241
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2 #include "Monsters.h"
Ritor1
parents:
diff changeset
3 #include "Spells.h"
1016
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 861
diff changeset
4 #include "Items.h"
0
Ritor1
parents:
diff changeset
5
Ritor1
parents:
diff changeset
6
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8
Ritor1
parents:
diff changeset
9
Ritor1
parents:
diff changeset
10
Ritor1
parents:
diff changeset
11 /* 357 */
Ritor1
parents:
diff changeset
12 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
13 struct stru319
Ritor1
parents:
diff changeset
14 {
1911
af38275939cc which_player_to_attack rename and cleaning
Ritor1
parents: 1897
diff changeset
15 int which_player_to_attack(struct Actor *pActor);
0
Ritor1
parents:
diff changeset
16 int PlayerHitOrMiss(struct Player *pPlayer, struct Actor *pActor, int a3, int a4);
Ritor1
parents:
diff changeset
17 bool ActorHitOrMiss(struct Actor *pActor, struct Player *pPlayer);
Ritor1
parents:
diff changeset
18 int _427546(int a2);
Ritor1
parents:
diff changeset
19 int CalcMagicalDamageToActor(struct Actor *pActor, int a2, signed int a3);
Ritor1
parents:
diff changeset
20 bool GetMagicalResistance(struct Actor *pActor, unsigned int uType);
271
1f0af5cac2dd _42ECB5_PlayerAttacksActor
Nomad
parents: 194
diff changeset
21 int FindClosestActor(int a2, int a3, int a4);
0
Ritor1
parents:
diff changeset
22
Ritor1
parents:
diff changeset
23 char field_0;
Ritor1
parents:
diff changeset
24 };
Ritor1
parents:
diff changeset
25 #pragma pack(pop)
Ritor1
parents:
diff changeset
26
Ritor1
parents:
diff changeset
27
Ritor1
parents:
diff changeset
28 extern stru319 stru_50C198; // idb
Ritor1
parents:
diff changeset
29
Ritor1
parents:
diff changeset
30
1972
3ef25d06b9b0 Actor::special_ability_use_check moved to Actor and cleaned up
Grumpy7
parents: 1971
diff changeset
31 enum ABILITY_INDEX
3ef25d06b9b0 Actor::special_ability_use_check moved to Actor and cleaned up
Grumpy7
parents: 1971
diff changeset
32 {
3ef25d06b9b0 Actor::special_ability_use_check moved to Actor and cleaned up
Grumpy7
parents: 1971
diff changeset
33 ABILITY_ATTACK1 = 0,
3ef25d06b9b0 Actor::special_ability_use_check moved to Actor and cleaned up
Grumpy7
parents: 1971
diff changeset
34 ABILITY_ATTACK2 = 1,
3ef25d06b9b0 Actor::special_ability_use_check moved to Actor and cleaned up
Grumpy7
parents: 1971
diff changeset
35 ABILITY_SPELL1 = 2,
3ef25d06b9b0 Actor::special_ability_use_check moved to Actor and cleaned up
Grumpy7
parents: 1971
diff changeset
36 ABILITY_SPELL2 = 3,
3ef25d06b9b0 Actor::special_ability_use_check moved to Actor and cleaned up
Grumpy7
parents: 1971
diff changeset
37 };
0
Ritor1
parents:
diff changeset
38
Ritor1
parents:
diff changeset
39
Ritor1
parents:
diff changeset
40
Ritor1
parents:
diff changeset
41 /* 361 */
Ritor1
parents:
diff changeset
42 enum ACTOR_BUFF_INDEX
Ritor1
parents:
diff changeset
43 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1519
diff changeset
44 ACTOR_BUFF_CHARM = 1,
a395359afc8f MonsterPopup
Ritor1
parents: 1519
diff changeset
45 ACTOR_BUFF_SUMMONED = 2,
a395359afc8f MonsterPopup
Ritor1
parents: 1519
diff changeset
46 ACTOR_BUFF_SHRINK = 3,
a395359afc8f MonsterPopup
Ritor1
parents: 1519
diff changeset
47 ACTOR_BUFF_AFRAID = 4,
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 141
diff changeset
48 ACTOR_BUFF_STONED = 5,
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1519
diff changeset
49 ACTOR_BUFF_PARALYZED = 6,
1875
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
50 ACTOR_BUFF_SLOWED = 7,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
51 ACTOR_BUFF_SOMETHING_THAT_HALVES_AC = 8,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
52 ACTOR_BUFF_BERSERK = 9,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
53 ACTOR_BUFF_MASS_DISTORTION = 10,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
54 ACTOR_BUFF_FATE = 11,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
55 ACTOR_BUFF_ENSLAVED = 12,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
56 ACTOR_BUFF_DAY_OF_PROTECTION = 13,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
57 ACTOR_BUFF_HOUR_OF_POWER = 14,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
58 ACTOR_BUFF_SHIELD = 15,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
59 ACTOR_BUFF_STONESKIN = 16,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
60 ACTOR_BUFF_BLESS = 17,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
61 ACTOR_BUFF_HEROISM = 18,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
62 ACTOR_BUFF_HASTE = 19,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
63 ACTOR_BUFF_PAIN_REFLECTION = 20,
1d9e4b50bc7c Actor::_43B3E0_CalcDamage cleaned up, fixed actor buff enums and added 2 values
Grumpy7
parents: 1864
diff changeset
64 ACTOR_BUFF_PAIN_HAMMERHANDS = 21,
0
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 /* 295 */
Ritor1
parents:
diff changeset
72 enum ObjectType
Ritor1
parents:
diff changeset
73 {
194
650d96af8855 Vis overhaul; sprites can be picked by mouse
Nomad
parents: 142
diff changeset
74 OBJECT_Any = 0x0,
141
cca78efb377e Constants -> enums
Nomad
parents: 0
diff changeset
75 OBJECT_BLVDoor = 0x1,
0
Ritor1
parents:
diff changeset
76 OBJECT_Item = 0x2,
Ritor1
parents:
diff changeset
77 OBJECT_Actor = 0x3,
Ritor1
parents:
diff changeset
78 OBJECT_Player = 0x4,
Ritor1
parents:
diff changeset
79 OBJECT_Decoration = 0x5,
Ritor1
parents:
diff changeset
80 OBJECT_BModel = 0x6,
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 /* 264 */
Ritor1
parents:
diff changeset
90 enum AIState : unsigned __int16
Ritor1
parents:
diff changeset
91 {
Ritor1
parents:
diff changeset
92 Standing = 0x0,
Ritor1
parents:
diff changeset
93 Tethered = 0x1,
Ritor1
parents:
diff changeset
94 AttackingMelee = 0x2,
Ritor1
parents:
diff changeset
95 AttackingRanged1 = 0x3,
Ritor1
parents:
diff changeset
96 Dying = 0x4,
Ritor1
parents:
diff changeset
97 Dead = 0x5,
Ritor1
parents:
diff changeset
98 Pursuing = 0x6,
Ritor1
parents:
diff changeset
99 Fleeing = 0x7,
Ritor1
parents:
diff changeset
100 Stunned = 0x8,
Ritor1
parents:
diff changeset
101 Fidgeting = 0x9,
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 141
diff changeset
102 Interacting = 10,
8b8fd4d83fdc Various things here and there
Nomad
parents: 141
diff changeset
103 Removed = 11,
0
Ritor1
parents:
diff changeset
104 AttackingRanged2 = 0xC,
Ritor1
parents:
diff changeset
105 AttackingRanged3 = 0xD,
Ritor1
parents:
diff changeset
106 Stoned = 0xE,
Ritor1
parents:
diff changeset
107 Paralyzed = 0xF,
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 141
diff changeset
108 Resurrected = 16,
141
cca78efb377e Constants -> enums
Nomad
parents: 0
diff changeset
109 Summoned = 17,
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 141
diff changeset
110 AttackingRanged4 = 18,
8b8fd4d83fdc Various things here and there
Nomad
parents: 141
diff changeset
111 Disabled = 19,
0
Ritor1
parents:
diff changeset
112 };
Ritor1
parents:
diff changeset
113
Ritor1
parents:
diff changeset
114 /* 265 */
Ritor1
parents:
diff changeset
115 enum ActorAnimation : __int32
Ritor1
parents:
diff changeset
116 {
Ritor1
parents:
diff changeset
117 ANIM_Standing = 0x0,
Ritor1
parents:
diff changeset
118 ANIM_Walking = 0x1,
Ritor1
parents:
diff changeset
119 ANIM_AtkMelee = 0x2,
Ritor1
parents:
diff changeset
120 ANIM_AtkRanged = 0x3,
Ritor1
parents:
diff changeset
121 ANIM_GotHit = 0x4,
Ritor1
parents:
diff changeset
122 ANIM_Dying = 0x5,
Ritor1
parents:
diff changeset
123 ANIM_Dead = 0x6,
Ritor1
parents:
diff changeset
124 ANIM_Bored = 0x7,
Ritor1
parents:
diff changeset
125 };
Ritor1
parents:
diff changeset
126
Ritor1
parents:
diff changeset
127
Ritor1
parents:
diff changeset
128
Ritor1
parents:
diff changeset
129
Ritor1
parents:
diff changeset
130
Ritor1
parents:
diff changeset
131 /* 247 */
Ritor1
parents:
diff changeset
132 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
133 struct AIDirection
Ritor1
parents:
diff changeset
134 {
Ritor1
parents:
diff changeset
135 Vec3_int_ vDirection;
Ritor1
parents:
diff changeset
136 unsigned int uDistance;
Ritor1
parents:
diff changeset
137 unsigned int uDistanceXZ;
Ritor1
parents:
diff changeset
138 unsigned int uYawAngle;
Ritor1
parents:
diff changeset
139 unsigned int uPitchAngle;
Ritor1
parents:
diff changeset
140 };
Ritor1
parents:
diff changeset
141 #pragma pack(pop)
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 /* 71 */
Ritor1
parents:
diff changeset
148 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
149 struct ActorJob
Ritor1
parents:
diff changeset
150 {
Ritor1
parents:
diff changeset
151 struct Vec3_short_ vPos;
Ritor1
parents:
diff changeset
152 unsigned __int16 uAttributes;
Ritor1
parents:
diff changeset
153 unsigned __int8 uAction;
Ritor1
parents:
diff changeset
154 unsigned __int8 uHour;
Ritor1
parents:
diff changeset
155 unsigned __int8 uDay;
Ritor1
parents:
diff changeset
156 unsigned __int8 uMonth;
Ritor1
parents:
diff changeset
157 };
Ritor1
parents:
diff changeset
158 #pragma pack(pop)
Ritor1
parents:
diff changeset
159
Ritor1
parents:
diff changeset
160
Ritor1
parents:
diff changeset
161 /* 66 */
Ritor1
parents:
diff changeset
162 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
163 struct Actor
Ritor1
parents:
diff changeset
164 {
Ritor1
parents:
diff changeset
165 //----- (0041F4C1) --------------------------------------------------------
Ritor1
parents:
diff changeset
166 inline Actor()
Ritor1
parents:
diff changeset
167 {
Ritor1
parents:
diff changeset
168 Actor *v1; // esi@1
Ritor1
parents:
diff changeset
169 SpellBuff *v2; // eax@1
Ritor1
parents:
diff changeset
170 signed int v3; // edx@1
Ritor1
parents:
diff changeset
171 ItemGen *v4; // edi@3
Ritor1
parents:
diff changeset
172 signed int v5; // ebx@3
Ritor1
parents:
diff changeset
173
Ritor1
parents:
diff changeset
174 v1 = this;
Ritor1
parents:
diff changeset
175 v2 = this->pActorBuffs;
Ritor1
parents:
diff changeset
176 v3 = 22;
Ritor1
parents:
diff changeset
177 do
Ritor1
parents:
diff changeset
178 {
Ritor1
parents:
diff changeset
179 v2->uSkill = 0;
Ritor1
parents:
diff changeset
180 v2->uPower = 0;
Ritor1
parents:
diff changeset
181 v2->uExpireTime = 0;
Ritor1
parents:
diff changeset
182 v2->uCaster = 0;
Ritor1
parents:
diff changeset
183 v2->uFlags = 0;
Ritor1
parents:
diff changeset
184 ++v2;
Ritor1
parents:
diff changeset
185 --v3;
Ritor1
parents:
diff changeset
186 }
Ritor1
parents:
diff changeset
187 while ( v3 );
Ritor1
parents:
diff changeset
188 v4 = this->array_000234;
Ritor1
parents:
diff changeset
189 v5 = 4;
Ritor1
parents:
diff changeset
190 do
Ritor1
parents:
diff changeset
191 {
Ritor1
parents:
diff changeset
192 v4->Reset();
Ritor1
parents:
diff changeset
193 ++v4;
Ritor1
parents:
diff changeset
194 --v5;
Ritor1
parents:
diff changeset
195 }
Ritor1
parents:
diff changeset
196 while ( v5 );
Ritor1
parents:
diff changeset
197 Reset();
Ritor1
parents:
diff changeset
198 }
Ritor1
parents:
diff changeset
199
1895
6b4e14436ee8 renaming Actor::_44FD29 to Actor::SummonMinion
Grumpy7
parents: 1894
diff changeset
200 void SummonMinion(int summonerId);
0
Ritor1
parents:
diff changeset
201 void Reset();
Ritor1
parents:
diff changeset
202 void Remove();
Ritor1
parents:
diff changeset
203 void PrepareSprites(char load_sounds_if_bit1_set);
322
ce39b96acf5c Killing friendly peasants subs
Nomad
parents: 319
diff changeset
204 void UpdateAnimation();
0
Ritor1
parents:
diff changeset
205 signed int GetActorsRelation(Actor *a2);
Ritor1
parents:
diff changeset
206 void SetRandomGoldIfTheresNoItem();
Ritor1
parents:
diff changeset
207 bool CanAct();
303
3dcc9d945eeb DamageMonsterFromParty
Nomad
parents: 271
diff changeset
208 bool IsNotAlive();
322
ce39b96acf5c Killing friendly peasants subs
Nomad
parents: 319
diff changeset
209 bool IsPeasant();
0
Ritor1
parents:
diff changeset
210
Ritor1
parents:
diff changeset
211
417
55684f4eda73 Actor::SelectTarget & ai_near_actors_targets_pid
Nomad
parents: 414
diff changeset
212 static void _SelectTarget(unsigned int uActorID, int *a2, bool can_target_party);
1060
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
213 static void AI_Pursue3(unsigned int uActorID, unsigned int a2, signed int uActionLength, struct AIDirection *a4);
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
214 static void AI_Pursue2(unsigned int uActorID, unsigned int a2, signed int uActionLength, struct AIDirection *pDir, int a5);
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
215 static void AI_Flee(unsigned int uActorID, signed int edx0, int uActionLength, struct AIDirection *a4);
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
216 static void AI_Pursue1(unsigned int uActorID, unsigned int a2, signed int arg0, signed int uActionLength, struct AIDirection *pDir);
322
ce39b96acf5c Killing friendly peasants subs
Nomad
parents: 319
diff changeset
217 static void PlaySound(unsigned int uActorID, unsigned int uSoundID);
319
5a66be213cff Actor::Die
Nomad
parents: 303
diff changeset
218 static void Die(unsigned int uActorID);
322
ce39b96acf5c Killing friendly peasants subs
Nomad
parents: 319
diff changeset
219 static void Resurrect(unsigned int uActorID);
414
d8b3056df4e2 AI_Bored
Nomad
parents: 413
diff changeset
220 static void AI_Bored(unsigned int uActorID, unsigned int uObjID, struct AIDirection *a4);
1060
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
221 static void AI_Stun(unsigned int uActorID, signed int edx0, int arg0);
1882
b3191dddab9f Actor::AI_Stun cleaned up, commented out the body of _4031C1_update_job
Grumpy7
parents: 1877
diff changeset
222 static char __fastcall _4031C1_update_job_never_gets_called(unsigned int uActorID, signed int a2, int a3);
1456
5c95f2246c2a TE mostly working
Gloval
parents: 1450
diff changeset
223 static void AI_RandomMove(unsigned int uActor_id, unsigned int uTarget_id, int radius, int uActionLength);
1060
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
224 static void AI_MissileAttack1(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
225 static void AI_MissileAttack2(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
226 static void AI_SpellAttack1(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
227 static void AI_SpellAttack2(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
228 static void AI_MeleeAttack(unsigned int uActorID, signed int sTargetPid, struct AIDirection *arg0);
0
Ritor1
parents:
diff changeset
229 static void __fastcall StandAwhile(unsigned int uActorID);
413
111f25d1cc04 AI_Stand
Nomad
parents: 411
diff changeset
230 static void AI_Stand(unsigned int uActorID, unsigned int object_to_face_pid, unsigned int uActionLength, struct AIDirection *a4);
414
d8b3056df4e2 AI_Bored
Nomad
parents: 413
diff changeset
231 static void AI_StandOrBored(unsigned int uActorID, signed int uObjID, int uActionLength, struct AIDirection *a4);
1060
b79139c3b5c8 some AI cleaning
zipi
parents: 1033
diff changeset
232 static void AI_FaceObject(unsigned int uActorID, unsigned int uObjID, int _48, struct AIDirection *a4);
1910
8d3723ca71e6 Actor::GetDirectionInfo changed the signature to a less confusing one
Grumpy7
parents: 1897
diff changeset
233 static void GetDirectionInfo(unsigned int uObj1ID, unsigned int uObj2ID, struct AIDirection *pOut, int a4);
1863
97b75e6100ff Actor::Explode cleaned up
Grumpy7
parents: 1862
diff changeset
234 static void Explode(unsigned int uActorID);
1862
a2bdc17ffd2f Actor::AI_RangedAttack cleaned up
Grumpy7
parents: 1861
diff changeset
235 static void AI_RangedAttack(unsigned int uActorID, struct AIDirection *a2, int type, char a4);
1861
a86c60679949 changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
Grumpy7
parents: 1859
diff changeset
236 static void AI_SpellAttack(unsigned int uActorID, struct AIDirection *pDir, int uSpellID, int a4, unsigned int uSkillLevel);
1859
f135ff4decbb Actor::AI_SpellAttack finishing cleanup
Grumpy7
parents: 1763
diff changeset
237
f135ff4decbb Actor::AI_SpellAttack finishing cleanup
Grumpy7
parents: 1763
diff changeset
238 static unsigned short GetObjDescId( int spellId );
f135ff4decbb Actor::AI_SpellAttack finishing cleanup
Grumpy7
parents: 1763
diff changeset
239
322
ce39b96acf5c Killing friendly peasants subs
Nomad
parents: 319
diff changeset
240 static void AggroSurroundingPeasants(unsigned int uActorID, int a2);
ce39b96acf5c Killing friendly peasants subs
Nomad
parents: 319
diff changeset
241 static bool ArePeasantsOfSameFaction(Actor *a1, Actor *a2);
1877
bed4532cfe59 Actor::StealFrom changed signature to void, minor cleanup
Grumpy7
parents: 1876
diff changeset
242 static void StealFrom(unsigned int uActorID);
526
214d9d47cf1f Chest working, but items are not laid correctly
Gloval
parents: 417
diff changeset
243 static void GiveItem(signed int uActorID, unsigned int uItemID, unsigned int bGive);
0
Ritor1
parents:
diff changeset
244 static void ToggleFlag(signed int uActorID, unsigned int uFlag, int bToggle);
322
ce39b96acf5c Killing friendly peasants subs
Nomad
parents: 319
diff changeset
245 static void ApplyFineForKillingPeasant(unsigned int uActorID);
1763
Ritor1
parents: 1705
diff changeset
246 static void DrawHealthBar(Actor *actor, struct GUIWindow *window);
1876
2070d01ccfae Actor::_43B3E0_CalcDamage changed to non-static
Grumpy7
parents: 1875
diff changeset
247 int _43B3E0_CalcDamage(signed int dmgSource);
322
ce39b96acf5c Killing friendly peasants subs
Nomad
parents: 319
diff changeset
248 static void AddBloodsplatOnDamageOverlay(unsigned int uActorID, int a2, signed int a3);
0
Ritor1
parents:
diff changeset
249
1897
436553b0603c _46DF1A_collide_against_actor cleaned up, moved to Actor.h
Grumpy7
parents: 1895
diff changeset
250 static bool _46DF1A_collide_against_actor(int a1, int a2);
1935
1cbfb6e50e48 moving _4BBF61_summon_actor under Actor
Grumpy7
parents: 1912
diff changeset
251 static void _4BBF61_summon_actor(int a1, __int16 x, int y, int z); // idb
0
Ritor1
parents:
diff changeset
252
1966
7840fe323f67 stru319::LootActor(struct Actor *pActor) to Actor::LootActor
Grumpy7
parents: 1940
diff changeset
253
7840fe323f67 stru319::LootActor(struct Actor *pActor) to Actor::LootActor
Grumpy7
parents: 1940
diff changeset
254 void LootActor();
1971
e45c277da9f1 Actor::_427102 to Actor::_427102_IsOkToCastSpell
Grumpy7
parents: 1970
diff changeset
255 bool _427102_IsOkToCastSpell(signed int a2);
1972
3ef25d06b9b0 Actor::special_ability_use_check moved to Actor and cleaned up
Grumpy7
parents: 1971
diff changeset
256 ABILITY_INDEX special_ability_use_check(int a2);
1974
0f62a2b8bd0a stru319::_4273BB moved to Actor::_4273BB, renamed to _4273BB_DoesHitOtherActor
Grumpy7
parents: 1972
diff changeset
257 bool _4273BB_DoesHitOtherActor(Actor *defender, int a3, int a4);
1966
7840fe323f67 stru319::LootActor(struct Actor *pActor) to Actor::LootActor
Grumpy7
parents: 1940
diff changeset
258
0
Ritor1
parents:
diff changeset
259 char pActorName[32];
602
628694cd5744 Margaret working
zipi
parents: 526
diff changeset
260 signed __int16 sNPC_ID;
0
Ritor1
parents:
diff changeset
261 __int16 field_22;
Ritor1
parents:
diff changeset
262 unsigned int uAttributes;
Ritor1
parents:
diff changeset
263 __int16 sCurrentHP;
Ritor1
parents:
diff changeset
264 char field_2A[2];
Ritor1
parents:
diff changeset
265 struct MonsterInfo pMonsterInfo;
Ritor1
parents:
diff changeset
266 __int16 word_000084_range_attack;
Ritor1
parents:
diff changeset
267 __int16 word_000086_some_monster_id;
Ritor1
parents:
diff changeset
268 unsigned __int16 uActorRadius;
Ritor1
parents:
diff changeset
269 unsigned __int16 uActorHeight;
Ritor1
parents:
diff changeset
270 unsigned __int16 uMovementSpeed;
Ritor1
parents:
diff changeset
271 struct Vec3_short_ vPosition;
Ritor1
parents:
diff changeset
272 struct Vec3_short_ vVelocity;
Ritor1
parents:
diff changeset
273 unsigned __int16 uYawAngle;
Ritor1
parents:
diff changeset
274 unsigned __int16 uPitchAngle;
Ritor1
parents:
diff changeset
275 __int16 uSectorID;
Ritor1
parents:
diff changeset
276 unsigned __int16 uCurrentActionLength;
Ritor1
parents:
diff changeset
277 struct Vec3_short_ vInitialPosition;
Ritor1
parents:
diff changeset
278 struct Vec3_short_ vGuardingPosition;
Ritor1
parents:
diff changeset
279 unsigned __int16 uTetherDistance;
Ritor1
parents:
diff changeset
280 AIState uAIState;
Ritor1
parents:
diff changeset
281 unsigned __int16 uCurrentActionAnimation;
Ritor1
parents:
diff changeset
282 unsigned __int16 uCarriedItemID;
Ritor1
parents:
diff changeset
283 char field_B6;
Ritor1
parents:
diff changeset
284 char field_B7;
Ritor1
parents:
diff changeset
285 unsigned int uCurrentActionTime;
Ritor1
parents:
diff changeset
286 unsigned __int16 pSpriteIDs[8];
417
55684f4eda73 Actor::SelectTarget & ai_near_actors_targets_pid
Nomad
parents: 414
diff changeset
287 unsigned __int16 pSoundSampleIDs[4]; // 1 die 3 bored
0
Ritor1
parents:
diff changeset
288 struct SpellBuff pActorBuffs[22];
Ritor1
parents:
diff changeset
289 struct ItemGen array_000234[4];
Ritor1
parents:
diff changeset
290 unsigned int uGroup;
Ritor1
parents:
diff changeset
291 unsigned int uAlly;
Ritor1
parents:
diff changeset
292 struct ActorJob pScheduledJobs[8];
Ritor1
parents:
diff changeset
293 unsigned int uSummonerID;
Ritor1
parents:
diff changeset
294 unsigned int uLastCharacterIDToHit;
Ritor1
parents:
diff changeset
295 int dword_000334_unique_name;
Ritor1
parents:
diff changeset
296 char field_338[12];
Ritor1
parents:
diff changeset
297 };
Ritor1
parents:
diff changeset
298 #pragma pack(pop)
Ritor1
parents:
diff changeset
299
Ritor1
parents:
diff changeset
300
Ritor1
parents:
diff changeset
301
Ritor1
parents:
diff changeset
302
Ritor1
parents:
diff changeset
303
Ritor1
parents:
diff changeset
304
Ritor1
parents:
diff changeset
305 //extern Actor pMonsterInfoUI_Doll;
Ritor1
parents:
diff changeset
306
1202
0dbf6c4dd029 arrays to std::arrays phase 1
Grumpy7
parents: 1060
diff changeset
307 extern std::array<Actor, 500> pActors;
1503
4ce525fe9ea9 Fix types.
yoctozepto
parents: 1456
diff changeset
308 extern size_t uNumActors;
1936
68f2d9d3a1d9 MSVS 2010 project file
Ritor1
parents: 1912
diff changeset
309
68f2d9d3a1d9 MSVS 2010 project file
Ritor1
parents: 1912
diff changeset
310 bool CheckActors_proximity();