World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Указатель Классы Пространства имен Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Друзья Группы Страницы
Файл Actor.h

См. исходные тексты.

Классы

struct  stru319
 
struct  AIDirection
 
struct  ActorJob
 
struct  Actor
 

Определения типов

using EngineIoc = Engine_::IocContainer
 

Перечисления

enum  ABILITY_INDEX { ABILITY_ATTACK1 = 0, ABILITY_ATTACK2 = 1, ABILITY_SPELL1 = 2, ABILITY_SPELL2 = 3 }
 
enum  ACTOR_BUFF_INDEX {
  ACTOR_BUFF_CHARM = 1, ACTOR_BUFF_SUMMONED = 2, ACTOR_BUFF_SHRINK = 3, ACTOR_BUFF_AFRAID = 4,
  ACTOR_BUFF_STONED = 5, ACTOR_BUFF_PARALYZED = 6, ACTOR_BUFF_SLOWED = 7, ACTOR_BUFF_SOMETHING_THAT_HALVES_AC = 8,
  ACTOR_BUFF_BERSERK = 9, ACTOR_BUFF_MASS_DISTORTION = 10, ACTOR_BUFF_FATE = 11, ACTOR_BUFF_ENSLAVED = 12,
  ACTOR_BUFF_DAY_OF_PROTECTION = 13, ACTOR_BUFF_HOUR_OF_POWER = 14, ACTOR_BUFF_SHIELD = 15, ACTOR_BUFF_STONESKIN = 16,
  ACTOR_BUFF_BLESS = 17, ACTOR_BUFF_HEROISM = 18, ACTOR_BUFF_HASTE = 19, ACTOR_BUFF_PAIN_REFLECTION = 20,
  ACTOR_BUFF_PAIN_HAMMERHANDS = 21
}
 
enum  ObjectType {
  OBJECT_Any = 0x0, OBJECT_BLVDoor = 0x1, OBJECT_Item = 0x2, OBJECT_Actor = 0x3,
  OBJECT_Player = 0x4, OBJECT_Decoration = 0x5, OBJECT_BModel = 0x6
}
 
enum  AIState : unsigned __int16 {
  Standing = 0x0, Tethered = 0x1, AttackingMelee = 0x2, AttackingRanged1 = 0x3,
  Dying = 0x4, Dead = 0x5, Pursuing = 0x6, Fleeing = 0x7,
  Stunned = 0x8, Fidgeting = 0x9, Interacting = 10, Removed = 11,
  AttackingRanged2 = 0xC, AttackingRanged3 = 0xD, Stoned = 0xE, Paralyzed = 0xF,
  Resurrected = 16, Summoned = 17, AttackingRanged4 = 18, Disabled = 19
}
 
enum  ActorAnimation : __int32 {
  ANIM_Standing = 0x0, ANIM_Walking = 0x1, ANIM_AtkMelee = 0x2, ANIM_AtkRanged = 0x3,
  ANIM_GotHit = 0x4, ANIM_Dying = 0x5, ANIM_Dead = 0x6, ANIM_Bored = 0x7
}
 

Функции

bool CheckActors_proximity ()
 
int IsActorAlive (unsigned int uType, unsigned int uParam, unsigned int uNumAlive)
 
void sub_448518_npc_set_item (int npc, unsigned int item, int a3)
 
void ToggleActorGroupFlag (unsigned int uGroupID, unsigned int uFlag, unsigned int bToggle)
 
bool sub_4070EF_prolly_detect_player (unsigned int uObjID, unsigned int uObj2ID)
 
bool SpawnActor (unsigned int uMonsterID)
 
int sub_44FA4C_spawn_light_elemental (int spell_power, int caster_skill_level, int duration_game_seconds)
 
void SpawnEncounter (struct MapInfo *pMapInfo, struct SpawnPointMM7 *spawn, int a3, int a4, int a5)
 
void area_of_effect__damage_evaluate ()
 
double sub_43AE12 (signed int a1)
 
void ItemDamageFromActor (unsigned int uObjID, unsigned int uActorID, struct Vec3_int_ *pVelocity)
 

Переменные

stru319 stru_50C198
 
std::array< Actor, 500 > pActors
 
size_t uNumActors
 

Типы

◆ EngineIoc

См. определение в файле Actor.h строка 9

Перечисления

◆ ABILITY_INDEX

Элементы перечислений
ABILITY_ATTACK1 
ABILITY_ATTACK2 
ABILITY_SPELL1 
ABILITY_SPELL2 

См. определение в файле Actor.h строка 30

30  {
31  ABILITY_ATTACK1 = 0,
32  ABILITY_ATTACK2 = 1,
33  ABILITY_SPELL1 = 2,
34  ABILITY_SPELL2 = 3,
35 };

◆ ACTOR_BUFF_INDEX

Элементы перечислений
ACTOR_BUFF_CHARM 
ACTOR_BUFF_SUMMONED 
ACTOR_BUFF_SHRINK 
ACTOR_BUFF_AFRAID 
ACTOR_BUFF_STONED 
ACTOR_BUFF_PARALYZED 
ACTOR_BUFF_SLOWED 
ACTOR_BUFF_SOMETHING_THAT_HALVES_AC 
ACTOR_BUFF_BERSERK 
ACTOR_BUFF_MASS_DISTORTION 
ACTOR_BUFF_FATE 
ACTOR_BUFF_ENSLAVED 
ACTOR_BUFF_DAY_OF_PROTECTION 
ACTOR_BUFF_HOUR_OF_POWER 
ACTOR_BUFF_SHIELD 
ACTOR_BUFF_STONESKIN 
ACTOR_BUFF_BLESS 
ACTOR_BUFF_HEROISM 
ACTOR_BUFF_HASTE 
ACTOR_BUFF_PAIN_REFLECTION 
ACTOR_BUFF_PAIN_HAMMERHANDS 

См. определение в файле Actor.h строка 38

◆ ObjectType

enum ObjectType
Элементы перечислений
OBJECT_Any 
OBJECT_BLVDoor 
OBJECT_Item 
OBJECT_Actor 
OBJECT_Player 
OBJECT_Decoration 
OBJECT_BModel 

См. определение в файле Actor.h строка 63

63  {
64  OBJECT_Any = 0x0,
65  OBJECT_BLVDoor = 0x1,
66  OBJECT_Item = 0x2,
67  OBJECT_Actor = 0x3,
68  OBJECT_Player = 0x4,
69  OBJECT_Decoration = 0x5,
70  OBJECT_BModel = 0x6,
71 };

◆ AIState

enum AIState : unsigned __int16
Элементы перечислений
Standing 
Tethered 
AttackingMelee 
AttackingRanged1 
Dying 
Dead 
Pursuing 
Fleeing 
Stunned 
Fidgeting 
Interacting 
Removed 
AttackingRanged2 
AttackingRanged3 
Stoned 
Paralyzed 
Resurrected 
Summoned 
AttackingRanged4 
Disabled 

См. определение в файле Actor.h строка 74

74  : unsigned __int16 {
75  Standing = 0x0,
76  Tethered = 0x1,
77  AttackingMelee = 0x2,
78  AttackingRanged1 = 0x3,
79  Dying = 0x4,
80  Dead = 0x5,
81  Pursuing = 0x6,
82  Fleeing = 0x7,
83  Stunned = 0x8,
84  Fidgeting = 0x9,
85  Interacting = 10,
86  Removed = 11,
87  AttackingRanged2 = 0xC,
88  AttackingRanged3 = 0xD,
89  Stoned = 0xE,
90  Paralyzed = 0xF,
91  Resurrected = 16,
92  Summoned = 17,
93  AttackingRanged4 = 18,
94  Disabled = 19,
95 };

◆ ActorAnimation

enum ActorAnimation : __int32
Элементы перечислений
ANIM_Standing 
ANIM_Walking 
ANIM_AtkMelee 
ANIM_AtkRanged 
ANIM_GotHit 
ANIM_Dying 
ANIM_Dead 
ANIM_Bored 

См. определение в файле Actor.h строка 98

98  : __int32 {
99  ANIM_Standing = 0x0,
100  ANIM_Walking = 0x1,
101  ANIM_AtkMelee = 0x2,
102  ANIM_AtkRanged = 0x3,
103  ANIM_GotHit = 0x4,
104  ANIM_Dying = 0x5,
105  ANIM_Dead = 0x6,
106  ANIM_Bored = 0x7,
107 };

Функции

◆ CheckActors_proximity()

bool CheckActors_proximity ( )

См. определение в файле Actor.cpp строка 4034

4034  {
4035  unsigned int distance; // edi@1
4036  int for_x; // ebx@5
4037  int for_y; // [sp+Ch] [bp-10h]@5
4038  int for_z; // [sp+10h] [bp-Ch]@5
4039 
4040  distance = 5120;
4042 
4043  if ((signed int)uNumActors <= 0) return false;
4044  for (uint i = 0; i < (signed int)uNumActors; ++i) {
4045  for_x = abs(pActors[i].vInitialPosition.x - pParty->vPosition.x);
4046  for_y = abs(pActors[i].vInitialPosition.y - pParty->vPosition.y);
4047  for_z = abs(pActors[i].vInitialPosition.z - pParty->vPosition.z);
4048  if (int_get_vector_length(for_x, for_y, for_z) < distance) {
4049  if (pActors[i].uAIState != Dead) {
4050  if (pActors[i].uAIState != Dying &&
4051  pActors[i].uAIState != Removed &&
4052  pActors[i].uAIState != Disabled &&
4053  pActors[i].uAIState != Summoned &&
4054  (pActors[i].ActorEnemy() ||
4055  pActors[i].GetActorsRelation(0)))
4056  return true;
4057  }
4058  }
4059  }
4060  return false;
4061 }

Перекрестные ссылки Dead, Disabled, Dying, int_get_vector_length(), LEVEL_Indoor, pActors, pParty, Removed, Summoned, uCurrentlyLoadedLevelType, uNumActors и Party::vPosition.

Используется в Application::Game::EventLoop().

+ Граф вызовов:
+ Граф вызова функции:

◆ IsActorAlive()

int IsActorAlive ( unsigned int  uType,
unsigned int  uParam,
unsigned int  uNumAlive 
)

См. определение в файле Actor.cpp строка 3240

3241  {
3242  unsigned int uAliveActors; // eax@6
3243  unsigned int uTotalActors; // [sp+0h] [bp-4h]@1
3244 
3245  uTotalActors = 0;
3246  if (uType) {
3247  if (uType == 1) {
3248  uAliveActors = Actor::SearchActorByGroup(&uTotalActors, uParam);
3249  } else {
3250  if (uType == 2) {
3251  uAliveActors =
3252  Actor::SearchActorByMonsterID(&uTotalActors, uParam);
3253  } else {
3254  if (uType != 3) return 0;
3255  uAliveActors = Actor::SearchActorByID(&uTotalActors, uParam);
3256  }
3257  }
3258  } else {
3259  uAliveActors = Actor::SearchAliveActors(&uTotalActors);
3260  }
3261 
3262  if (uNumAlive)
3263  return uAliveActors >= uNumAlive;
3264  else
3265  return uTotalActors == uAliveActors;
3266 }

Перекрестные ссылки Actor::SearchActorByGroup(), Actor::SearchActorByID(), Actor::SearchActorByMonsterID() и Actor::SearchAliveActors().

Используется в EventProcessor() и NPC_EventProcessor().

+ Граф вызовов:
+ Граф вызова функции:

◆ sub_448518_npc_set_item()

void sub_448518_npc_set_item ( int  npc,
unsigned int  item,
int  a3 
)

См. определение в файле Actor.cpp строка 127

127  {
128  for (uint i = 0; i < uNumActors; i++) {
129  if (pActors[uNumActors].sNPC_ID == npc) Actor::GiveItem(i, item, a3);
130  }
131 }

Перекрестные ссылки Actor::GiveItem(), pActors и uNumActors.

Используется в EventProcessor().

+ Граф вызовов:
+ Граф вызова функции:

◆ ToggleActorGroupFlag()

void ToggleActorGroupFlag ( unsigned int  uGroupID,
unsigned int  uFlag,
unsigned int  bToggle 
)

См. определение в файле Actor.cpp строка 4426

4427  {
4428  if (uGroupID) {
4429  if (bToggle) {
4430  for (uint i = 0; i < (unsigned int)uNumActors; ++i) {
4431  if (pActors[i].uGroup == uGroupID) {
4432  pActors[i].uAttributes |= uFlag;
4433  if (uFlag == 0x10000) {
4434  pActors[i].uAIState = Disabled;
4435  pActors[i].UpdateAnimation();
4436  }
4437  }
4438  }
4439  } else {
4440  for (uint i = 0; i < (unsigned int)uNumActors; ++i) {
4441  if (pActors[i].uGroup == uGroupID) {
4442  if (uFlag == 0x10000) {
4443  if (pActors[i].uAIState != Dead) {
4444  if (pActors[i].uAIState != 4 &&
4445  pActors[i].uAIState != 11)
4446  pActors[i].uAIState = Standing;
4447  }
4448  }
4449  HEXRAYS_LODWORD(pActors[i].uAttributes) &= ~uFlag;
4450  }
4451  }
4452  }
4453  }
4454 }

Перекрестные ссылки Dead, Disabled, pActors, Standing и uNumActors.

Используется в EventProcessor().

+ Граф вызова функции:

◆ sub_4070EF_prolly_detect_player()

bool sub_4070EF_prolly_detect_player ( unsigned int  uObjID,
unsigned int  uObj2ID 
)

См. определение в файле Actor.cpp строка 4688

4689  {
4690  signed int v2; // eax@1
4691  int obj1_sector; // eax@4
4692  float v8; // ST24_4@5
4693  signed int v12; // eax@7
4694  int obj2_z; // edi@11
4695  int obj2_x; // esi@11
4696  int obj2_sector; // eax@13
4697  float v20; // ST24_4@14
4698  int dist_x; // ebx@16
4699  signed int dist_3d; // ecx@16
4700  int v25; // eax@18
4701  BLVFace *v29; // ebx@32
4702  Vec3_short_ *v30; // esi@32
4703  int v31; // eax@32
4704  int v32; // ST50_4@44
4705  int v33; // ST54_4@44
4706  int v34; // eax@44
4707  int v38; // esi@45
4708  __int16 next_sector; // bx@58
4709  int v47; // [sp+18h] [bp-50h]@20
4710  int v48; // [sp+1Ch] [bp-4Ch]@20
4711  int v49; // [sp+20h] [bp-48h]@20
4712  int dist_z; // [sp+24h] [bp-44h]@16
4713  int higher_z; // [sp+24h] [bp-44h]@27
4714  int lower_z; // [sp+28h] [bp-40h]@26
4715  int higher_y; // [sp+2Ch] [bp-3Ch]@23
4716  int lower_y; // [sp+30h] [bp-38h]@22
4717  int higher_x; // [sp+34h] [bp-34h]@21
4718  int lower_x; // [sp+38h] [bp-30h]@20
4719  int sectors_visited; // [sp+3Ch] [bp-2Ch]@28
4720  int v58; // [sp+44h] [bp-24h]@50
4721  int v59; // [sp+48h] [bp-20h]@44
4722  int obj2_y; // [sp+50h] [bp-18h]@11
4723  int obj1_x; // [sp+58h] [bp-10h]@4
4724  int obj1_y; // [sp+5Ch] [bp-Ch]@4
4725  int obj1_z; // [sp+60h] [bp-8h]@4
4726  int current_sector; // [sp+64h] [bp-4h]@7
4727  int dist_y;
4728  int v70;
4729 
4730  v2 = PID_ID(uObjID);
4731  switch (PID_TYPE(uObjID)) {
4732  case OBJECT_Decoration:
4733  obj1_x = pLevelDecorations[v2].vPosition.x;
4734  obj1_y = pLevelDecorations[v2].vPosition.y;
4735  obj1_z = pLevelDecorations[v2].vPosition.z;
4736  obj1_sector = pIndoor->GetSector(obj1_x, obj1_y, obj1_z);
4737  break;
4738  case OBJECT_Actor:
4739  obj1_x = pActors[v2].vPosition.x;
4740  obj1_y = pActors[v2].vPosition.y;
4741  v8 = (float)pActors[v2].uActorHeight * 0.69999999;
4742  // v9 = v8 + 6.7553994e15;
4743  // obj1_z = LODWORD(v9) + pActors[v2].vPosition.z;
4744  obj1_z = (int)v8 + pActors[v2].vPosition.z;
4745  obj1_sector = pActors[v2].uSectorID;
4746  break;
4747  case OBJECT_Item:
4748  obj1_x = pSpriteObjects[v2].vPosition.x;
4749  obj1_y = pSpriteObjects[v2].vPosition.y;
4750  obj1_z = pSpriteObjects[v2].vPosition.z;
4751  obj1_sector = pSpriteObjects[v2].uSectorID;
4752  break;
4753  default:
4754  return 0;
4755  }
4756  v12 = PID_ID(uObj2ID);
4757  switch (PID_TYPE(uObj2ID)) {
4758  case OBJECT_Decoration:
4759  obj2_z = pLevelDecorations[v12].vPosition.z;
4760  obj2_x = pLevelDecorations[v12].vPosition.x;
4761  obj2_y = pLevelDecorations[v12].vPosition.y;
4762  obj2_sector = pIndoor->GetSector(obj2_x, obj2_y, obj2_z);
4763  break;
4764  case OBJECT_Player:
4765  obj2_x = pParty->vPosition.x;
4766  obj2_z = pParty->sEyelevel + pParty->vPosition.z;
4767  obj2_y = pParty->vPosition.y;
4768  obj2_sector =
4771  break;
4772  case OBJECT_Actor:
4773  obj2_y = pActors[v12].vPosition.y;
4774  obj2_x = pActors[v12].vPosition.x;
4775  v20 = (float)pActors[v12].uActorHeight * 0.69999999;
4776  // v21 = v20 + 6.7553994e15;
4777  // obj2_z = LODWORD(v21) + pActors[v12].vPosition.z;
4778  obj2_z = (int)v20 + pActors[v12].vPosition.z;
4779  obj2_sector = pActors[v12].uSectorID;
4780  break;
4781  case OBJECT_Item:
4782  obj2_x = pSpriteObjects[v12].vPosition.x;
4783  obj2_z = pSpriteObjects[v12].vPosition.z;
4784  obj2_y = pSpriteObjects[v12].vPosition.y;
4785  obj2_sector = pSpriteObjects[v12].uSectorID;
4786  break;
4787  default:
4788  return 0;
4789  }
4790  dist_x = obj2_x - obj1_x;
4791  dist_z = obj2_z - obj1_z;
4792  dist_y = obj2_y - obj1_y;
4793  dist_3d = integer_sqrt(dist_x * dist_x + dist_y * dist_y + dist_z * dist_z);
4794  // range check
4795  if (dist_3d > 5120) return 0;
4796  if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) return 1;
4797  v25 = 65536;
4798  if (dist_3d) v25 = 65536 / dist_3d;
4799  v49 = dist_x * v25;
4800  v47 = dist_z * v25;
4801  v48 = dist_y * v25;
4802  if (obj1_x < obj2_x) {
4803  lower_x = obj1_x;
4804  higher_x = obj2_x;
4805  } else {
4806  lower_x = obj2_x;
4807  higher_x = obj1_x;
4808  }
4809  if (obj1_y < obj2_y) {
4810  lower_y = obj1_y;
4811  higher_y = obj2_y;
4812  } else {
4813  lower_y = obj2_y;
4814  higher_y = obj1_y;
4815  }
4816  if (obj1_z < obj2_z) {
4817  lower_z = obj1_z;
4818  higher_z = obj2_z;
4819  } else {
4820  lower_z = obj2_z;
4821  higher_z = obj1_z;
4822  }
4823  sectors_visited = 0;
4824  // monster in same sector with player
4825  if (obj1_sector == obj2_sector) return 1;
4826  // search starts from monster
4827  current_sector = obj1_sector;
4828  for (int current_portal = 0;
4829  current_portal < pIndoor->pSectors[current_sector].uNumPortals;
4830  current_portal++) {
4831  v29 = &pIndoor->pFaces[pIndoor->pSectors[current_sector]
4832  .pPortals[current_portal]];
4833  v30 = &pIndoor->pVertices[*v29->pVertexIDs];
4834  v31 = v29->pFacePlane_old.vNormal.z * (v30->z - obj1_z) +
4835  v29->pFacePlane_old.vNormal.y * (v30->y - obj1_y) +
4836  v29->pFacePlane_old.vNormal.x * (v30->x - obj1_x);
4837 
4838  if (current_sector != v29->uSectorID) v31 = -v31;
4839 
4840  if (v31 >= 0 && v30->x != obj1_x && v30->y != obj1_y &&
4841  v30->z != obj1_z)
4842  continue;
4843 
4844  if (lower_x > v29->pBounding.x2 || higher_x < v29->pBounding.x1 ||
4845  lower_y > v29->pBounding.y2 || higher_y < v29->pBounding.y1 ||
4846  lower_z > v29->pBounding.z2 || higher_z < v29->pBounding.z1) {
4847  continue;
4848  }
4849 
4850  v32 = fixpoint_mul(v29->pFacePlane_old.vNormal.x, v49);
4851  v34 = fixpoint_mul(v29->pFacePlane_old.vNormal.y, v48);
4852  v33 = fixpoint_mul(v29->pFacePlane_old.vNormal.z, v47);
4853 
4854  v59 = v32 + v33 + v34;
4855  if (v59) {
4856  v70 = v29->pFacePlane_old.dist +
4857  obj1_z * v29->pFacePlane_old.vNormal.z +
4858  obj1_x * v29->pFacePlane_old.vNormal.x +
4859  obj1_y * v29->pFacePlane_old.vNormal.y;
4860  v38 = -v70;
4861 
4862  // if ( v59 <= 0 ^ v70 <= 0 )
4863 
4864  /* TEMPORARY
4865  if ( v59 <= 0 && v70 <= 0 )
4866  {
4867  continue;
4868  }
4869  if ( !(v59 <= 0 && v70 <= 0) )
4870  {
4871  continue;
4872  }
4873  */
4874 
4875  if (abs(v38) >> 14 > abs(v59)) continue;
4876 
4877  v58 = fixpoint_div(v38, v59);
4878 
4879  if (v58 < 0) continue;
4880 
4881  if (!sub_4075DB(obj1_x + ((fixpoint_mul(v49, v58) + 32768) >> 16),
4882  obj1_y + ((fixpoint_mul(v48, v58) + 32768) >> 16),
4883  obj1_z + ((fixpoint_mul(v47, v58) + 32768) >> 16),
4884  v29)) {
4885  continue;
4886  }
4887 
4888  // if there is no next sector turn back
4889  if (v29->uSectorID == current_sector)
4890  next_sector = v29->uBackSectorID;
4891  else
4892  next_sector = v29->uSectorID;
4893 
4894  // no more portals, quit
4895  if (next_sector == current_sector) break;
4896 
4897  ++sectors_visited;
4898  current_sector = next_sector;
4899 
4900  // found player, quit
4901  if (next_sector == obj2_sector) return 1;
4902 
4903  current_sector = next_sector;
4904 
4905  // did we hit limit for portals?
4906  // does the next room have portals?
4907  if (sectors_visited < 30 &&
4908  pIndoor->pSectors[current_sector].uNumPortals > 0) {
4909  current_portal = -1;
4910  continue;
4911  } else {
4912  break;
4913  }
4914  }
4915  }
4916  // did we stop in the sector where player is?
4917  if (current_sector != obj2_sector) return 0;
4918  return 1;
4919 }

Перекрестные ссылки Plane_int_::dist, fixpoint_div(), fixpoint_mul(), IndoorLocation::GetSector(), integer_sqrt(), LEVEL_Outdoor, OBJECT_Actor, OBJECT_Decoration, OBJECT_Item, OBJECT_Player, pActors, BLVFace::pBounding, BLVFace::pFacePlane_old, IndoorLocation::pFaces, pIndoor, pLevelDecorations, pParty, BLVSector::pPortals, IndoorLocation::pSectors, pSpriteObjects, BLVFace::pVertexIDs, IndoorLocation::pVertices, Party::sEyelevel, sub_4075DB(), BLVFace::uBackSectorID, uCurrentlyLoadedLevelType, BLVSector::uNumPortals, BLVFace::uSectorID, Plane_int_::vNormal, Party::vPosition, BBox_short_::x2, BBox_short_::y2 и BBox_short_::z2.

Используется в Actor::_SelectTarget() и Actor::MakeActorAIList_BLV().

+ Граф вызовов:
+ Граф вызова функции:

◆ SpawnActor()

bool SpawnActor ( unsigned int  uMonsterID)

См. определение в файле Actor.cpp строка 4922

4922  {
4923  unsigned int v1; // ebx@1
4924  bool result; // eax@2
4925  unsigned int v6; // ecx@5
4926  Actor actor; // [sp+4h] [bp-350h]@5
4927  Vec3_int_ pOut; // [sp+348h] [bp-Ch]@5
4928 
4929  v1 = uMonsterID;
4930  if (uNumActors == 499) {
4931  result = 0;
4932  } else {
4933  if ((signed int)uMonsterID >= (signed int)pMonsterList->uNumMonsters)
4934  v1 = 0;
4935  memset(&actor, 0, sizeof(Actor));
4936  strcpy(actor.pActorName, pMonsterStats->pInfos[v1 + 1].pName);
4937  actor.sCurrentHP = (short)pMonsterStats->pInfos[v1 + 1].uHP;
4938  memcpy(&actor.pMonsterInfo, &pMonsterStats->pInfos[v1 + 1],
4939  sizeof(MonsterInfo));
4940  actor.word_000086_some_monster_id = v1 + 1;
4944 
4945  Vec3_int_::Rotate(200, pParty->sRotationY, 0, pParty->vPosition,
4946  &pOut.x, &pOut.z, &pOut.y);
4947  actor.vInitialPosition.x = pOut.x;
4948  actor.vPosition.x = pOut.x;
4949  actor.uTetherDistance = 256;
4950  actor.vInitialPosition.y = (short)pOut.z;
4951  actor.vPosition.y = (short)pOut.z;
4952  actor.vInitialPosition.z = (short)pOut.y;
4953  actor.vPosition.z = (short)pOut.y;
4956  v6 = uNumActors - 1;
4957  if (dword_5C6DF8 == 1) {
4958  dword_5C6DF8 = 0;
4959  v6 = uNumActors++;
4960  }
4961  memcpy(&pActors[v6], &actor, sizeof(Actor));
4962  pActors[v6].PrepareSprites(1);
4963  result = 1;
4964  }
4965  return result;
4966 }

Перекрестные ссылки LODFile_Sprites::DeleteSomeSprites(), dword_5C6DF8, Actor::pActorName, pActors, MonsterStats::pInfos, Actor::pMonsterInfo, pMonsterList, MonsterList::pMonsters, pMonsterStats, MonsterInfo::pName, pPaletteManager, pParty, pSprites_LOD, PaletteManager::ResetNonTestLocked(), Actor::sCurrentHP, Party::sRotationY, Actor::uActorHeight, Actor::uActorRadius, MonsterInfo::uHP, MonsterDesc::uMonsterHeight, MonsterDesc::uMonsterRadius, MonsterDesc::uMovementSpeed, Actor::uMovementSpeed, uNumActors, MonsterList::uNumMonsters, Actor::uTetherDistance, Actor::vInitialPosition, Party::vPosition, Actor::vPosition и Actor::word_000086_some_monster_id.

Используется в GUIWindow_Inventory::Update().

+ Граф вызовов:
+ Граф вызова функции:

◆ sub_44FA4C_spawn_light_elemental()

int sub_44FA4C_spawn_light_elemental ( int  spell_power,
int  caster_skill_level,
int  duration_game_seconds 
)

См. определение в файле Actor.cpp строка 4969

4970  {
4971  int result; // eax@13
4972  int v10; // ebx@16
4973  const char *cMonsterName; // [sp-4h] [bp-24h]@2
4974  unsigned int uFaceID; // [sp+8h] [bp-18h]@16
4975  int v19; // [sp+Ch] [bp-14h]@16
4976  // size_t uActorIndex; // [sp+10h] [bp-10h]@6
4977  int v21; // [sp+14h] [bp-Ch]@14
4978  unsigned int uMonsterID; // [sp+1Ch] [bp-4h]@6
4979 
4980  if (caster_skill_level == 4)
4981  cMonsterName = "Elemental Light C";
4982  else if (caster_skill_level == 3)
4983  cMonsterName = "Elemental Light B";
4984  else
4985  cMonsterName = "Elemental Light A";
4986 
4987  uMonsterID = pMonsterList->GetMonsterIDByName(cMonsterName);
4988 
4989  // find first free index
4990  uint uActorIndex = 0;
4991  for (uActorIndex; uActorIndex < uNumActors; uActorIndex++) {
4992  if (pActors[uActorIndex].uAIState == Removed) break;
4993  }
4994 
4995  result = uNumActors + 1;
4996 
4997 
4998  // use free slot or first new slot
4999  if (uActorIndex != uNumActors || result < 500) {
5000  v21 = 0;
5003  pParty->vPosition.z);
5004  v19 = (((uCurrentlyLoadedLevelType != LEVEL_Outdoor) - 1) & 0x40) + 64;
5005  pActors[uActorIndex].Reset();
5006  strcpy(pActors[uActorIndex].pActorName, pMonsterStats->pInfos[uMonsterID + 1].pName);
5007  pActors[uActorIndex].sCurrentHP = pMonsterStats->pInfos[uMonsterID + 1].uHP;
5008  memcpy(&pActors[uActorIndex].pMonsterInfo, &pMonsterStats->pInfos[uMonsterID + 1],
5009  sizeof(MonsterInfo));
5010  pActors[uActorIndex].word_000086_some_monster_id = uMonsterID + 1;
5011  pActors[uActorIndex].uActorRadius = pMonsterList->pMonsters[uMonsterID].uMonsterRadius;
5012  pActors[uActorIndex].uActorHeight = pMonsterList->pMonsters[uMonsterID].uMonsterHeight;
5013  pActors[uActorIndex].pMonsterInfo.uTreasureDiceRolls = 0;
5014  pActors[uActorIndex].pMonsterInfo.uTreasureType = 0;
5015  pActors[uActorIndex].pMonsterInfo.uExp = 0;
5016  pActors[uActorIndex].uMovementSpeed =
5017  pMonsterList->pMonsters[uMonsterID].uMovementSpeed;
5018  v10 = rand() % 2048;
5019  pActors[uActorIndex].vInitialPosition.x =
5020  pParty->vPosition.x + fixpoint_mul(stru_5C6E00->Cos(v10), v19);
5021  pActors[uActorIndex].vPosition.x = pActors[uActorIndex].vInitialPosition.x;
5022  pActors[uActorIndex].vInitialPosition.y =
5023  pParty->vPosition.y + fixpoint_mul(stru_5C6E00->Sin(v10), v19);
5024  pActors[uActorIndex].vPosition.y = pActors[uActorIndex].vInitialPosition.y;
5025  pActors[uActorIndex].vInitialPosition.z = pParty->vPosition.z;
5026  pActors[uActorIndex].vPosition.z = pActors[uActorIndex].vInitialPosition.z;
5027  pActors[uActorIndex].uTetherDistance = 256;
5028  pActors[uActorIndex].uSectorID = v21;
5029  pActors[uActorIndex].PrepareSprites(0);
5030  pActors[uActorIndex].pMonsterInfo.uHostilityType =
5032  pActors[uActorIndex].uAlly = 9999;
5033  pActors[uActorIndex].uGroup = 0;
5034  pActors[uActorIndex].uCurrentActionTime = 0;
5035  pActors[uActorIndex].uAIState = Summoned;
5036  pActors[uActorIndex].uCurrentActionLength = 256;
5037  pActors[uActorIndex].UpdateAnimation();
5038 
5039  result = pIndoor->GetSector(pActors[uActorIndex].vPosition.x,
5040  pActors[uActorIndex].vPosition.y,
5041  pActors[uActorIndex].vPosition.z);
5043  result == v21 &&
5045  pActors[uActorIndex].vPosition.x, pActors[uActorIndex].vPosition.y,
5046  pActors[uActorIndex].vPosition.z, result, &uFaceID),
5047  result != -30000) &&
5048  (result = abs(result - pParty->vPosition.z), result <= 1024)) {
5049  if (uActorIndex == uNumActors) ++uNumActors;
5050  pActors[uActorIndex].uSummonerID = PID(OBJECT_Player, spell_power);
5051 
5052  GameTime spell_length = GameTime::FromSeconds(duration_game_seconds);
5053 
5054  result = pActors[uActorIndex].pActorBuffs[ACTOR_BUFF_SUMMONED].Apply(
5055  (pParty->GetPlayingTime() + spell_length),
5056  caster_skill_level, spell_power, 0, 0);
5057  }
5058  }
5059  return result;
5060 }

Перекрестные ссылки ACTOR_BUFF_SUMMONED, BLV_GetFloorLevel(), stru193_math::Cos(), fixpoint_mul(), GameTime::FromSeconds(), MonsterList::GetMonsterIDByName(), Party::GetPlayingTime(), IndoorLocation::GetSector(), MonsterInfo::Hostility_Friendly, LEVEL_Indoor, LEVEL_Outdoor, OBJECT_Player, pActors, pIndoor, MonsterStats::pInfos, pMonsterList, MonsterList::pMonsters, pMonsterStats, MonsterInfo::pName, pParty, Removed, stru193_math::Sin(), stru_5C6E00, Summoned, uCurrentlyLoadedLevelType, MonsterInfo::uHP, MonsterDesc::uMonsterHeight, MonsterDesc::uMonsterRadius, MonsterDesc::uMovementSpeed, uNumActors и Party::vPosition.

Используется в CastSpellInfoHelpers::_427E01_cast_spell().

+ Граф вызовов:
+ Граф вызова функции:

◆ SpawnEncounter()

void SpawnEncounter ( struct MapInfo pMapInfo,
struct SpawnPointMM7 spawn,
int  a3,
int  a4,
int  a5 
)

См. определение в файле Actor.cpp строка 5063

5063  {
5064  // a3 for abc modify
5065  // a4 count
5066 
5067  int v7; // eax@2
5068  char v8; // zf@5
5069  int v12; // edx@9
5070  // int v18; // esi@31
5071  Actor *pMonster; // esi@35
5072  int v23; // edx@36
5073  int v24; // edi@36
5074  int v25; // ecx@36
5075  MonsterDesc *v27; // edi@48
5076  signed int v28; // eax@48
5077  int v32; // eax@50
5078  int v37; // eax@51
5079  int v38; // eax@52
5080  int v39; // edi@52
5081  String v40; // [sp-18h] [bp-100h]@60
5082  const char *v44; // [sp-8h] [bp-F0h]@13
5083  char *pTexture; // [sp-4h] [bp-ECh]@9
5084  // char Str[32]; // [sp+Ch] [bp-DCh]@60
5085  char Str2[120]; // [sp+2Ch] [bp-BCh]@29
5086  unsigned int uFaceID; // [sp+A4h] [bp-44h]@52
5087  MonsterInfo *Src; // [sp+A8h] [bp-40h]@50
5088  int v50; // [sp+ACh] [bp-3Ch]@47
5089  char Source[32]; // [sp+B0h] [bp-38h]@20
5090  int v52; // [sp+D0h] [bp-18h]@34
5091  int v53; // [sp+D4h] [bp-14h]@34
5092  int pSector; // [sp+D8h] [bp-10h]@32
5093  int pPosX; // [sp+DCh] [bp-Ch]@32
5094  int NumToSpawn; // [sp+E0h] [bp-8h]@8
5095  int v57; // [sp+E4h] [bp-4h]@1
5096 
5097  // auto a2 = spawn;
5098  v57 = 0;
5099  // v5 = pMapInfo;
5100  // v6 = spawn;
5102  v7 = pOutdoor->ddm.field_C_alert;
5104  v7 = pIndoor->dlv.field_C_alert;
5105  else
5106  v7 = 0;
5107 
5108  if (v7)
5109  v8 = (spawn->uAttributes & 1) == 0;
5110  else
5111  v8 = (spawn->uAttributes & 1) == 1;
5112  if (v8) return;
5113 
5114  // result = (void *)(spawn->uIndex - 1);
5115  NumToSpawn = 1;
5116  switch (spawn->uIndex - 1) {
5117  case 0:
5118  // v9 = pMapInfo->uEncounterMonster1AtLeast;
5119  // v10 = rand();
5120  // v11 = pMapInfo->uEncounterMonster1AtMost;
5121  // pTexture = pMapInfo->pEncounterMonster1Texture;
5122  v12 = rand() % (pMapInfo->uEncounterMonster1AtMost -
5123  pMapInfo->uEncounterMonster1AtLeast + 1);
5124  // v13 = pMapInfo->Dif_M1;
5125  v57 = pMapInfo->Dif_M1;
5126  NumToSpawn = pMapInfo->uEncounterMonster1AtLeast + v12;
5127  strcpy(Source, pMapInfo->pEncounterMonster1Texture.c_str());
5128  break;
5129  case 3:
5130  // pTexture = pMapInfo->pEncounterMonster1Texture;
5131  // v44 = "%s A";
5132  sprintf(Source, "%s A", pMapInfo->pEncounterMonster1Texture.c_str());
5133  break;
5134  case 4:
5135  // pTexture = pMapInfo->pEncounterMonster2Texture;
5136  // v44 = "%s A";
5137  sprintf(Source, "%s A", pMapInfo->pEncounterMonster2Texture.c_str());
5138  break;
5139  case 5:
5140  // pTexture = pMapInfo->pEncounterMonster3Texture;
5141  // v44 = "%s A";
5142  sprintf(Source, "%s A", pMapInfo->pEncounterMonster3Texture.c_str());
5143  break;
5144  case 1:
5145  // v9 = pMapInfo->uEncounterMonster2AtLeast;
5146  // v14 = rand();
5147  // v15 = pMapInfo->uEncounterMonster2AtMost;
5148  // pTexture = pMapInfo->pEncounterMonster2Texture;
5149  v12 = rand() % (pMapInfo->uEncounterMonster2AtMost -
5150  pMapInfo->uEncounterMonster2AtLeast + 1);
5151  // v13 = pMapInfo->Dif_M2;
5152  v57 = pMapInfo->Dif_M2;
5153  NumToSpawn = pMapInfo->uEncounterMonster2AtLeast + v12;
5154  strcpy(Source, pMapInfo->pEncounterMonster2Texture.c_str());
5155  break;
5156  case 6:
5157  // pTexture = pMapInfo->pEncounterMonster1Texture;
5158  // v44 = "%s B";
5159  sprintf(Source, "%s B", pMapInfo->pEncounterMonster1Texture.c_str());
5160  break;
5161  case 7:
5162  // pTexture = pMapInfo->pEncounterMonster2Texture;
5163  // v44 = "%s B";
5164  sprintf(Source, "%s B", pMapInfo->pEncounterMonster2Texture.c_str());
5165  break;
5166  case 8:
5167  // pTexture = pMapInfo->pEncounterMonster3Texture;
5168  // v44 = "%s B";
5169  sprintf(Source, "%s B", pMapInfo->pEncounterMonster3Texture.c_str());
5170  break;
5171  case 2:
5172  // v9 = pMapInfo->uEncounterMonster3AtLeast;
5173  // v16 = rand();
5174  // v17 = pMapInfo->uEncounterMonster3AtMost;
5175  // pTexture = pMapInfo->pEncounterMonster3Texture;
5176  v12 = rand() % (pMapInfo->uEncounterMonster3AtMost -
5177  pMapInfo->uEncounterMonster3AtLeast + 1);
5178  // v13 = pMapInfo->Dif_M3;
5179  v57 = pMapInfo->Dif_M3;
5180  NumToSpawn = pMapInfo->uEncounterMonster3AtLeast + v12;
5181  strcpy(Source, pMapInfo->pEncounterMonster3Texture.c_str());
5182  break;
5183  case 9:
5184  // pTexture = pMapInfo->pEncounterMonster1Texture;
5185  // v44 = "%s C";
5186  sprintf(Source, "%s C", pMapInfo->pEncounterMonster1Texture.c_str());
5187  break;
5188  case 10:
5189  // pTexture = pMapInfo->pEncounterMonster2Texture;
5190  // v44 = "%s C";
5191  sprintf(Source, "%s C", pMapInfo->pEncounterMonster2Texture.c_str());
5192  break;
5193  case 11:
5194  // pTexture = pMapInfo->pEncounterMonster3Texture;
5195  // v44 = "%s C";
5196  sprintf(Source, "%s C", pMapInfo->pEncounterMonster3Texture.c_str());
5197  break;
5198  default:
5199  return;
5200  }
5201 
5202  if (Source[0] == '0') return;
5203 
5204  v57 += a3;
5205  if (v57 > 4) v57 = 4;
5206  strcpy(Str2, Source);
5207  if (a4) NumToSpawn = a4;
5208  // v18 = NumToSpawn;
5209  if (NumToSpawn <= 0) return;
5210  if ((signed int)(NumToSpawn + uNumActors) >= 500) return;
5211 
5212  pSector = 0;
5213  pPosX = spawn->vPosition.x;
5214  a4 = spawn->vPosition.y;
5215  a3 = spawn->vPosition.z;
5217  pSector = pIndoor->GetSector(spawn->vPosition.x, spawn->vPosition.y,
5218  spawn->vPosition.z);
5219  v53 = 0;
5220  v52 = (((uCurrentlyLoadedLevelType != LEVEL_Outdoor) - 1) & 0x40) + 64;
5221 
5222  // spawning loop
5223  for (int i = v53; i < NumToSpawn; ++i) {
5224  pMonster = &pActors[uNumActors];
5225  pActors[uNumActors].Reset();
5226 
5227  // random monster levels ABC
5228  if (v57) {
5229  v23 = rand() % 100;
5230  v24 = 3; // 2 , 10 , 20
5231  v25 = (uint16_t)word_4E8152[3 * v57];
5232  if (v23 >= v25) {
5233  if (v23 < v25 + (uint16_t)word_4E8152[3 * v57 + 1]) {
5234  v24 = 2; // 8 , 20 , 30
5235  }
5236  } else {
5237  v24 = 1; // 90 , 70 , 50
5238  }
5239 
5240  if (v24 == 1) {
5241  pTexture = Source;
5242  v44 = "%s A";
5243  } else if (v24 == 2) {
5244  pTexture = Source;
5245  v44 = "%s B";
5246  } else {
5247  if (v24 != 3) continue;
5248  pTexture = Source;
5249  v44 = "%s C";
5250  }
5251 
5252  sprintf(Str2, v44, pTexture);
5253  }
5254 
5255  v50 = pMonsterList->GetMonsterIDByName(Str2);
5256  pTexture = Str2;
5257  if ((signed __int16)v50 == -1) {
5258  logger->Warning(
5259  L"Can't create random monster: '%S'! See MapStats.txt and "
5260  L"Monsters.txt!",
5261  pTexture);
5263  }
5264 
5265  v27 = &pMonsterList->pMonsters[(signed __int16)v50];
5266  v28 = pMonsterStats->FindMonsterByTextureName(pTexture);
5267  if (!v28) v28 = 1;
5268  Src = &pMonsterStats->pInfos[v28];
5269  strcpy(pMonster->pActorName, Src->pName);
5270  pMonster->sCurrentHP = Src->uHP;
5271  assert(sizeof(MonsterInfo) == 88);
5272  memcpy(&pMonster->pMonsterInfo, Src,
5273  sizeof(MonsterInfo)); // Uninitialized portail memory access
5274  pMonster->word_000086_some_monster_id = v50 + 1;
5275  pMonster->uActorRadius = v27->uMonsterRadius;
5276  pMonster->uActorHeight = v27->uMonsterHeight;
5277  pMonster->uMovementSpeed = v27->uMovementSpeed;
5278  pMonster->vInitialPosition.x = spawn->vPosition.x;
5279  pMonster->vPosition.x = spawn->vPosition.x;
5280  pMonster->uTetherDistance = 256;
5281  pMonster->vInitialPosition.y = a4;
5282  pMonster->vPosition.y = a4;
5283  pMonster->vInitialPosition.z = a3;
5284  pMonster->vPosition.z = a3;
5285  pMonster->uSectorID = pSector;
5286  pMonster->uGroup = spawn->uGroup;
5287  pMonster->PrepareSprites(0);
5289  v32 = rand();
5290  a3 = fixpoint_mul(stru_5C6E00->Cos(v32 % 2048), v52);
5291  pPosX = a3 + spawn->vPosition.x;
5292  a3 = fixpoint_mul(stru_5C6E00->Sin(v32 % 2048), v52);
5293  a4 = a3 + spawn->vPosition.y;
5294  a3 = spawn->vPosition.z;
5296  if (a5) pMonster->uAttributes |= ACTOR_AGGRESSOR;
5297  ++uNumActors;
5298  continue;
5299  }
5300  v37 = pIndoor->GetSector(pPosX, a4, spawn->vPosition.z);
5301  if (v37 == pSector) {
5302  v38 = BLV_GetFloorLevel(pPosX, a4, a3, v37, &uFaceID);
5303  v39 = v38;
5304  if (v38 != -30000) {
5305  if (abs(v38 - a3) <= 1024) {
5306  a3 = v39;
5307  if (a5) pMonster->uAttributes |= ACTOR_AGGRESSOR;
5308  ++uNumActors;
5309  continue;
5310  }
5311  }
5312  }
5313  // v53 = (char *)v53 + 1;
5314  // result = v53;
5315  }
5316  // while ( (signed int)v53 < NumToSpawn );
5317 }

Перекрестные ссылки BLV_GetFloorLevel(), stru193_math::Cos(), OutdoorLocation::ddm, MapInfo::Dif_M1, MapInfo::Dif_M2, MapInfo::Dif_M3, IndoorLocation::dlv, Engine_DeinitializeAndTerminate(), DDM_DLV_Header::field_C_alert, MonsterStats::FindMonsterByTextureName(), fixpoint_mul(), MonsterList::GetMonsterIDByName(), IndoorLocation::GetSector(), MonsterInfo::Hostility_Friendly, LEVEL_Indoor, LEVEL_Outdoor, logger, Actor::pActorName, pActors, MapInfo::pEncounterMonster1Texture, MapInfo::pEncounterMonster2Texture, MapInfo::pEncounterMonster3Texture, pIndoor, MonsterStats::pInfos, Actor::pMonsterInfo, pMonsterList, MonsterList::pMonsters, pMonsterStats, MonsterInfo::pName, pOutdoor, Actor::PrepareSprites(), Actor::sCurrentHP, stru193_math::Sin(), stru_5C6E00, Actor::uActorHeight, Actor::uActorRadius, Actor::uAttributes, SpawnPointMM7::uAttributes, uCurrentlyLoadedLevelType, MapInfo::uEncounterMonster1AtLeast, MapInfo::uEncounterMonster1AtMost, MapInfo::uEncounterMonster2AtLeast, MapInfo::uEncounterMonster2AtMost, MapInfo::uEncounterMonster3AtLeast, MapInfo::uEncounterMonster3AtMost, Actor::uGroup, SpawnPointMM7::uGroup, MonsterInfo::uHostilityType, MonsterInfo::uHP, SpawnPointMM7::uIndex, MonsterDesc::uMonsterHeight, MonsterDesc::uMonsterRadius, MonsterDesc::uMovementSpeed, Actor::uMovementSpeed, uNumActors, Actor::uSectorID, Actor::uTetherDistance, Actor::vInitialPosition, Actor::vPosition, SpawnPointMM7::vPosition, Log::Warning(), Actor::word_000086_some_monster_id и word_4E8152.

Используется в _45063B_spawn_some_monster(), ODM_LoadAndInitialize(), PrepareToLoadBLV() и sub_448CF4_spawn_monsters().

+ Граф вызовов:
+ Граф вызова функции:

◆ area_of_effect__damage_evaluate()

void area_of_effect__damage_evaluate ( )

См. определение в файле Actor.cpp строка 5320

5320  { // not damaging party correctly
5321  int attacker_PID_type; // ecx@3
5322  signed int attacker_PID_id; // eax@3
5323  unsigned int target_id; // edi@6
5324  int target_type; // eax@6
5325  int v10; // edi@8
5326  Vec3_int_ attacker_coord; // ST04_12@9
5327  // int v12; // ST0C_4@10
5328  int v15; // edx@15
5329  int v19; // edi@15
5330  int v23; // edx@18
5331  int v24; // eax@18
5332  // int v30; // eax@29
5333  int v31; // edx@29
5334  int v32; // eax@29
5335  int v33; // ST24_4@29
5336  SpriteObject *sprite_obj_ptr = nullptr; // [sp+0h] [bp-28h]@0
5337  int attack_index; // [sp+10h] [bp-18h]@1
5338  int v44; // [sp+14h] [bp-14h]@15
5339  // Vec3_int_ *pVelocity; // [sp+1Ch] [bp-Ch]@2
5340  signed int a1; // [sp+20h] [bp-8h]@8
5341  int v48; // [sp+24h] [bp-4h]@8
5342 
5343  for (attack_index = 0; attack_index < AttackerInfo.count; ++attack_index) {
5344  attacker_PID_type = PID_TYPE(AttackerInfo.pIDs[attack_index]);
5345  // pid types - enum ObjectType
5346  attacker_PID_id = PID_ID(AttackerInfo.pIDs[attack_index]);
5347 
5348  // attacker is an item (sprite)
5349  if (attacker_PID_type == OBJECT_Item) {
5350  sprite_obj_ptr = &pSpriteObjects[attacker_PID_id];
5351  attacker_PID_type = PID_TYPE(pSpriteObjects[attacker_PID_id].spell_caster_pid);
5352  attacker_PID_id = PID_ID(pSpriteObjects[attacker_PID_id].spell_caster_pid);
5353  }
5354 
5355  if (AttackerInfo.field_3EC[attack_index] & 1) {
5356  target_id = PID_ID(ai_near_actors_targets_pid[attacker_PID_id]);
5357  target_type = PID_TYPE(ai_near_actors_targets_pid[attacker_PID_id]) - 3;
5358  if (target_type) {
5359  if (target_type == 1) { // party damage from monsters(повреждения
5360  // группе от монстров)
5361  v10 = pParty->vPosition.y - AttackerInfo.pYs[attack_index];
5362  a1 = pParty->vPosition.x - AttackerInfo.pXs[attack_index];
5363  v48 = pParty->vPosition.y - AttackerInfo.pYs[attack_index];
5364  if (a1 * a1 + v10 * v10 +
5365  ((signed int)(pParty->vPosition.z +
5366  pParty->uPartyHeight) >>
5367  (1 - AttackerInfo.pZs[attack_index])) *
5368  ((signed int)(pParty->vPosition.z +
5369  pParty->uPartyHeight) >>
5370  (1 - AttackerInfo.pZs[attack_index])) <
5371  (unsigned int)((AttackerInfo.field_324[attack_index] +
5372  32) *
5373  (AttackerInfo.field_324[attack_index] +
5374  32))) {
5375  attacker_coord.x = AttackerInfo.pXs[attack_index];
5376  attacker_coord.y = AttackerInfo.pYs[attack_index];
5377  attacker_coord.z = AttackerInfo.pZs[attack_index];
5380  attacker_coord))
5382  AttackerInfo.pIDs[attack_index],
5383  AttackerInfo.field_450[attack_index],
5384  &AttackerInfo.vec_4B4[attack_index],
5386  &pActors[attacker_PID_id]));
5387  }
5388  }
5389  } else { // Actor damage from monsters(повреждение местного жителя)
5390  if (pActors[target_id]
5391  .pActorBuffs[ACTOR_BUFF_PARALYZED]
5392  .Active() ||
5393  pActors[target_id].CanAct()) {
5394  v15 = pActors[target_id].vPosition.y -
5395  AttackerInfo.pYs[attack_index];
5396  a1 = pActors[target_id].vPosition.x -
5397  AttackerInfo.pXs[attack_index];
5398  v44 = pActors[target_id].vPosition.z;
5399  v19 = AttackerInfo.field_324[attack_index] +
5400  pActors[target_id].uActorRadius;
5401  v48 = v15;
5402  if (a1 * a1 + v15 * v15 +
5403  (pActors[target_id].vPosition.z +
5404  (pActors[target_id].uActorHeight >> 1) -
5405  AttackerInfo.pZs[attack_index]) *
5406  (pActors[target_id].vPosition.z +
5407  (pActors[target_id].uActorHeight >> 1) -
5408  AttackerInfo.pZs[attack_index]) <
5409  (unsigned int)(v19 * v19)) {
5410  attacker_coord.x = AttackerInfo.pXs[attack_index];
5411  attacker_coord.y = AttackerInfo.pYs[attack_index];
5412  attacker_coord.z = AttackerInfo.pZs[attack_index];
5413  if (sub_407A1C(pActors[target_id].vPosition.x,
5414  pActors[target_id].vPosition.y,
5415  pActors[target_id].vPosition.z + 50,
5416  attacker_coord)) {
5417  Vec3_int_::Normalize(&a1, &v48, &v44);
5418  AttackerInfo.vec_4B4[attack_index].x = a1;
5419  AttackerInfo.vec_4B4[attack_index].y = v48;
5420  AttackerInfo.vec_4B4[attack_index].z = v44;
5422  AttackerInfo.pIDs[attack_index], target_id,
5423  &AttackerInfo.vec_4B4[attack_index],
5424  AttackerInfo.field_450[attack_index]);
5425  }
5426  }
5427  }
5428  }
5429  } else { // damage from spells(повреждения от заклов(метеоритный дождь))
5430  v23 = pParty->vPosition.y - AttackerInfo.pYs[attack_index];
5431  v24 = ((signed int)pParty->uPartyHeight / 2) -
5432  AttackerInfo.pZs[attack_index];
5433  a1 = pParty->vPosition.x - AttackerInfo.pXs[attack_index];
5434  v48 = pParty->vPosition.y - AttackerInfo.pYs[attack_index];
5435  if (a1 * a1 + v23 * v23 +
5436  (pParty->vPosition.z + v24) * (pParty->vPosition.z + v24) <
5437  (unsigned int)((AttackerInfo.field_324[attack_index] + 32) *
5438  (AttackerInfo.field_324[attack_index] +
5439  32))) { // party damage (повреждения группе)
5440  attacker_coord.x = AttackerInfo.pXs[attack_index];
5441  attacker_coord.y = AttackerInfo.pYs[attack_index];
5442  attacker_coord.z = AttackerInfo.pZs[attack_index];
5445  attacker_coord)) {
5446  for (uint i = 0; i < 4; ++i) {
5447  if (!pParty->pPlayers[i]
5448  .conditions_times[Condition_Dead] &&
5449  !pParty->pPlayers[i]
5450  .conditions_times[Condition_Pertified] &&
5451  !pParty->pPlayers[i]
5452  .conditions_times[Condition_Eradicated]) {
5454  AttackerInfo.pIDs[attack_index],
5455  AttackerInfo.field_450[attack_index],
5456  &AttackerInfo.vec_4B4[attack_index], i);
5457  }
5458  }
5459  }
5460  }
5461 
5462  if (uNumActors >
5463  0) { // actors damage(повреждения другим участникам)
5464  for (int actorID = 0;
5465  (signed int)actorID < (signed int)uNumActors; ++actorID) {
5466  if (pActors[actorID].CanAct()) {
5467  // v30 = pActors[actorID].vPosition.y -
5468  // AttackerInfo.pYs[attack_index];
5469  a1 = pActors[actorID].vPosition.x -
5470  AttackerInfo.pXs[attack_index];
5471  v31 = pActors[actorID].vPosition.z;
5472  v48 = pActors[actorID].vPosition.y -
5473  AttackerInfo.pYs[attack_index];
5474  v44 = pActors[actorID].vPosition.z;
5475  v32 = (pActors[actorID].uActorHeight / 2) -
5476  AttackerInfo.pZs[attack_index];
5477  v33 = pActors[actorID].uActorRadius +
5478  AttackerInfo.field_324[attack_index];
5479  if (a1 * a1 + v48 * v48 + (v31 + v32) * (v31 + v32) <
5480  (unsigned int)(v33 * v33)) {
5481  attacker_coord.x = AttackerInfo.pXs[attack_index];
5482  attacker_coord.y = AttackerInfo.pYs[attack_index];
5483  attacker_coord.z = AttackerInfo.pZs[attack_index];
5484  if (sub_407A1C(pActors[actorID].vPosition.x,
5485  pActors[actorID].vPosition.y,
5486  pActors[actorID].vPosition.z + 50,
5487  attacker_coord)) { // что делает ф-ция?
5488  Vec3_int_::Normalize(&a1, &v48, &v44);
5489  AttackerInfo.vec_4B4[attack_index].x = a1;
5490  AttackerInfo.vec_4B4[attack_index].y = v48;
5491  AttackerInfo.vec_4B4[attack_index].z = v44;
5492  switch (attacker_PID_type) {
5493  case OBJECT_Player:
5495  AttackerInfo.pIDs[attack_index],
5496  actorID,
5497  &AttackerInfo.vec_4B4[attack_index]);
5498  break;
5499  case OBJECT_Actor:
5500  if (sprite_obj_ptr &&
5501  pActors[attacker_PID_id].GetActorsRelation(
5502  &pActors[actorID]))
5504  AttackerInfo.pIDs[attack_index],
5505  actorID,
5506  &AttackerInfo
5507  .vec_4B4[attack_index],
5508  sprite_obj_ptr->field_61);
5509  break;
5510  case OBJECT_Item:
5512  AttackerInfo.pIDs[attack_index],
5513  actorID,
5514  &AttackerInfo.vec_4B4[attack_index]);
5515  break;
5516  }
5517  }
5518  }
5519  }
5520  }
5521  }
5522  }
5523  }
5524  AttackerInfo.count = 0;
5525 }

Перекрестные ссылки ACTOR_BUFF_PARALYZED, Actor::ActorDamageFromMonster(), ai_near_actors_targets_pid, AttackerInfo, Condition_Dead, Condition_Eradicated, Condition_Pertified, stru298::count, Actor::DamageMonsterFromParty(), DamagePlayerFromMonster(), stru298::field_324, stru298::field_3EC, stru298::field_450, SpriteObject::field_61, ItemDamageFromActor(), OBJECT_Actor, OBJECT_Item, OBJECT_Player, pActors, stru298::pIDs, pParty, Party::pPlayers, pSpriteObjects, stru298::pXs, stru298::pYs, stru298::pZs, Party::sEyelevel, stru_50C198, sub_407A1C(), uNumActors, Party::uPartyHeight, stru298::vec_4B4, Party::vPosition и stru319::which_player_to_attack().

Используется в UpdateUserInput_and_MapSpecificStuff().

+ Граф вызовов:
+ Граф вызова функции:

◆ sub_43AE12()

double sub_43AE12 ( signed int  a1)

См. определение в файле Actor.cpp строка 5528

5528  {
5529  // signed int v1; // ST00_4@1
5530  signed int v2; // ecx@1
5531  double v3; // st7@1
5532  double result; // st7@6
5533 
5534  v3 = (double)a1;
5535  for (v2 = 0; v2 < 5; ++v2) {
5536  if (v3 < flt_4E4A80[v2 + 5]) break;
5537  }
5538  if (v2 <= 0 || v2 >= 5) {
5539  if (v2)
5540  result = flt_4E4A80[4];
5541  else
5542  result = flt_4E4A80[0];
5543  } else {
5544  result = (flt_4E4A80[v2] - flt_4E4A80[v2 - 1]) *
5545  (v3 - flt_4E4A80[v2 + 4]) /
5546  (flt_4E4A80[v2 + 5] - flt_4E4A80[v2 + 4]) +
5547  flt_4E4A80[v2];
5548  }
5549  return result;
5550 }

Перекрестные ссылки flt_4E4A80.

Используется в Actor::AddBloodsplatOnDamageOverlay().

+ Граф вызова функции:

◆ ItemDamageFromActor()

void ItemDamageFromActor ( unsigned int  uObjID,
unsigned int  uActorID,
struct Vec3_int_ *  pVelocity 
)

См. определение в файле Actor.cpp строка 5553

5554  {
5555  int v6; // eax@4
5556  int damage; // edi@4
5557  int a2a; // [sp+Ch] [bp-4h]@8
5558 
5559  if (!pActors[uActorID].IsNotAlive()) {
5560  if (PID_TYPE(uObjID) == OBJECT_Item) {
5561  if (pSpriteObjects[PID_ID(uObjID)].spell_id) {
5563  pSpriteObjects[PID_ID(uObjID)].spell_id,
5564  pSpriteObjects[PID_ID(uObjID)].spell_level,
5565  pSpriteObjects[PID_ID(uObjID)].spell_skill,
5566  pActors[uActorID].sCurrentHP);
5567  damage = pActors[uActorID].CalcMagicalDamageToActor(
5568  (DAMAGE_TYPE)0, v6);
5569  pActors[uActorID].sCurrentHP -= damage;
5570  if (damage) {
5571  if (pActors[uActorID].sCurrentHP > 0)
5572  Actor::AI_Stun(uActorID, uObjID, 0);
5573  else
5574  Actor::Die(uActorID);
5575  a2a = 20 * damage /
5576  (signed int)pActors[uActorID].pMonsterInfo.uHP;
5577  if (20 * damage /
5578  (signed int)pActors[uActorID].pMonsterInfo.uHP >
5579  10)
5580  a2a = 10;
5582  pActors[uActorID].pMonsterInfo.uID,
5584  pVelocity->x = fixpoint_mul(a2a, pVelocity->x);
5585  pVelocity->y = fixpoint_mul(a2a, pVelocity->y);
5586  pVelocity->z = fixpoint_mul(a2a, pVelocity->z);
5587  pActors[uActorID].vVelocity.x =
5588  50 * (short)pVelocity->x;
5589  pActors[uActorID].vVelocity.y =
5590  50 * (short)pVelocity->y;
5591  pActors[uActorID].vVelocity.z =
5592  50 * (short)pVelocity->z;
5593  }
5594  Actor::AddBloodsplatOnDamageOverlay(uActorID, 1, damage);
5595  } else {
5596  Actor::AI_Stun(uActorID, uObjID, 0);
5597  }
5598  }
5599  }
5600  }
5601 }

Перекрестные ссылки _43AFE3_calc_spell_damage(), Actor::AddBloodsplatOnDamageOverlay(), Actor::AI_Stun(), MonsterStats::BelongsToSupertype(), Actor::Die(), fixpoint_mul(), MONSTER_SUPERTYPE_TREANT, OBJECT_Item, pActors и pSpriteObjects.

Используется в area_of_effect__damage_evaluate() и sub_43A97E().

+ Граф вызовов:
+ Граф вызова функции:

Переменные

◆ stru_50C198

◆ pActors

std::array<Actor, 500> pActors

См. определение в файле Actor.cpp строка 38

Используется в stru262_TurnBased::_406457(), CastSpellInfoHelpers::_427E01_cast_spell(), Player::_42ECB5_PlayerAttacksActor(), _45063B_spawn_some_monster(), Engine::_461103_load_level_sub(), Party::_46A89E_immolation_effect(), SpriteObject::_46BEF1_apply_spells_aoe(), _46BFFA_update_spell_fx(), Actor::_46DF1A_collide_against_actor(), _493938_regenerate(), Actor::_SelectTarget(), stru262_TurnBased::ActorAIChooseNewTargets(), stru262_TurnBased::ActorAIDoAdditionalMove(), Actor::ActorDamageFromMonster(), ActorInteraction(), stru262_TurnBased::ActorMove(), Actor::AggroSurroundingPeasants(), stru262_TurnBased::AI_Action_(), Actor::AI_Bored(), Actor::AI_FaceObject(), Actor::AI_Flee(), Actor::AI_MeleeAttack(), Actor::AI_MissileAttack1(), Actor::AI_MissileAttack2(), Actor::AI_Pursue1(), Actor::AI_Pursue2(), Actor::AI_Pursue3(), Actor::AI_RandomMove(), Actor::AI_RangedAttack(), Actor::AI_SpellAttack(), Actor::AI_SpellAttack1(), Actor::AI_SpellAttack2(), Actor::AI_Stand(), Actor::AI_Stun(), stru262_TurnBased::AIAttacks(), stru262_TurnBased::AITurnBasedAction(), Actor::ApplyFineForKillingPeasant(), area_of_effect__damage_evaluate(), Arena_SelectionFightLevel(), Actor::Arena_summon_actor(), check_event_triggers(), CheckActors_proximity(), Actor::DamageMonsterFromParty(), DamagePlayerFromMonster(), Actor::Die(), DoInteractionWithTopmostZObject(), DoPrepareWorld(), stru262_TurnBased::End(), Application::Game::EventLoop(), EventProcessor(), Actor::Explode(), Game_StartDialogue(), GameUI_DrawMinimap(), GameUI_WritePointedObjectStatusString(), Render::GetActorsInViewport(), Actor::GetDirectionInfo(), Actor::GiveItem(), OutdoorLocation::InitalizeActors(), Actor::InitializeActors(), Vis::is_part_of_selection(), ItemDamageFromActor(), OutdoorLocation::Load(), IndoorLocation::Load(), Actor::MakeActorAIList_BLV(), Actor::MakeActorAIList_ODM(), MonsterPopup_Draw(), stru262_TurnBased::NextTurn(), Engine::OnGameViewportClick(), AudioPlayer::PlaySound(), Actor::PlaySound(), IndoorLocation::PrepareActorRenderList_BLV(), OutdoorLocation::PrepareActorsDrawList(), PrepareToLoadBLV(), Actor::Resurrect(), SaveGame(), Actor::SearchActorByGroup(), Actor::SearchActorByID(), Actor::SearchActorByMonsterID(), Actor::SearchAliveActors(), stru262_TurnBased::SetAIRecoveryTimes(), stru262_TurnBased::SortTurnQueue(), SpawnActor(), SpawnEncounter(), Actor::StandAwhile(), stru262_TurnBased::Start(), Player::StealFromActor(), stru262_TurnBased::StepTurnQueue(), sub_4070EF_prolly_detect_player(), sub_448518_npc_set_item(), sub_448CF4_spawn_monsters(), sub_44FA4C_spawn_light_elemental(), Actor::SummonMinion(), ToggleActorGroupFlag(), Actor::ToggleFlag(), GUIWindow_Dialogue::Update(), Actor::UpdateActorAI(), UpdateActors_BLV(), UpdateActors_ODM(), SpriteObject::UpdateObject_fn0_BLV(), SpriteObject::UpdateObject_fn0_ODM(), UpdateObjects() и Party::Yell().

◆ uNumActors

size_t uNumActors
stru298::field_450
char field_450[100]
Definition: stru298.h:19
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
SpriteObject
Definition: SpriteObject.h:189
Actor::vPosition
struct Vec3_short_ vPosition
Definition: Actor.h:298
uNumActors
size_t uNumActors
Definition: Actor.cpp:39
Party::vPosition
Vec3_int_ vPosition
Definition: Party.h:250
sub_407A1C
bool sub_407A1C(int x, int y, int z, Vec3_int_ v)
Definition: Indoor.cpp:3199
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
int_get_vector_length
uint32_t int_get_vector_length(int32_t x, int32_t y, int32_t z)
Definition: VectorTypes.cpp:8
AttackingMelee
@ AttackingMelee
Definition: Actor.h:77
pLevelDecorations
std::array< LevelDecoration, 3000 > pLevelDecorations
Definition: Decoration.cpp:8
Actor::uActorHeight
uint16_t uActorHeight
Definition: Actor.h:296
stru298::vec_4B4
Vec3_int_ vec_4B4[100]
Definition: stru298.h:20
Dying
@ Dying
Definition: Actor.h:79
ANIM_GotHit
@ ANIM_GotHit
Definition: Actor.h:103
ACTOR_BUFF_PAIN_REFLECTION
@ ACTOR_BUFF_PAIN_REFLECTION
Definition: Actor.h:58
Party::GetPlayingTime
GameTime & GetPlayingTime()
Definition: Party.h:230
BLVFace::pFacePlane_old
struct Plane_int_ pFacePlane_old
Definition: Indoor.h:471
MapInfo::pEncounterMonster1Texture
String pEncounterMonster1Texture
Definition: MapInfo.h:40
MonsterInfo::uHostilityType
HostilityRadius uHostilityType
Definition: Monsters.h:131
IndoorLocation::pSectors
struct BLVSector * pSectors
Definition: Indoor.h:634
ABILITY_ATTACK1
@ ABILITY_ATTACK1
Definition: Actor.h:31
pSpriteObjects
std::array< SpriteObject, MAX_SPRITE_OBJECTS > pSpriteObjects
Definition: SpriteObject.cpp:34
pSprites_LOD
LODFile_Sprites * pSprites_LOD
Definition: LOD.cpp:20
BLVFace::pVertexIDs
uint16_t * pVertexIDs
Definition: Indoor.h:476
OBJECT_Item
@ OBJECT_Item
Definition: Actor.h:66
pMonsterStats
struct MonsterStats * pMonsterStats
Definition: Monsters.cpp:8
Actor::SearchActorByGroup
static unsigned int SearchActorByGroup(unsigned int *pTotalActors, unsigned int uGroup)
Definition: Actor.cpp:3283
dword_5C6DF8
int dword_5C6DF8
Definition: mm7_data.cpp:651
ACTOR_BUFF_DAY_OF_PROTECTION
@ ACTOR_BUFF_DAY_OF_PROTECTION
Definition: Actor.h:51
fixpoint_div
__int64 fixpoint_div(int a1, int a2)
Definition: OurMath.cpp:147
ANIM_Standing
@ ANIM_Standing
Definition: Actor.h:99
MapInfo::uEncounterMonster2AtMost
uint8_t uEncounterMonster2AtMost
Definition: MapInfo.h:62
stru298::field_324
int16_t field_324[100]
Definition: stru298.h:17
Actor
Definition: Actor.h:151
Party::sEyelevel
int sEyelevel
Definition: Party.h:239
MonsterInfo::Hostility_Friendly
@ Hostility_Friendly
Definition: Monsters.h:111
Paralyzed
@ Paralyzed
Definition: Actor.h:90
ItemDamageFromActor
void ItemDamageFromActor(unsigned int uObjID, unsigned int uActorID, Vec3_int_ *pVelocity)
Definition: Actor.cpp:5553
MapInfo::uEncounterMonster3AtMost
uint8_t uEncounterMonster3AtMost
Definition: MapInfo.h:65
ACTOR_BUFF_HEROISM
@ ACTOR_BUFF_HEROISM
Definition: Actor.h:56
ANIM_Dying
@ ANIM_Dying
Definition: Actor.h:104
stru298::count
int count
Definition: stru298.h:12
Standing
@ Standing
Definition: Actor.h:75
AttackingRanged4
@ AttackingRanged4
Definition: Actor.h:93
Party::pPlayers
std::array< Player, 4 > pPlayers
Definition: Party.h:310
ai_near_actors_targets_pid
std::array< int, 500 > ai_near_actors_targets_pid
Definition: mm7_data.cpp:502
ACTOR_BUFF_SLOWED
@ ACTOR_BUFF_SLOWED
Definition: Actor.h:45
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
MapInfo::uEncounterMonster1AtMost
uint8_t uEncounterMonster1AtMost
Definition: MapInfo.h:59
BBox_short_::z2
int16_t z2
Definition: VectorTypes.h:119
pIndoor
IndoorLocation * pIndoor
Definition: Indoor.cpp:49
ACTOR_BUFF_AFRAID
@ ACTOR_BUFF_AFRAID
Definition: Actor.h:42
Plane_int_::vNormal
Vec3_int_ vNormal
Definition: VectorTypes.h:107
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
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9435
OBJECT_Actor
@ OBJECT_Actor
Definition: Actor.h:67
Stoned
@ Stoned
Definition: Actor.h:89
Party::uPartyHeight
unsigned int uPartyHeight
Definition: Party.h:237
SpawnPointMM7::uAttributes
uint16_t uAttributes
Definition: Indoor.h:318
SpriteObject::field_61
char field_61
Definition: SpriteObject.h:235
stru298::field_3EC
char field_3EC[100]
Definition: stru298.h:18
stru319::which_player_to_attack
int which_player_to_attack(struct Actor *pActor)
Definition: Actor.cpp:3754
DAMAGE_TYPE
DAMAGE_TYPE
Definition: Items.h:10
DDM_DLV_Header::field_C_alert
int field_C_alert
Definition: Indoor.h:97
MapInfo::Dif_M3
char Dif_M3
Definition: MapInfo.h:63
pParty
Party * pParty
Definition: Party.cpp:30
Fidgeting
@ Fidgeting
Definition: Actor.h:84
ACTOR_BUFF_CHARM
@ ACTOR_BUFF_CHARM
Definition: Actor.h:39
ACTOR_BUFF_PARALYZED
@ ACTOR_BUFF_PARALYZED
Definition: Actor.h:44
ACTOR_BUFF_MASS_DISTORTION
@ ACTOR_BUFF_MASS_DISTORTION
Definition: Actor.h:48
OBJECT_BModel
@ OBJECT_BModel
Definition: Actor.h:70
BLVSector::pPortals
uint16_t * pPortals
Definition: Indoor.h:538
flt_4E4A80
std::array< float, 10 > flt_4E4A80
Definition: mm7_data.cpp:251
ABILITY_SPELL2
@ ABILITY_SPELL2
Definition: Actor.h:34
MapInfo::uEncounterMonster3AtLeast
uint8_t uEncounterMonster3AtLeast
Definition: MapInfo.h:64
Disabled
@ Disabled
Definition: Actor.h:94
MapInfo::Dif_M1
char Dif_M1
Definition: MapInfo.h:57
stru298::pYs
int16_t pYs[100]
Definition: stru298.h:15
Condition_Dead
@ Condition_Dead
Definition: Conditions.h:22
Actor::uAttributes
unsigned int uAttributes
Definition: Actor.h:289
ACTOR_BUFF_SOMETHING_THAT_HALVES_AC
@ ACTOR_BUFF_SOMETHING_THAT_HALVES_AC
Definition: Actor.h:46
BBox_short_::y2
int16_t y2
Definition: VectorTypes.h:117
BLVFace::uSectorID
uint16_t uSectorID
Definition: Indoor.h:484
BLVFace
Definition: Indoor.h:424
ABILITY_SPELL1
@ ABILITY_SPELL1
Definition: Actor.h:33
MonsterList::GetMonsterIDByName
int16_t GetMonsterIDByName(const char *pMonsterName)
Definition: Monsters.cpp:1192
stru298::pIDs
int16_t pIDs[100]
Definition: stru298.h:13
v1
GLfloat GLfloat v1
Definition: SDL_opengl_glext.h:694
Actor::uTetherDistance
uint16_t uTetherDistance
Definition: Actor.h:306
IndoorLocation::dlv
struct DDM_DLV_Header dlv
Definition: Indoor.h:648
Log::Warning
void Warning(const wchar_t *pFormat,...)
Definition: Log.cpp:28
ACTOR_BUFF_HASTE
@ ACTOR_BUFF_HASTE
Definition: Actor.h:57
fixpoint_mul
__int64 fixpoint_mul(int a1, int a2)
Definition: OurMath.cpp:138
pActors
std::array< Actor, 500 > pActors
Definition: Actor.cpp:38
Actor::uActorRadius
uint16_t uActorRadius
Definition: Actor.h:295
MapInfo::uEncounterMonster1AtLeast
uint8_t uEncounterMonster1AtLeast
Definition: MapInfo.h:58
Actor::SearchAliveActors
static unsigned int SearchAliveActors(unsigned int *pTotalActors)
Definition: Actor.cpp:3318
ANIM_Dead
@ ANIM_Dead
Definition: Actor.h:105
MonsterStats::pInfos
MonsterInfo pInfos[265]
Definition: Monsters.h:194
stru_50C198
stru319 stru_50C198
Definition: Actor.cpp:41
MonsterDesc::uMonsterRadius
uint16_t uMonsterRadius
Definition: Monsters.h:215
BLVSector::uNumPortals
int16_t uNumPortals
Definition: Indoor.h:536
LEVEL_Outdoor
@ LEVEL_Outdoor
Definition: Indoor.h:287
ABILITY_ATTACK2
@ ABILITY_ATTACK2
Definition: Actor.h:32
MapInfo::uEncounterMonster2AtLeast
uint8_t uEncounterMonster2AtLeast
Definition: MapInfo.h:61
ANIM_AtkMelee
@ ANIM_AtkMelee
Definition: Actor.h:101
Actor::AddBloodsplatOnDamageOverlay
static void AddBloodsplatOnDamageOverlay(unsigned int uActorID, int a2, int a3)
Definition: Actor.cpp:1257
Actor::uSectorID
int16_t uSectorID
Definition: Actor.h:302
Removed
@ Removed
Definition: Actor.h:86
Interacting
@ Interacting
Definition: Actor.h:85
pPaletteManager
PaletteManager * pPaletteManager
Definition: PaletteManager.cpp:7
Actor::SearchActorByMonsterID
static unsigned int SearchActorByMonsterID(unsigned int *pTotalActors, int uMonsterID)
Definition: Actor.cpp:3300
BLVFace::uBackSectorID
int16_t uBackSectorID
Definition: Indoor.h:485
BLVFace::pBounding
struct BBox_short_ pBounding
Definition: Indoor.h:486
Engine_DeinitializeAndTerminate
void Engine_DeinitializeAndTerminate(int exitCode)
Definition: Engine.cpp:157
OutdoorLocation::ddm
struct DDM_DLV_Header ddm
Definition: Outdoor.h:131
Actor::ActorDamageFromMonster
static void ActorDamageFromMonster(int attacker_id, unsigned int actor_id, struct Vec3_int_ *pVelocity, int a4)
Definition: Actor.cpp:2507
LEVEL_Indoor
@ LEVEL_Indoor
Definition: Indoor.h:286
Plane_int_::dist
int dist
Definition: VectorTypes.h:108
word_4E8152
std::array< int16_t, 11 > word_4E8152
Definition: mm7_data.cpp:303
MonsterDesc
Definition: Monsters.h:213
distance
GLsizei GLsizei GLfloat distance
Definition: SDL_opengl_glext.h:9203
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
MapInfo::Dif_M2
char Dif_M2
Definition: MapInfo.h:60
MonsterStats::BelongsToSupertype
static bool BelongsToSupertype(unsigned int uMonsterInfoID, enum MONSTER_SUPERTYPE eSupertype)
Definition: Monsters.cpp:1200
MapInfo::pEncounterMonster3Texture
String pEncounterMonster3Texture
Definition: MapInfo.h:42
MonsterList::pMonsters
struct MonsterDesc * pMonsters
Definition: Monsters.h:237
PaletteManager::ResetNonTestLocked
int ResetNonTestLocked()
Definition: PaletteManager.cpp:619
Actor::vInitialPosition
struct Vec3_short_ vInitialPosition
Definition: Actor.h:304
MonsterStats::FindMonsterByTextureName
signed int FindMonsterByTextureName(const char *Str2)
Definition: Monsters.cpp:440
ACTOR_BUFF_SHIELD
@ ACTOR_BUFF_SHIELD
Definition: Actor.h:53
MONSTER_SUPERTYPE_TREANT
@ MONSTER_SUPERTYPE_TREANT
Definition: Monsters.h:75
Actor::sCurrentHP
int16_t sCurrentHP
Definition: Actor.h:290
MonsterInfo::uHP
unsigned int uHP
Definition: Monsters.h:175
DamagePlayerFromMonster
void DamagePlayerFromMonster(unsigned int uObjID, int dmgSource, Vec3_int_ *pPos, signed int a4)
Definition: Player.cpp:6928
ACTOR_BUFF_STONED
@ ACTOR_BUFF_STONED
Definition: Actor.h:43
pMonsterList
struct MonsterList * pMonsterList
Definition: Monsters.cpp:9
ANIM_Bored
@ ANIM_Bored
Definition: Actor.h:106
v2
GLfloat GLfloat GLfloat v2
Definition: SDL_opengl_glext.h:695
ANIM_Walking
@ ANIM_Walking
Definition: Actor.h:100
integer_sqrt
int integer_sqrt(int val)
Definition: OurMath.cpp:164
uint
unsigned int uint
Definition: MM7.h:4
sub_4075DB
bool sub_4075DB(int x, int y, int z, BLVFace *face)
Definition: Indoor.cpp:5424
v3
GLfloat GLfloat GLfloat GLfloat v3
Definition: SDL_opengl_glext.h:696
Fleeing
@ Fleeing
Definition: Actor.h:82
AttackerInfo
stru298 AttackerInfo
Definition: mm7_data.cpp:24
OBJECT_Any
@ OBJECT_Any
Definition: Actor.h:64
OBJECT_BLVDoor
@ OBJECT_BLVDoor
Definition: Actor.h:65
SpawnPointMM7::vPosition
Vec3_int_ vPosition
Definition: Indoor.h:314
stru193_math::Cos
int Cos(int angle)
Definition: OurMath.cpp:28
MonsterDesc::uMovementSpeed
uint16_t uMovementSpeed
Definition: Monsters.h:216
stru_5C6E00
struct stru193_math * stru_5C6E00
Definition: mm7_data.cpp:19
IndoorLocation::pVertices
struct Vec3_short_ * pVertices
Definition: Indoor.h:628
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::uMovementSpeed
uint16_t uMovementSpeed
Definition: Actor.h:297
uCurrentlyLoadedLevelType
LEVEL_TYPE uCurrentlyLoadedLevelType
Definition: Indoor.cpp:52
MonsterInfo::pName
char * pName
Definition: Monsters.h:120
Actor::pActorName
char pActorName[32]
Definition: Actor.h:286
ACTOR_BUFF_STONESKIN
@ ACTOR_BUFF_STONESKIN
Definition: Actor.h:54
IndoorLocation::GetSector
int GetSector(int sX, int sY, int sZ)
Definition: Indoor.cpp:1279
IndoorLocation::pFaces
struct BLVFace * pFaces
Definition: Indoor.h:630
ACTOR_BUFF_BLESS
@ ACTOR_BUFF_BLESS
Definition: Actor.h:55
stru298::pXs
int16_t pXs[100]
Definition: stru298.h:14
stru193_math::Sin
int Sin(int angle)
Definition: OurMath.cpp:133
BBox_short_::x2
int16_t x2
Definition: VectorTypes.h:115
Condition_Eradicated
@ Condition_Eradicated
Definition: Conditions.h:24
stru298::pZs
int16_t pZs[100]
Definition: stru298.h:16
logger
Log * logger
Definition: IocContainer.cpp:47
Actor::PrepareSprites
void PrepareSprites(char load_sounds_if_bit1_set)
Definition: Actor.cpp:2481
SpawnPointMM7::uGroup
unsigned int uGroup
Definition: Indoor.h:319
MonsterList::uNumMonsters
signed int uNumMonsters
Definition: Monsters.h:236
ACTOR_BUFF_PAIN_HAMMERHANDS
@ ACTOR_BUFF_PAIN_HAMMERHANDS
Definition: Actor.h:59
Condition_Pertified
@ Condition_Pertified
Definition: Conditions.h:23
pOutdoor
OutdoorLocation * pOutdoor
Definition: Outdoor.cpp:48
ACTOR_BUFF_BERSERK
@ ACTOR_BUFF_BERSERK
Definition: Actor.h:47
SpawnPointMM7::uIndex
uint16_t uIndex
Definition: Indoor.h:317
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
LODFile_Sprites::DeleteSomeSprites
void DeleteSomeSprites()
Definition: LOD.cpp:299
MonsterInfo
Definition: Monsters.h:109
BLV_GetFloorLevel
int BLV_GetFloorLevel(int x, int y, int z, unsigned int uSectorID, unsigned int *pFaceID)
Definition: Indoor.cpp:2530
Party::sRotationY
int sRotationY
Definition: Party.h:251
Actor::word_000086_some_monster_id
int16_t word_000086_some_monster_id
Definition: Actor.h:294
String
std::string String
Definition: Strings.h:10
Pursuing
@ Pursuing
Definition: Actor.h:81
GameTime
Definition: Time.h:14
Stunned
@ Stunned
Definition: Actor.h:83
MapInfo::pEncounterMonster2Texture
String pEncounterMonster2Texture
Definition: MapInfo.h:41
GameTime::FromSeconds
static GameTime FromSeconds(int seconds)
Definition: Time.h:83
MonsterDesc::uMonsterHeight
uint16_t uMonsterHeight
Definition: Monsters.h:214
AttackingRanged3
@ AttackingRanged3
Definition: Actor.h:88
_43AFE3_calc_spell_damage
int _43AFE3_calc_spell_damage(int spellId, int spellLevel, signed int skillMastery, int currentHp)
Definition: Spells.cpp:745
ACTOR_BUFF_ENSLAVED
@ ACTOR_BUFF_ENSLAVED
Definition: Actor.h:50