World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Actor.h
См. документацию.
1 #pragma once
2 
3 #include "Engine/IocContainer.h"
4 
5 #include "../Spells/Spells.h"
6 #include "Items.h"
7 #include "Monsters.h"
8 
10 
11 /* 357 */
12 #pragma pack(push, 1)
13 struct stru319 {
14  inline stru319() {
15  this->vis = EngineIoc::ResolveVis();
16  }
17 
18  int which_player_to_attack(struct Actor *pActor);
19  int _427546(int a2);
20  int FindClosestActor(int a2, int a3, int a4);
21 
22  char field_0;
23 
24  Vis *vis = nullptr;
25 };
26 #pragma pack(pop)
27 
28 extern stru319 stru_50C198; // idb
29 
35 };
36 
37 /* 361 */
46  ACTOR_BUFF_SOMETHING_THAT_HALVES_AC = 8, // suspect gm axe effect??
60 };
61 
62 /* 295 */
63 enum ObjectType {
64  OBJECT_Any = 0x0,
66  OBJECT_Item = 0x2,
67  OBJECT_Actor = 0x3,
71 };
72 
73 /* 264 */
74 enum AIState : unsigned __int16 {
75  Standing = 0x0,
76  Tethered = 0x1,
79  Dying = 0x4,
80  Dead = 0x5,
81  Pursuing = 0x6,
82  Fleeing = 0x7,
83  Stunned = 0x8,
84  Fidgeting = 0x9,
86  Removed = 11,
89  Stoned = 0xE,
90  Paralyzed = 0xF,
92  Summoned = 17,
94  Disabled = 19,
95 };
96 
97 /* 265 */
98 enum ActorAnimation : __int32 {
103  ANIM_GotHit = 0x4,
104  ANIM_Dying = 0x5,
105  ANIM_Dead = 0x6,
106  ANIM_Bored = 0x7,
107 };
108 
109 #define ACTOR_VISIBLE 0x00000008
110 #define ACTOR_STAND_IN_QUEUE 0x00000080
111 #define ACTOR_ALIVE 0x00000400
112 #define ACTOR_ACTIVE 0x00004000
113 #define ACTOR_NEARBY 0x00008000
114 #define ACTOR_UNKNOW11 0x00010000 // aidisabled
115 #define ACTOR_FLEEING 0x00020000
116 #define ACTOR_UNKNOW5 0x00040000 // casting??
117 #define ACTOR_AGGRESSOR 0x00080000
118 #define ACTOR_UNKNOW7 0x00100000 // alertstatus
119 #define ACTOR_ANIMATION 0x00200000
120 #define ACTOR_UNKNOW9 0x00400000 // actor has job - never finished feature
121 #define ACTOR_HAS_ITEM 0x00800000
122 #define ACTOR_HOSTILE 0x01000000
123 
124 /* 247 */
125 #pragma pack(push, 1)
126 struct AIDirection {
127  Vec3_int_ vDirection;
128  unsigned int uDistance;
129  unsigned int uDistanceXZ;
130  unsigned int uYawAngle;
131  /*un*/signed int uPitchAngle;
132 };
133 #pragma pack(pop)
134 
135 /* 71 */
136 #pragma pack(push, 1)
137 struct ActorJob {
138  struct Vec3_short_ vPos;
139  unsigned __int16 uAttributes;
140  unsigned __int8 uAction;
141  unsigned __int8 uHour;
142  unsigned __int8 uDay;
143  unsigned __int8 uMonth;
144 };
145 #pragma pack(pop)
146 
147 class GUIWindow;
148 
149 /* 66 */
150 #pragma pack(push, 1)
151 struct Actor {
152  //----- (0041F4C1) --------------------------------------------------------
153  inline Actor() {
154  signed int i; // edx@1
155 
156  for (i = 0; i < 22; i++) {
157  this->pActorBuffs[i].uSkill = 0;
158  this->pActorBuffs[i].uPower = 0;
159  this->pActorBuffs[i].expire_time.value = 0;
160  this->pActorBuffs[i].uCaster = 0;
161  this->pActorBuffs[i].uFlags = 0;
162  }
163  for (i = 0; i < 4; i++) this->ActorHasItems[i].Reset();
164  Reset();
165  }
166 
167  void SummonMinion(int summonerId);
168  void Reset();
169  void Remove();
170  void PrepareSprites(char load_sounds_if_bit1_set);
171  void UpdateAnimation();
172  signed int GetActorsRelation(Actor *a2);
174  bool CanAct();
175  bool IsNotAlive();
176  bool IsPeasant();
177 
178  inline void ResetAnimation() { uAttributes &= 0xFFDFFFFF; }
179  inline void ResetQueue() { uAttributes &= ~ACTOR_STAND_IN_QUEUE; }
180  inline void ResetActive() { uAttributes &= 0xFFFFBFFF; }
181  inline void ResetAlive() { uAttributes &= 0xFFFFFBFF; }
182  inline void ResetHasItem() { uAttributes &= 0xFF7FFFFF; }
183  inline void ResetHostile() { uAttributes &= 0xFEFFFFFF; }
184  inline void ResetAggressor() { uAttributes &= 0xFFF7FFFF; }
185  inline bool ActorEnemy() const {
186  return (uAttributes & ACTOR_AGGRESSOR) != 0;
187  }
188  inline bool ActorFriend() const {
189  return (uAttributes & ACTOR_AGGRESSOR) == 0;
190  }
191  inline bool ActorHasItem() const {
192  return (uAttributes & ACTOR_HAS_ITEM) != 0;
193  }
194  inline bool ActorNearby() const {
195  return (uAttributes & ACTOR_NEARBY) != 0;
196  }
197 
198  static void _SelectTarget(unsigned int uActorID, int *a2,
199  bool can_target_party);
200  static void AI_Pursue3(unsigned int uActorID, unsigned int a2,
201  signed int uActionLength, struct AIDirection *a4);
202  static void AI_Pursue2(unsigned int uActorID, unsigned int a2,
203  signed int uActionLength, struct AIDirection *pDir,
204  int a5);
205  static void AI_Flee(unsigned int uActorID, signed int edx0,
206  int uActionLength, struct AIDirection *a4);
207  static void AI_Pursue1(unsigned int uActorID, unsigned int a2,
208  signed int arg0, signed int uActionLength,
209  struct AIDirection *pDir);
210  static void PlaySound(unsigned int uActorID, unsigned int uSoundID);
211  static void Die(unsigned int uActorID);
212  static void Resurrect(unsigned int uActorID);
213  static void AI_Bored(unsigned int uActorID, unsigned int uObjID,
214  struct AIDirection *a4);
215  static void AI_Stun(unsigned int uActorID, signed int edx0, int arg0);
216  static char _4031C1_update_job_never_gets_called(unsigned int uActorID,
217  signed int a2, int a3);
218  static void AI_RandomMove(unsigned int uActor_id, unsigned int uTarget_id,
219  int radius, int uActionLength);
220  static void AI_MissileAttack1(unsigned int uActorID, signed int sTargetPid,
221  struct AIDirection *pDir);
222  static void AI_MissileAttack2(unsigned int uActorID, signed int sTargetPid,
223  struct AIDirection *pDir);
224  static void AI_SpellAttack1(unsigned int uActorID, signed int sTargetPid,
225  struct AIDirection *pDir);
226  static void AI_SpellAttack2(unsigned int uActorID, signed int sTargetPid,
227  struct AIDirection *pDir);
228  static void AI_MeleeAttack(unsigned int uActorID, signed int sTargetPid,
229  struct AIDirection *arg0);
230  static void StandAwhile(unsigned int uActorID);
231  static void AI_Stand(unsigned int uActorID, unsigned int object_to_face_pid,
232  unsigned int uActionLength, struct AIDirection *a4);
233  static void AI_StandOrBored(unsigned int uActorID, signed int uObjID,
234  int uActionLength, struct AIDirection *a4);
235  static void AI_FaceObject(unsigned int uActorID, unsigned int uObjID,
236  int UNUSED, struct AIDirection *Dir_In);
237  static void GetDirectionInfo(unsigned int uObj1ID, unsigned int uObj2ID,
238  struct AIDirection *pOut, int a4);
239  static void Explode(unsigned int uActorID);
240  static void AI_RangedAttack(unsigned int uActorID, struct AIDirection *a2,
241  int type, char a4);
242  static void AI_SpellAttack(unsigned int uActorID, struct AIDirection *pDir,
243  int uSpellID, int a4, unsigned int uSkillLevel);
244  static void ActorDamageFromMonster(int attacker_id, unsigned int actor_id,
245  struct Vec3_int_ *pVelocity, int a4);
246 
247  static unsigned short GetObjDescId(int spellId);
248 
249  static void AggroSurroundingPeasants(unsigned int uActorID, int a2);
250  static bool ArePeasantsOfSameFaction(Actor *a1, Actor *a2);
251  static void StealFrom(unsigned int uActorID);
252  static void GiveItem(signed int uActorID, unsigned int uItemID,
253  unsigned int bGive);
254  static void ToggleFlag(signed int uActorID, unsigned int uFlag,
255  int bToggle);
256  static void ApplyFineForKillingPeasant(unsigned int uActorID);
257  static void DrawHealthBar(Actor *actor, GUIWindow *window);
258  int _43B3E0_CalcDamage(signed int dmgSource);
259  static void AddBloodsplatOnDamageOverlay(unsigned int uActorID, int a2,
260  int a3);
261 
262  static bool _46DF1A_collide_against_actor(int a1, int a2);
263  static void Arena_summon_actor(int monster_id, int16_t x, int y, int z);
264  static void DamageMonsterFromParty(int a1, unsigned int uActorID_Monster,
265  struct Vec3_int_ *pVelocity);
266  static void MakeActorAIList_ODM();
267  static int MakeActorAIList_BLV();
268  static void UpdateActorAI();
269  static void InitializeActors();
270  static unsigned int SearchAliveActors(unsigned int *pTotalActors);
271  static unsigned int SearchActorByMonsterID(unsigned int *pTotalActors,
272  int uMonsterID);
273  static unsigned int SearchActorByGroup(unsigned int *pTotalActors,
274  unsigned int uGroup);
275  static unsigned int SearchActorByID(unsigned int *pTotalActors,
276  unsigned int a2);
277 
278  void LootActor();
279  bool _427102_IsOkToCastSpell(enum SPELL_TYPE spell);
281  bool _4273BB_DoesHitOtherActor(Actor *defender, int a3, int a4);
282  bool ActorHitOrMiss(Player *pPlayer);
283  int CalcMagicalDamageToActor(DAMAGE_TYPE dmgType, int incomingDmg);
284  bool DoesDmgTypeDoDamage(DAMAGE_TYPE uType);
285 
286  char pActorName[32];
289  unsigned int uAttributes;
291  char field_2A[2];
294  int16_t word_000086_some_monster_id; // base monster class monsterlist id
298  struct Vec3_short_ vPosition;
299  struct Vec3_short_ vVelocity;
304  struct Vec3_short_ vInitialPosition;
305  struct Vec3_short_ vGuardingPosition;
310  char field_B6;
311  char field_B7;
312  unsigned int uCurrentActionTime;
314  uint16_t pSoundSampleIDs[4]; // 1 die 3 bored
315  struct SpellBuff pActorBuffs[22];
317  unsigned int uGroup;
318  unsigned int uAlly;
320  unsigned int uSummonerID;
321  unsigned int uLastCharacterIDToHit;
323  char field_338[12];
324 };
325 #pragma pack(pop)
326 
327 // extern Actor pMonsterInfoUI_Doll;
328 
329 extern std::array<Actor, 500> pActors;
330 extern size_t uNumActors;
331 
332 bool CheckActors_proximity();
333 int IsActorAlive(unsigned int uType, unsigned int uParam,
334  unsigned int uNumAlive); // idb
335 void sub_448518_npc_set_item(int npc, unsigned int item, int a3);
336 void ToggleActorGroupFlag(unsigned int uGroupID, unsigned int uFlag,
337  unsigned int bToggle);
338 bool sub_4070EF_prolly_detect_player(unsigned int uObjID, unsigned int uObj2ID);
339 bool SpawnActor(unsigned int uMonsterID);
340 int sub_44FA4C_spawn_light_elemental(int spell_power, int caster_skill_level,
341  int duration_game_seconds);
342 void SpawnEncounter(struct MapInfo *pMapInfo, struct SpawnPointMM7 *spawn,
343  int a3, int a4, int a5);
345 double sub_43AE12(signed int a1);
346 void ItemDamageFromActor(unsigned int uObjID, unsigned int uActorID,
347  struct Vec3_int_ *pVelocity);
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
ActorJob::uAttributes
unsigned __int16 uAttributes
Definition: Actor.h:139
Actor::pSoundSampleIDs
uint16_t pSoundSampleIDs[4]
Definition: Actor.h:314
Player
Definition: Player.h:401
Actor::CanAct
bool CanAct()
Definition: Actor.cpp:157
Actor::vPosition
struct Vec3_short_ vPosition
Definition: Actor.h:298
Engine_::IocContainer
Definition: IocContainer.h:15
Actor::ActorHasItems
struct ItemGen ActorHasItems[4]
Definition: Actor.h:316
AttackingRanged2
@ AttackingRanged2
Definition: Actor.h:87
Actor::AI_Stun
static void AI_Stun(unsigned int uActorID, signed int edx0, int arg0)
Definition: Actor.cpp:1815
Actor::StealFrom
static void StealFrom(unsigned int uActorID)
Definition: Actor.cpp:1385
Actor::ResetActive
void ResetActive()
Definition: Actor.h:180
Actor::AI_RandomMove
static void AI_RandomMove(unsigned int uActor_id, unsigned int uTarget_id, int radius, int uActionLength)
Definition: Actor.cpp:1696
IocContainer.h
AttackingMelee
@ AttackingMelee
Definition: Actor.h:77
AIDirection::uDistanceXZ
unsigned int uDistanceXZ
Definition: Actor.h:129
Actor::uActorHeight
uint16_t uActorHeight
Definition: Actor.h:296
Dying
@ Dying
Definition: Actor.h:79
int16_t
signed __int16 int16_t
Definition: SDL_config.h:36
ANIM_GotHit
@ ANIM_GotHit
Definition: Actor.h:103
ACTOR_BUFF_PAIN_REFLECTION
@ ACTOR_BUFF_PAIN_REFLECTION
Definition: Actor.h:58
Actor::uPitchAngle
uint16_t uPitchAngle
Definition: Actor.h:301
Actor::UpdateAnimation
void UpdateAnimation()
Definition: Actor.cpp:2376
Actor::ArePeasantsOfSameFaction
static bool ArePeasantsOfSameFaction(Actor *a1, Actor *a2)
Definition: Actor.cpp:700
Actor::ToggleFlag
static void ToggleFlag(signed int uActorID, unsigned int uFlag, int bToggle)
Definition: Actor.cpp:112
Actor::AI_StandOrBored
static void AI_StandOrBored(unsigned int uActorID, signed int uObjID, int uActionLength, struct AIDirection *a4)
Definition: Actor.cpp:1100
GUIWindow
Definition: GUIWindow.h:433
Actor::DoesDmgTypeDoDamage
bool DoesDmgTypeDoDamage(DAMAGE_TYPE uType)
Definition: Actor.cpp:4381
Items.h
Monsters.h
ABILITY_ATTACK1
@ ABILITY_ATTACK1
Definition: Actor.h:31
Actor::dword_000334_unique_name
int dword_000334_unique_name
Definition: Actor.h:322
Actor::AI_MeleeAttack
static void AI_MeleeAttack(unsigned int uActorID, signed int sTargetPid, struct AIDirection *arg0)
Definition: Actor.cpp:1148
OBJECT_Item
@ OBJECT_Item
Definition: Actor.h:66
Actor::SearchActorByGroup
static unsigned int SearchActorByGroup(unsigned int *pTotalActors, unsigned int uGroup)
Definition: Actor.cpp:3283
SpellBuff
Definition: Spells.h:147
sub_43AE12
double sub_43AE12(signed int a1)
Definition: Actor.cpp:5528
z
GLdouble GLdouble z
Definition: SDL_opengl_glext.h:407
ACTOR_BUFF_DAY_OF_PROTECTION
@ ACTOR_BUFF_DAY_OF_PROTECTION
Definition: Actor.h:51
Actor::AI_Pursue1
static void AI_Pursue1(unsigned int uActorID, unsigned int a2, signed int arg0, signed int uActionLength, struct AIDirection *pDir)
Definition: Actor.cpp:2003
Actor::PlaySound
static void PlaySound(unsigned int uActorID, unsigned int uSoundID)
Definition: Actor.cpp:1974
Actor::AI_SpellAttack
static void AI_SpellAttack(unsigned int uActorID, struct AIDirection *pDir, int uSpellID, int a4, unsigned int uSkillLevel)
Definition: Actor.cpp:199
sub_44FA4C_spawn_light_elemental
int sub_44FA4C_spawn_light_elemental(int spell_power, int caster_skill_level, int duration_game_seconds)
Definition: Actor.cpp:4969
ANIM_Standing
@ ANIM_Standing
Definition: Actor.h:99
Actor
Definition: Actor.h:151
Actor::Reset
void Reset()
Definition: Actor.cpp:2443
ActorJob::vPos
struct Vec3_short_ vPos
Definition: Actor.h:138
SpellBuff::uSkill
unsigned __int16 uSkill
Definition: Spells.h:167
Paralyzed
@ Paralyzed
Definition: Actor.h:90
Actor::vVelocity
struct Vec3_short_ vVelocity
Definition: Actor.h:299
Actor::uCarriedItemID
uint16_t uCarriedItemID
Definition: Actor.h:309
Actor::AI_MissileAttack1
static void AI_MissileAttack1(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
Definition: Actor.cpp:1626
ACTOR_BUFF_HEROISM
@ ACTOR_BUFF_HEROISM
Definition: Actor.h:56
Actor::AI_FaceObject
static void AI_FaceObject(unsigned int uActorID, unsigned int uObjID, int UNUSED, struct AIDirection *Dir_In)
Definition: Actor.cpp:1072
ANIM_Dying
@ ANIM_Dying
Definition: Actor.h:104
ABILITY_INDEX
ABILITY_INDEX
Definition: Actor.h:30
Actor::IsPeasant
bool IsPeasant()
Definition: Actor.cpp:1369
Actor::ResetAlive
void ResetAlive()
Definition: Actor.h:181
SpawnActor
bool SpawnActor(unsigned int uMonsterID)
Definition: Actor.cpp:4922
Actor::CalcMagicalDamageToActor
int CalcMagicalDamageToActor(DAMAGE_TYPE dmgType, int incomingDmg)
Definition: Actor.cpp:4314
ActorJob::uMonth
unsigned __int8 uMonth
Definition: Actor.h:143
Standing
@ Standing
Definition: Actor.h:75
Actor::_4031C1_update_job_never_gets_called
static char _4031C1_update_job_never_gets_called(unsigned int uActorID, signed int a2, int a3)
Definition: Actor.cpp:1754
AttackingRanged4
@ AttackingRanged4
Definition: Actor.h:93
Actor::field_B7
char field_B7
Definition: Actor.h:311
SpawnPointMM7
Definition: Indoor.h:304
ACTOR_BUFF_SLOWED
@ ACTOR_BUFF_SLOWED
Definition: Actor.h:45
Actor::ActorHitOrMiss
bool ActorHitOrMiss(Player *pPlayer)
Definition: Actor.cpp:4293
OBJECT_Decoration
@ OBJECT_Decoration
Definition: Actor.h:69
Actor::Die
static void Die(unsigned int uActorID)
Definition: Actor.cpp:1906
AttackingRanged1
@ AttackingRanged1
Definition: Actor.h:78
Actor::uGroup
unsigned int uGroup
Definition: Actor.h:317
SPELL_TYPE
SPELL_TYPE
Definition: Spells.h:10
GameTime::value
int64_t value
Definition: Time.h:99
Actor::UpdateActorAI
static void UpdateActorAI()
Definition: Actor.cpp:2745
Actor::AI_Stand
static void AI_Stand(unsigned int uActorID, unsigned int object_to_face_pid, unsigned int uActionLength, struct AIDirection *a4)
Definition: Actor.cpp:1109
Actor::_46DF1A_collide_against_actor
static bool _46DF1A_collide_against_actor(int a1, int a2)
Definition: Actor.cpp:2699
ACTOR_BUFF_AFRAID
@ ACTOR_BUFF_AFRAID
Definition: Actor.h:42
ACTOR_BUFF_FATE
@ ACTOR_BUFF_FATE
Definition: Actor.h:49
Dead
@ Dead
Definition: Actor.h:80
Resurrected
@ Resurrected
Definition: Actor.h:91
ACTOR_BUFF_SHRINK
@ ACTOR_BUFF_SHRINK
Definition: Actor.h:41
Tethered
@ Tethered
Definition: Actor.h:76
AIDirection
Definition: Actor.h:126
Actor::uAIState
AIState uAIState
Definition: Actor.h:307
Actor::AI_SpellAttack2
static void AI_SpellAttack2(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
Definition: Actor.cpp:1412
OBJECT_Actor
@ OBJECT_Actor
Definition: Actor.h:67
ToggleActorGroupFlag
void ToggleActorGroupFlag(unsigned int uGroupID, unsigned int uFlag, unsigned int bToggle)
Definition: Actor.cpp:4426
Stoned
@ Stoned
Definition: Actor.h:89
Actor::AI_RangedAttack
static void AI_RangedAttack(unsigned int uActorID, struct AIDirection *a2, int type, char a4)
Definition: Actor.cpp:747
Actor::ApplyFineForKillingPeasant
static void ApplyFineForKillingPeasant(unsigned int uActorID)
Definition: Actor.cpp:1223
Actor::Actor
Actor()
Definition: Actor.h:153
stru319::which_player_to_attack
int which_player_to_attack(struct Actor *pActor)
Definition: Actor.cpp:3754
Actor::StandAwhile
static void StandAwhile(unsigned int uActorID)
Definition: Actor.cpp:1137
Actor::uLastCharacterIDToHit
unsigned int uLastCharacterIDToHit
Definition: Actor.h:321
SpawnEncounter
void SpawnEncounter(struct MapInfo *pMapInfo, struct SpawnPointMM7 *spawn, int a3, int a4, int a5)
Definition: Actor.cpp:5063
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
AIDirection::uYawAngle
unsigned int uYawAngle
Definition: Actor.h:130
CheckActors_proximity
bool CheckActors_proximity()
Definition: Actor.cpp:4034
Actor::field_B6
char field_B6
Definition: Actor.h:310
DAMAGE_TYPE
DAMAGE_TYPE
Definition: Items.h:10
Engine_::IocContainer::ResolveVis
static Vis * ResolveVis()
Definition: IocContainer.cpp:110
Actor::field_2A
char field_2A[2]
Definition: Actor.h:291
Fidgeting
@ Fidgeting
Definition: Actor.h:84
Actor::uCurrentActionTime
unsigned int uCurrentActionTime
Definition: Actor.h:312
ACTOR_BUFF_CHARM
@ ACTOR_BUFF_CHARM
Definition: Actor.h:39
ACTOR_BUFF_PARALYZED
@ ACTOR_BUFF_PARALYZED
Definition: Actor.h:44
Actor::AI_Pursue2
static void AI_Pursue2(unsigned int uActorID, unsigned int a2, signed int uActionLength, struct AIDirection *pDir, int a5)
Definition: Actor.cpp:2114
ACTOR_BUFF_MASS_DISTORTION
@ ACTOR_BUFF_MASS_DISTORTION
Definition: Actor.h:48
Vis
Definition: Vis.h:69
Actor::ResetHostile
void ResetHostile()
Definition: Actor.h:183
Actor::ResetQueue
void ResetQueue()
Definition: Actor.h:179
OBJECT_BModel
@ OBJECT_BModel
Definition: Actor.h:70
stru319::vis
Vis * vis
Definition: Actor.h:24
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
Actor::LootActor
void LootActor()
Definition: Actor.cpp:4064
ABILITY_SPELL2
@ ABILITY_SPELL2
Definition: Actor.h:34
Actor::SetRandomGoldIfTheresNoItem
void SetRandomGoldIfTheresNoItem()
Definition: Actor.cpp:174
Disabled
@ Disabled
Definition: Actor.h:94
stru319::stru319
stru319()
Definition: Actor.h:14
Actor::uAttributes
unsigned int uAttributes
Definition: Actor.h:289
Actor::special_ability_use_check
ABILITY_INDEX special_ability_use_check(int a2)
Definition: Actor.cpp:4237
ACTOR_BUFF_SOMETHING_THAT_HALVES_AC
@ ACTOR_BUFF_SOMETHING_THAT_HALVES_AC
Definition: Actor.h:46
IsActorAlive
int IsActorAlive(unsigned int uType, unsigned int uParam, unsigned int uNumAlive)
Definition: Actor.cpp:3240
ActorJob::uDay
unsigned __int8 uDay
Definition: Actor.h:142
Actor::Resurrect
static void Resurrect(unsigned int uActorID)
Definition: Actor.cpp:1890
ABILITY_SPELL1
@ ABILITY_SPELL1
Definition: Actor.h:33
area_of_effect__damage_evaluate
void area_of_effect__damage_evaluate()
Definition: Actor.cpp:5320
ObjectType
ObjectType
Definition: Actor.h:63
Actor::uTetherDistance
uint16_t uTetherDistance
Definition: Actor.h:306
ACTOR_BUFF_HASTE
@ ACTOR_BUFF_HASTE
Definition: Actor.h:57
Actor::Remove
void Remove()
Definition: Actor.cpp:2504
Actor::GetDirectionInfo
static void GetDirectionInfo(unsigned int uObj1ID, unsigned int uObj2ID, struct AIDirection *pOut, int a4)
Definition: Actor.cpp:890
Actor::uActorRadius
uint16_t uActorRadius
Definition: Actor.h:295
Actor::MakeActorAIList_ODM
static void MakeActorAIList_ODM()
Definition: Actor.cpp:4457
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
Actor::SearchAliveActors
static unsigned int SearchAliveActors(unsigned int *pTotalActors)
Definition: Actor.cpp:3318
ANIM_Dead
@ ANIM_Dead
Definition: Actor.h:105
type
EGLenum type
Definition: SDL_egl.h:850
Actor::sNPC_ID
int16_t sNPC_ID
Definition: Actor.h:287
Actor::pSpriteIDs
uint16_t pSpriteIDs[8]
Definition: Actor.h:313
Actor::IsNotAlive
bool IsNotAlive()
Definition: Actor.cpp:166
Actor::uSummonerID
unsigned int uSummonerID
Definition: Actor.h:320
Actor::ResetHasItem
void ResetHasItem()
Definition: Actor.h:182
ABILITY_ATTACK2
@ ABILITY_ATTACK2
Definition: Actor.h:32
ANIM_AtkMelee
@ ANIM_AtkMelee
Definition: Actor.h:101
MapInfo
Definition: MapInfo.h:35
Actor::word_000084_range_attack
int16_t word_000084_range_attack
Definition: Actor.h:293
Actor::AddBloodsplatOnDamageOverlay
static void AddBloodsplatOnDamageOverlay(unsigned int uActorID, int a2, int a3)
Definition: Actor.cpp:1257
Actor::_SelectTarget
static void _SelectTarget(unsigned int uActorID, int *a2, bool can_target_party)
Definition: Actor.cpp:2230
ActorAnimation
ActorAnimation
Definition: Actor.h:98
SpellBuff::expire_time
GameTime expire_time
Definition: Spells.h:165
AIDirection::uDistance
unsigned int uDistance
Definition: Actor.h:128
Actor::Arena_summon_actor
static void Arena_summon_actor(int monster_id, int16_t x, int y, int z)
Definition: Actor.cpp:3697
Actor::uSectorID
int16_t uSectorID
Definition: Actor.h:302
Removed
@ Removed
Definition: Actor.h:86
Interacting
@ Interacting
Definition: Actor.h:85
Actor::_4273BB_DoesHitOtherActor
bool _4273BB_DoesHitOtherActor(Actor *defender, int a3, int a4)
Definition: Actor.cpp:4262
stru319::FindClosestActor
int FindClosestActor(int a2, int a3, int a4)
Definition: Actor.cpp:3876
AIDirection::uPitchAngle
signed int uPitchAngle
Definition: Actor.h:131
Actor::SearchActorByMonsterID
static unsigned int SearchActorByMonsterID(unsigned int *pTotalActors, int uMonsterID)
Definition: Actor.cpp:3300
Actor::AI_Pursue3
static void AI_Pursue3(unsigned int uActorID, unsigned int a2, signed int uActionLength, struct AIDirection *a4)
Definition: Actor.cpp:2171
Actor::ActorDamageFromMonster
static void ActorDamageFromMonster(int attacker_id, unsigned int actor_id, struct Vec3_int_ *pVelocity, int a4)
Definition: Actor.cpp:2507
stru319::_427546
int _427546(int a2)
Definition: Actor.cpp:3862
OBJECT_Player
@ OBJECT_Player
Definition: Actor.h:68
Summoned
@ Summoned
Definition: Actor.h:92
ACTOR_BUFF_HOUR_OF_POWER
@ ACTOR_BUFF_HOUR_OF_POWER
Definition: Actor.h:52
Actor::vInitialPosition
struct Vec3_short_ vInitialPosition
Definition: Actor.h:304
sub_4070EF_prolly_detect_player
bool sub_4070EF_prolly_detect_player(unsigned int uObjID, unsigned int uObj2ID)
Definition: Actor.cpp:4688
Actor::ResetAnimation
void ResetAnimation()
Definition: Actor.h:178
Actor::ActorFriend
bool ActorFriend() const
Definition: Actor.h:188
ACTOR_BUFF_SHIELD
@ ACTOR_BUFF_SHIELD
Definition: Actor.h:53
Actor::ActorEnemy
bool ActorEnemy() const
Definition: Actor.h:185
Actor::sCurrentHP
int16_t sCurrentHP
Definition: Actor.h:290
SpellBuff::uCaster
unsigned __int8 uCaster
Definition: Spells.h:169
Actor::AggroSurroundingPeasants
static void AggroSurroundingPeasants(unsigned int uActorID, int a2)
Definition: Actor.cpp:717
ACTOR_BUFF_STONED
@ ACTOR_BUFF_STONED
Definition: Actor.h:43
ANIM_Bored
@ ANIM_Bored
Definition: Actor.h:106
stru319
Definition: Actor.h:13
ActorJob::uAction
unsigned __int8 uAction
Definition: Actor.h:140
Actor::Explode
static void Explode(unsigned int uActorID)
Definition: Actor.cpp:850
ActorJob::uHour
unsigned __int8 uHour
Definition: Actor.h:141
Actor::vGuardingPosition
struct Vec3_short_ vGuardingPosition
Definition: Actor.h:305
ANIM_Walking
@ ANIM_Walking
Definition: Actor.h:100
pActors
std::array< Actor, 500 > pActors
Definition: Actor.cpp:38
stru319::field_0
char field_0
Definition: Actor.h:22
Fleeing
@ Fleeing
Definition: Actor.h:82
Actor::AI_Flee
static void AI_Flee(unsigned int uActorID, signed int edx0, int uActionLength, struct AIDirection *a4)
Definition: Actor.cpp:2070
Actor::_43B3E0_CalcDamage
int _43B3E0_CalcDamage(signed int dmgSource)
Definition: Actor.cpp:1314
Actor::AI_MissileAttack2
static void AI_MissileAttack2(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
Definition: Actor.cpp:1561
Actor::ResetAggressor
void ResetAggressor()
Definition: Actor.h:184
SpellBuff::uPower
unsigned __int16 uPower
Definition: Spells.h:166
Actor::GetActorsRelation
signed int GetActorsRelation(Actor *a2)
Definition: Actor.cpp:2319
Actor::MakeActorAIList_BLV
static int MakeActorAIList_BLV()
Definition: Actor.cpp:4556
OBJECT_Any
@ OBJECT_Any
Definition: Actor.h:64
OBJECT_BLVDoor
@ OBJECT_BLVDoor
Definition: Actor.h:65
Actor::uAlly
unsigned int uAlly
Definition: Actor.h:318
Actor::ActorHasItem
bool ActorHasItem() const
Definition: Actor.h:191
ItemDamageFromActor
void ItemDamageFromActor(unsigned int uObjID, unsigned int uActorID, struct Vec3_int_ *pVelocity)
Definition: Actor.cpp:5553
Actor::GiveItem
static void GiveItem(signed int uActorID, unsigned int uItemID, unsigned int bGive)
Definition: Actor.cpp:134
ACTOR_BUFF_SUMMONED
@ ACTOR_BUFF_SUMMONED
Definition: Actor.h:40
ANIM_AtkRanged
@ ANIM_AtkRanged
Definition: Actor.h:102
Actor::SearchActorByID
static unsigned int SearchActorByID(unsigned int *pTotalActors, unsigned int a2)
Definition: Actor.cpp:3268
Actor::uCurrentActionLength
uint16_t uCurrentActionLength
Definition: Actor.h:303
Actor::uMovementSpeed
uint16_t uMovementSpeed
Definition: Actor.h:297
AIState
AIState
Definition: Actor.h:74
Actor::pActorName
char pActorName[32]
Definition: Actor.h:286
ACTOR_BUFF_STONESKIN
@ ACTOR_BUFF_STONESKIN
Definition: Actor.h:54
ACTOR_BUFF_BLESS
@ ACTOR_BUFF_BLESS
Definition: Actor.h:55
Actor::uYawAngle
uint16_t uYawAngle
Definition: Actor.h:300
ItemGen
Definition: Items.h:263
Actor::GetObjDescId
static unsigned short GetObjDescId(int spellId)
Definition: Actor.cpp:696
Actor::AI_Bored
static void AI_Bored(unsigned int uActorID, unsigned int uObjID, struct AIDirection *a4)
Definition: Actor.cpp:1853
Actor::PrepareSprites
void PrepareSprites(char load_sounds_if_bit1_set)
Definition: Actor.cpp:2481
Actor::field_22
int16_t field_22
Definition: Actor.h:288
ACTOR_BUFF_PAIN_HAMMERHANDS
@ ACTOR_BUFF_PAIN_HAMMERHANDS
Definition: Actor.h:59
ACTOR_BUFF_BERSERK
@ ACTOR_BUFF_BERSERK
Definition: Actor.h:47
Actor::field_338
char field_338[12]
Definition: Actor.h:323
Actor::uCurrentActionAnimation
uint16_t uCurrentActionAnimation
Definition: Actor.h:308
sub_448518_npc_set_item
void sub_448518_npc_set_item(int npc, unsigned int item, int a3)
Definition: Actor.cpp:127
Actor::DamageMonsterFromParty
static void DamageMonsterFromParty(int a1, unsigned int uActorID_Monster, struct Vec3_int_ *pVelocity)
Definition: Actor.cpp:3379
Actor::pMonsterInfo
struct MonsterInfo pMonsterInfo
Definition: Actor.h:292
Actor::ActorNearby
bool ActorNearby() const
Definition: Actor.h:194
MonsterInfo
Definition: Monsters.h:109
Actor::word_000086_some_monster_id
int16_t word_000086_some_monster_id
Definition: Actor.h:294
ACTOR_BUFF_INDEX
ACTOR_BUFF_INDEX
Definition: Actor.h:38
AIDirection::vDirection
Vec3_int_ vDirection
Definition: Actor.h:127
Pursuing
@ Pursuing
Definition: Actor.h:81
Actor::AI_SpellAttack1
static void AI_SpellAttack1(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
Definition: Actor.cpp:1486
Actor::DrawHealthBar
static void DrawHealthBar(Actor *actor, GUIWindow *window)
Definition: Actor.cpp:67
Actor::_427102_IsOkToCastSpell
bool _427102_IsOkToCastSpell(enum SPELL_TYPE spell)
Definition: Actor.cpp:4192
Stunned
@ Stunned
Definition: Actor.h:83
Actor::InitializeActors
static void InitializeActors()
Definition: Actor.cpp:3334
Actor::pScheduledJobs
struct ActorJob pScheduledJobs[8]
Definition: Actor.h:319
SpellBuff::uFlags
unsigned __int8 uFlags
Definition: Spells.h:170
Actor::SummonMinion
void SummonMinion(int summonerId)
Definition: Actor.cpp:2606
ActorJob
Definition: Actor.h:137
AttackingRanged3
@ AttackingRanged3
Definition: Actor.h:88
ACTOR_BUFF_ENSLAVED
@ ACTOR_BUFF_ENSLAVED
Definition: Actor.h:50
uNumActors
size_t uNumActors
Definition: Actor.cpp:39
stru_50C198
stru319 stru_50C198
Definition: Actor.cpp:41
Actor::pActorBuffs
struct SpellBuff pActorBuffs[22]
Definition: Actor.h:315