World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл SpriteObject.cpp

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

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

using EngineIoc = Engine_::IocContainer
 

Функции

void CompactLayingItemsList ()
 
bool _46BFFA_update_spell_fx (unsigned int uLayingItemID, int a2)
 
void sub_43A97E (unsigned int uLayingItemID, int a2)
 

Переменные

static SpellFxRendererspell_fx_renderer = EngineIoc::ResolveSpellFxRenderer()
 
static ParticleEngineparticle_engine = EngineIoc::ResolveParticleEngine()
 
size_t uNumSpriteObjects
 
std::array< SpriteObject, MAX_SPRITE_OBJECTS > pSpriteObjects
 

Типы

◆ EngineIoc

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

Функции

◆ CompactLayingItemsList()

void CompactLayingItemsList ( )

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

882  {
883  int new_obj_pos = 0;
884 
885  for (int i = 0; i < MAX_SPRITE_OBJECTS; ++i) {
886  if (pSpriteObjects[i].uObjectDescID) {
887  if (i != new_obj_pos) {
888  memcpy(&pSpriteObjects[new_obj_pos], &pSpriteObjects[i],
889  sizeof(SpriteObject));
890  pSpriteObjects[i].uObjectDescID = 0;
891  }
892  new_obj_pos++;
893  }
894  }
895  uNumSpriteObjects = new_obj_pos;
896 }

Перекрестные ссылки pSpriteObjects и uNumSpriteObjects.

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

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

◆ _46BFFA_update_spell_fx()

bool _46BFFA_update_spell_fx ( unsigned int  uLayingItemID,
int  a2 
)

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

1017  {
1018  int v90; // ST34_4@159
1019  int v91; // eax@159
1020  unsigned int v107 = 0; // edx@220
1021  int v108; // ebx@225
1022  // int v110; // ebx@234
1023  int v114; // eax@242
1024  int v135 = 0; // [sp-4h] [bp-30h]@217
1025  int v136; // [sp+Ch] [bp-20h]@208
1026  int v137; // [sp+10h] [bp-1Ch]@208
1027  int v138; // [sp+14h] [bp-18h]@207
1028  // int v141; // [sp+1Ch] [bp-10h]@117
1029  uint16_t v150; // [sp+20h] [bp-Ch]@208
1030  int v152; // [sp+24h] [bp-8h]@208
1031 
1032  ObjectDesc *object = &pObjectList->pObjects[pSpriteObjects[uLayingItemID].uObjectDescID];
1033  if (PID_TYPE(a2) == OBJECT_Actor) {
1034  if (PID_TYPE(pSpriteObjects[uLayingItemID].spell_caster_pid) == OBJECT_Actor &&
1035  !pActors[PID_ID(pSpriteObjects[uLayingItemID].spell_caster_pid)].GetActorsRelation(&pActors[PID_ID(a2)]))
1036  return 1;
1037  } else {
1038  if (PID_TYPE(a2) == OBJECT_Player &&
1039  PID_TYPE(pSpriteObjects[uLayingItemID].spell_caster_pid) == OBJECT_Player)
1040  return 1;
1041  }
1042  if (pParty->bTurnBasedModeOn) {
1043  if (pSpriteObjects[uLayingItemID].uAttributes & 4) {
1045  pSpriteObjects[uLayingItemID].uAttributes &= 0xFFFB; // ~0x00000004
1046  }
1047  }
1048  if (PID_TYPE(a2) == OBJECT_BModel &&
1049  PID_TYPE(pSpriteObjects[uLayingItemID].spell_caster_pid) != OBJECT_Player) {
1050  if (PID_ID(pSpriteObjects[uLayingItemID].spell_caster_pid) < 500) // bugfix PID_ID(v2->spell_caster_pid)==1000
1051  pActors[PID_ID(pSpriteObjects[uLayingItemID].spell_caster_pid)].uAttributes |= ACTOR_UNKNOW5;
1052  }
1053 
1054  switch (pSpriteObjects[uLayingItemID].uType) {
1058  if (PID_TYPE(a2) == OBJECT_BModel
1059  || PID_TYPE(a2) == OBJECT_Decoration
1060  || PID_TYPE(a2) == OBJECT_Any) {
1061  return 1;
1062  }
1063  if (PID_TYPE(a2) != OBJECT_Item) {
1064  sub_43A97E(uLayingItemID, a2);
1065  pSpriteObjects[uLayingItemID].uType = (SPRITE_OBJECT_TYPE)(pSpriteObjects[uLayingItemID].uType + 1);
1066  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(pSpriteObjects[uLayingItemID].uType);
1067  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1068  SpriteObject::OnInteraction(uLayingItemID);
1069  }
1070  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1071  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1072  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1073  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1074  int v97 = 0;
1075  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1076  v97 = (int16_t)pSpriteObjects[uLayingItemID].uSoundID + 4;
1077  }
1078  // v125 =
1079  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1080  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125,
1081  // v124, 0, -1, 0, v97, 0, 0);
1082  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id - 1,
1083  PID(OBJECT_Item, uLayingItemID));
1084  return 0;
1085  }
1086  pSpriteObjects[uLayingItemID].uType = (SPRITE_OBJECT_TYPE)(pSpriteObjects[uLayingItemID].uType + 1);
1087  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(pSpriteObjects[uLayingItemID].uType);
1088  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1089  SpriteObject::OnInteraction(uLayingItemID);
1090  }
1091  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1092  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1093  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1094  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1095  pAudioPlayer->PlaySound(SOUND_fireBall, PID(OBJECT_Item, uLayingItemID), 0, -1, 0, 0);
1096  return 0;
1097  }
1098 
1099  case SPRITE_PROJECTILE_500:
1100  case SPRITE_PROJECTILE_505:
1101  case SPRITE_PROJECTILE_510:
1102  case SPRITE_PROJECTILE_515:
1103  case SPRITE_PROJECTILE_520:
1104  case SPRITE_PROJECTILE_525:
1105  case SPRITE_PROJECTILE_530:
1106  case SPRITE_PROJECTILE_535:
1107  case SPRITE_PROJECTILE_540: {
1108  sub_43A97E(uLayingItemID, a2);
1109  pSpriteObjects[uLayingItemID].uType = (SPRITE_OBJECT_TYPE)(pSpriteObjects[uLayingItemID].uType + 1);
1110  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(pSpriteObjects[uLayingItemID].uType);
1111  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1112  SpriteObject::OnInteraction(uLayingItemID);
1113  }
1114  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1115  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1116  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1117  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1118  if (pSpriteObjects[uLayingItemID].uType == SPRITE_BLASTER_PROJECTILE) {
1119  pAudioPlayer->PlaySound(SOUND_fireBall, PID(OBJECT_Item, uLayingItemID), 0, -1, 0, 0);
1120  }
1121  return 0;
1122  }
1123 
1125  case SPRITE_PROJECTILE_550: {
1126  if (pSpriteObjects[uLayingItemID].containing_item.uItemID != 405 &&
1127  pSpriteObjects[uLayingItemID].containing_item.special_enchantment != 3) {
1128  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1129  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1130  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1131  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1132  sub_43A97E(uLayingItemID, a2);
1133  SpriteObject::OnInteraction(uLayingItemID);
1134  int v16 = 0;
1135  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1136  v16 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1137  }
1138  // v124 = 8 * uLayingItemID;
1139  // v124 |= 2;
1140  // v125 =
1141  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id]
1142  // + 1; pAudioPlayer->PlaySound((SoundID)v125, v124,
1143  // 0, -1, 0, v16, 0, 0);
1144  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1145  PID(OBJECT_Item, uLayingItemID));
1146  return 0;
1147  }
1148  pSpriteObjects[uLayingItemID].uType = SPRITE_OBJECT_EXPLODE;
1149  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(SPRITE_OBJECT_EXPLODE);
1150  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1151  SpriteObject::OnInteraction(uLayingItemID);
1152  }
1153  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1154  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1155  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1156  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1157  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(pSpriteObjects[uLayingItemID].uType);
1158  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1159  SpriteObject::OnInteraction(uLayingItemID);
1160  }
1161  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1162  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1163  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1164  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1165  if (pSpriteObjects[uLayingItemID].uType != 555) {
1166  pAudioPlayer->PlaySound(SOUND_fireBall, PID(OBJECT_Item, uLayingItemID), 0, -1, 0, 0);
1167  return 0;
1168  }
1169  return 0;
1170  }
1171 
1172  case SPRITE_OBJECT_EXPLODE: { // actor death explode
1173  pSpriteObjects[uLayingItemID].uType = SPRITE_OBJECT_EXPLODE_IMPACT;
1175  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1176  SpriteObject::OnInteraction(uLayingItemID);
1177  }
1178  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1179  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1180  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1181  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1182  AttackerInfo.Add(PID(OBJECT_Item, uLayingItemID), 512,
1183  pSpriteObjects[uLayingItemID].vPosition.x,
1184  pSpriteObjects[uLayingItemID].vPosition.y,
1185  pSpriteObjects[uLayingItemID].vPosition.z,
1186  0, 0);
1187  if (object->uFlags & OBJECT_DESC_TRIAL_PARTICLE) {
1189  pSpriteObjects[uLayingItemID].vPosition.y,
1190  pSpriteObjects[uLayingItemID].vPosition.z,
1191  object->uParticleTrailColor);
1192  }
1193  pAudioPlayer->PlaySound(SOUND_fireBall, PID(OBJECT_Item, uLayingItemID), 0, -1, 0, 0);
1194  return 0;
1195  }
1196 
1209  sub_43A97E(uLayingItemID, a2);
1210  pSpriteObjects[uLayingItemID].uType = (SPRITE_OBJECT_TYPE)(pSpriteObjects[uLayingItemID].uType + 1);
1211  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(pSpriteObjects[uLayingItemID].uType);
1212  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1213  SpriteObject::OnInteraction(uLayingItemID);
1214  }
1215  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1216  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1217  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1218  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1219  int v97 = 0;
1220  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1221  v97 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1222  }
1223  // v124 = 8 * uLayingItemID;
1224  // v124 |= v124 | 2;
1225  // v125 =
1226  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1227  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125, v124, 0,
1228  // -1, 0, v97, 0, 0);
1229  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1230  PID(OBJECT_Item, uLayingItemID));
1231  return 0;
1232  }
1233 
1235  sub_43A97E(uLayingItemID, a2);
1236  pSpriteObjects[uLayingItemID].uType = SPRITE_BLASTER_IMPACT;
1237  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(SPRITE_BLASTER_IMPACT);
1238  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1239  SpriteObject::OnInteraction(uLayingItemID);
1240  }
1241  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1242  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1243  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1244  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1245  return 0;
1246  }
1247 
1251  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1252  SpriteObject::OnInteraction(uLayingItemID);
1253  }
1254  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1255  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1256  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1257  int v65 = 7;
1258  if (pSpriteObjects[uLayingItemID].spell_skill == 4) {
1259  v65 = 9;
1260  }
1261  int v64 = pSpriteObjects[uLayingItemID].uFacing - stru_5C6E00->uIntegerDoublePi;
1262  for (int i = 0; i < v65; i++) {
1263  v64 += (int)stru_5C6E00->uIntegerHalfPi / 2;
1264  pSpriteObjects[uLayingItemID].Create(v64, 0, 1000, 0);
1265  }
1266  SpriteObject::OnInteraction(uLayingItemID);
1267  int v16 = 0;
1268  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1269  v16 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1270  }
1271  // v124 = 8 * uLayingItemID;
1272  // v124 |= v124 | 2;
1273  // v125 =
1274  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1275  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125, v124, 0,
1276  // -1, 0, v16, 0, 0);
1277  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1278  PID(OBJECT_Item, uLayingItemID));
1279  return 0;
1280  }
1281 
1283  pSpriteObjects[uLayingItemID].uType = SPRITE_SPELL_WATER_ICE_BLAST_IMPACT;
1285  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1286  SpriteObject::OnInteraction(uLayingItemID);
1287  }
1288  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1289  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1290  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1291  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1292  sub_43A97E(uLayingItemID, a2);
1293  int v16 = 0;
1294  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1295  v16 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1296  }
1297  // v124 = 8 * uLayingItemID;
1298  // v124 |= v124 | 2;
1299  // v125 =
1300  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1301  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125, v124, 0,
1302  // -1, 0, v16, 0, 0);
1303  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1304  PID(OBJECT_Item, uLayingItemID));
1305  return 0;
1306  }
1307 
1309  if (PID_TYPE(a2) == 6 || PID_TYPE(a2) == 5 || !PID_TYPE(a2)) {
1310  return 1;
1311  }
1314  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1315  SpriteObject::OnInteraction(uLayingItemID);
1316  }
1317  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1318  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1319  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1320  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1321  AttackerInfo.Add(PID(OBJECT_Item, uLayingItemID), 512,
1322  pSpriteObjects[uLayingItemID].vPosition.x,
1323  pSpriteObjects[uLayingItemID].vPosition.y,
1324  pSpriteObjects[uLayingItemID].vPosition.z,
1325  0, 0);
1326  int v78 = 0;
1327  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1328  v78 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1329  }
1330  // v125 =
1331  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1332  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125,
1333  // pSpriteObjects[uLayingItemID].vPosition.x, 0, -1, 0, v78,
1334  // 0, 0);
1335  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1336  PID(OBJECT_Item, uLayingItemID));
1337  return 0;
1338  }
1339 
1343  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1344  SpriteObject::OnInteraction(uLayingItemID);
1345  }
1346  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1347  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1348  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1349  int v89 = pSpriteObjects[uLayingItemID].uFacing - stru_5C6E00->uIntegerDoublePi;
1350  for (int i = 0; i < 8; i++) {
1351  pRnd->SetRange(-128, 128);
1352  v90 = pRnd->GetInRange();
1353  pRnd->SetRange(5, 500);
1354  v91 = pRnd->GetInRange();
1355  v89 += stru_5C6E00->uIntegerHalfPi / 2;
1356  pSpriteObjects[uLayingItemID].Create(v90 + v89, 0, v91, 0);
1357  }
1358  SpriteObject::OnInteraction(uLayingItemID);
1359  int v16 = 0;
1360  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1361  v16 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1362  }
1363  // v124 = 8 * uLayingItemID;
1364  // v124 |= 2;
1365  // v125 =
1366  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1367  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125, v124, 0,
1368  // -1, 0, v16, 0, 0);
1369  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1370  PID(OBJECT_Item, uLayingItemID));
1371  return 0;
1372  }
1373 
1377  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1378  SpriteObject::OnInteraction(uLayingItemID);
1379  }
1380  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1381  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1382  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1383  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1384  AttackerInfo.Add(PID(OBJECT_Item, uLayingItemID), 512,
1385  pSpriteObjects[uLayingItemID].vPosition.x,
1386  pSpriteObjects[uLayingItemID].vPosition.y,
1387  pSpriteObjects[uLayingItemID].vPosition.z,
1388  pSpriteObjects[uLayingItemID].field_61,
1389  0);
1390  int v78 = 0;
1391  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1392  v78 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1393  }
1394  // v125 =
1395  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1396  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125,
1397  // pSpriteObjects[uLayingItemID].vPosition.x, 0, -1, 0, v78,
1398  // 0, 0);
1399  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1400  PID(OBJECT_Item, uLayingItemID));
1401  return 0;
1402  }
1403 
1405  if (PID_TYPE(a2) == OBJECT_Actor &&
1406  MonsterStats::BelongsToSupertype(pActors[PID_ID(a2)].pMonsterInfo.uID,
1408  sub_43A97E(uLayingItemID, a2);
1409  }
1410  pSpriteObjects[uLayingItemID].uType = SPRITE_SPELL_LIGHT_DESTROY_UNDEAD_1;
1412  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1413  SpriteObject::OnInteraction(uLayingItemID);
1414  }
1415  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1416  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1417  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1418  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1419  int v97 = 0;
1420  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1421  v97 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1422  }
1423  // v92 = uLayingItemID;
1424  // v124 = 8 * v92;
1425  // v124 |= 2;
1426  // v125 =
1427  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1428  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125, v124, 0,
1429  // -1, 0, v97, 0, 0);
1430  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1431  PID(OBJECT_Item, uLayingItemID));
1432  return 0;
1433  }
1434 
1439  sub_43A97E(uLayingItemID, a2);
1440  pSpriteObjects[uLayingItemID].uType = (SPRITE_OBJECT_TYPE)(pSpriteObjects[uLayingItemID].uType + 1);
1441  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(pSpriteObjects[uLayingItemID].uType);
1442  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1443  SpriteObject::OnInteraction(uLayingItemID);
1444  }
1445  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1446  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1447  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1448  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1449  int v97 = 0;
1450  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1451  v97 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1452  }
1453  // v124 = 8 * uLayingItemID;
1454  // v124 |= 2;
1455  // v125 =
1456  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1457  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125, v124, 0,
1458  // -1, 0, v97, 0, 0);
1459  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1460  PID(OBJECT_Item, uLayingItemID));
1461  return 0;
1462  }
1463 
1467  int v143 = 17030;
1468  switch (pSpriteObjects[uLayingItemID].uType) {
1469  case 6040:
1470  v143 = 15040;
1471  break;
1472  case 4010:
1473  v143 = 13010;
1474  break;
1475  case 9030:
1476  v143 = 18030;
1477  break;
1478  }
1479  v138 = 1;
1480  if (PID_TYPE(a2) != OBJECT_Actor) {
1481  if (pSpriteObjects[uLayingItemID].uType != 9030 ||
1482  pSpriteObjects[uLayingItemID].spell_skill != 4) {
1483  SpriteObject::OnInteraction(uLayingItemID);
1484  return 0;
1485  }
1486  pSpriteObjects[uLayingItemID]._46BEF1_apply_spells_aoe();
1487  if (!v138) {
1488  pSpriteObjects[uLayingItemID].uType = (SPRITE_OBJECT_TYPE)(
1489  pSpriteObjects[uLayingItemID].uType + 1);
1490  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(pSpriteObjects[uLayingItemID].uType);
1491  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1492  SpriteObject::OnInteraction(uLayingItemID);
1493  }
1494  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1495  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1496  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1497  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1498  int v114 = 0;
1499  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1500  v114 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1501  }
1502  // v115 = 8 * uLayingItemID;
1503  // v115 |= PID(OBJECT_Item, uLayingItemID);
1504  // v125 = v143 + 1;
1505  // pAudioPlayer->PlaySound((SoundID)v125,
1506  // v115, 0, -1, 0, v114, 0, 0);
1507  pAudioPlayer->PlaySpellSound(v143 + 1,
1508  PID(OBJECT_Item, uLayingItemID));
1509  } else {
1510  SpriteObject::OnInteraction(uLayingItemID);
1511  }
1512  return 0;
1513  }
1514  v150 = 0;
1515  v137 = pSpriteObjects[uLayingItemID].spell_level;
1516  v152 = pSpriteObjects[uLayingItemID].spell_skill;
1517  v136 = pSpriteObjects[uLayingItemID].spell_id;
1518  if (pSpriteObjects[uLayingItemID].uType == SPRITE_SPELL_DARK_SHRINKING_RAY) {
1519  v150 = 2;
1520  if (v152 == 2) {
1521  v150 = 3;
1522  } else {
1523  if (v152 >= 3) v150 = 4;
1524  }
1525  pActors[PID_ID(a2)].uAttributes |= ACTOR_AGGRESSOR;
1526  v107 = v135;
1527  }
1528  if (pSpriteObjects[uLayingItemID].uType == SPRITE_SPELL_MIND_CHARM) {
1529  v135 = 7;
1530  v107 = v135;
1531  } else {
1532  if (pSpriteObjects[uLayingItemID].uType == SPRITE_SPELL_LIGHT_PARALYZE) {
1533  v135 = 9;
1534  v107 = v135;
1535  } else {
1536  if (pSpriteObjects[uLayingItemID].uType != SPRITE_SPELL_DARK_SHRINKING_RAY) {
1537  v107 = v136;
1538  }
1539  if (pSpriteObjects[uLayingItemID].uType == SPRITE_SPELL_DARK_SHRINKING_RAY) {
1540  v135 = 10;
1541  v107 = v135;
1542  }
1543  }
1544  }
1545  if (pSpriteObjects[uLayingItemID].uType != SPRITE_SPELL_DARK_SHRINKING_RAY ||
1546  v152 != 4) {
1547  v108 = PID_ID(a2);
1548  if (pActors[PID_ID(a2)].DoesDmgTypeDoDamage((DAMAGE_TYPE)v107)) {
1549  v138 = 0;
1550  if (pSpriteObjects[uLayingItemID].uType ==
1552  pActors[v108].uAIState = Standing;
1553  pActors[v108].UpdateAnimation();
1554  }
1555  pActors[v108].pActorBuffs[v136].Apply(
1557  v152, v150, 0, 0);
1558  }
1559  } else {
1560  pSpriteObjects[uLayingItemID]._46BEF1_apply_spells_aoe();
1561  }
1562  pSpriteObjects[uLayingItemID].spell_level = 0;
1563  pSpriteObjects[uLayingItemID].spell_skill = 0;
1564  pSpriteObjects[uLayingItemID].spell_id = 0;
1565  if (!v138) {
1566  pSpriteObjects[uLayingItemID].uType = (SPRITE_OBJECT_TYPE)(pSpriteObjects[uLayingItemID].uType + 1);
1567  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(pSpriteObjects[uLayingItemID].uType);
1568  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1569  SpriteObject::OnInteraction(uLayingItemID);
1570  }
1571  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1572  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1573  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1574  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1575  v114 = 0;
1576  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1577  v114 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1578  }
1579  // v115 = 8 * uLayingItemID;
1580  // v115 |= PID(OBJECT_Item, uLayingItemID);
1581  // v125 = v143 + 1;
1582  // pAudioPlayer->PlaySound((SoundID)v125, v115, 0,
1583  // -1, 0, v114, 0, 0);
1584  pAudioPlayer->PlaySpellSound(v143 + 1,
1585  PID(OBJECT_Item, uLayingItemID));
1586  } else {
1587  SpriteObject::OnInteraction(uLayingItemID);
1588  }
1589  return 0;
1590  }
1591 
1593  sub_43A97E(uLayingItemID, a2);
1594  pSpriteObjects[uLayingItemID].uType = SPRITE_SPELL_DARK_SHARPMETAL_IMPACT;
1596  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1597  SpriteObject::OnInteraction(uLayingItemID);
1598  }
1599  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1600  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1601  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1602  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1603  int v97 = 0;
1604  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1605  v97 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1606  }
1607  // v124 = 8 * uLayingItemID;
1608  // v124 |= v124 | 2;
1609  // v125 =
1610  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1611  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125, v124, 0,
1612  // -1, 0, v97, 0, 0);
1613  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1614  PID(OBJECT_Item, uLayingItemID));
1615  return 0;
1616  }
1617 
1618  /*
1619  case 1080:
1620  case 2100:
1621  {
1622  if (PID_TYPE(a2) != 3)
1623  {
1624  //v32 = 0;
1625  pSpriteObjects[uLayingItemID].uType =
1626  pSpriteObjects[uLayingItemID].uType + 1; v46 = 0; for (v146 = 0;
1627  v146 < (signed int)pObjectList->uNumObjects; ++v146)
1628  {
1629  if (pSpriteObjects[uLayingItemID].uType ==
1630  pObjectList->pObjects[v146].uObjectID) v46 = v146;
1631  }
1632  pSpriteObjects[uLayingItemID].uObjectDescID = v46;
1633  if (!v46)
1634  SpriteObject::OnInteraction(uLayingItemID);
1635  v100 = pSpriteObjects[uLayingItemID].field_61;
1636  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1637  v102 = 8 * uLayingItemID;
1638  LOBYTE(v102) = PID(OBJECT_Item, uLayingItemID);
1639  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1640  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1641  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1642  AttackerInfo.Add(v102, 512,
1643  pSpriteObjects[uLayingItemID].vPosition.x,
1644  pSpriteObjects[uLayingItemID].vPosition.y,
1645  pSpriteObjects[uLayingItemID].vPosition.z, v100, 0); if
1646  (object->uFlags & OBJECT_DESC_TRIAL_PARTICLE)
1647  trail_particle_generator.GenerateTrailParticles(pSpriteObjects[uLayingItemID].vPosition.x,
1648  pSpriteObjects[uLayingItemID].vPosition.y,
1649  pSpriteObjects[uLayingItemID].vPosition.z,
1650  object->uParticleTrailColor); if
1651  (!pSpriteObjects[uLayingItemID].uSoundID) v47 = 0; else v47 =
1652  (signed __int16)pSpriteObjects[uLayingItemID].uSoundID + 4; v125 =
1653  word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id - 1] +
1654  1; pAudioPlayer->PlaySound((SoundID)v125, v102, 0, -1, 0, v47, 0,
1655  0); return 0;
1656  }
1657  return 1;
1658  }*/
1659 
1662  if (PID_TYPE(a2) == 3) return 1;
1663  // else go to next case
1664  }
1665 
1668  pSpriteObjects[uLayingItemID].uType = (SPRITE_OBJECT_TYPE)(pSpriteObjects[uLayingItemID].uType + 1);
1669  pSpriteObjects[uLayingItemID].uObjectDescID = pObjectList->ObjectIDByItemID(pSpriteObjects[uLayingItemID].uType);
1670  if (pSpriteObjects[uLayingItemID].uObjectDescID == 0) {
1671  SpriteObject::OnInteraction(uLayingItemID);
1672  }
1673  pSpriteObjects[uLayingItemID].uSpriteFrameID = 0;
1674  pSpriteObjects[uLayingItemID].vVelocity.x = 0;
1675  pSpriteObjects[uLayingItemID].vVelocity.y = 0;
1676  pSpriteObjects[uLayingItemID].vVelocity.z = 0;
1677  AttackerInfo.Add(PID(OBJECT_Item, uLayingItemID), 512,
1678  pSpriteObjects[uLayingItemID].vPosition.x,
1679  pSpriteObjects[uLayingItemID].vPosition.y,
1680  pSpriteObjects[uLayingItemID].vPosition.z,
1681  pSpriteObjects[uLayingItemID].field_61, 0);
1682  if (object->uFlags & OBJECT_DESC_TRIAL_PARTICLE)
1684  pSpriteObjects[uLayingItemID].vPosition.x,
1685  pSpriteObjects[uLayingItemID].vPosition.y,
1686  pSpriteObjects[uLayingItemID].vPosition.z,
1687  object->uParticleTrailColor);
1688  int v47 = 0;
1689  if (pSpriteObjects[uLayingItemID].uSoundID != 0) {
1690  v47 = pSpriteObjects[uLayingItemID].uSoundID + 4;
1691  }
1692  // v125 =
1693  // word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id
1694  // - 1] + 1; pAudioPlayer->PlaySound((SoundID)v125, v102, 0,
1695  // -1, 0, v47, 0, 0);
1696  pAudioPlayer->PlaySpellSound(pSpriteObjects[uLayingItemID].spell_id,
1697  PID(OBJECT_Item, uLayingItemID));
1698  return 0;
1699  }
1700 
1701  default:
1702  return 0;
1703  }
1704 }

Перекрестные ссылки stru298::Add(), AttackerInfo, MonsterStats::BelongsToSupertype(), Party::bTurnBasedModeOn, GameTime::FromSeconds(), TrailParticleGenerator::GenerateTrailParticles(), Random::GetInRange(), Party::GetPlayingTime(), MONSTER_SUPERTYPE_UNDEAD, OBJECT_Actor, OBJECT_Any, OBJECT_BModel, OBJECT_Decoration, OBJECT_DESC_TRIAL_PARTICLE, OBJECT_Item, OBJECT_Player, ObjectList::ObjectIDByItemID(), SpriteObject::OnInteraction(), pActors, pAudioPlayer, stru262_TurnBased::pending_actions, AudioPlayer::PlaySound(), AudioPlayer::PlaySpellSound(), pObjectList, ObjectList::pObjects, pParty, pRnd, pSpriteObjects, pTurnEngine, Random::SetRange(), SOUND_fireBall, SPRITE_ARROW_PROJECTILE, SPRITE_BLASTER_IMPACT, SPRITE_BLASTER_PROJECTILE, SPRITE_OBJECT_EXPLODE, SPRITE_OBJECT_EXPLODE_IMPACT, SPRITE_PROJECTILE_500, SPRITE_PROJECTILE_505, SPRITE_PROJECTILE_510, SPRITE_PROJECTILE_515, SPRITE_PROJECTILE_520, SPRITE_PROJECTILE_525, SPRITE_PROJECTILE_530, SPRITE_PROJECTILE_535, SPRITE_PROJECTILE_540, SPRITE_PROJECTILE_550, SPRITE_SPELL_AIR_LIGHNING_BOLT, SPRITE_SPELL_AIR_SPARKS, SPRITE_SPELL_AIR_STARBURST, SPRITE_SPELL_BODY_FLYING_FIST, SPRITE_SPELL_BODY_HARM, SPRITE_SPELL_DARK_DRAGON_BREATH, SPRITE_SPELL_DARK_SHARPMETAL, SPRITE_SPELL_DARK_SHARPMETAL_IMPACT, SPRITE_SPELL_DARK_SHRINKING_RAY, SPRITE_SPELL_DARK_TOXIC_CLOUD, SPRITE_SPELL_EARTH_BLADES, SPRITE_SPELL_EARTH_DEADLY_SWARM, SPRITE_SPELL_EARTH_DEATH_BLOSSOM, SPRITE_SPELL_EARTH_DEATH_BLOSSOM_FALLOUT, SPRITE_SPELL_EARTH_DEATH_BLOSSOM_IMPACT, SPRITE_SPELL_EARTH_MASS_DISTORTION, SPRITE_SPELL_EARTH_ROCK_BLAST, SPRITE_SPELL_EARTH_ROCK_BLAST_IMPACT, SPRITE_SPELL_EARTH_STUN, SPRITE_SPELL_FIRE_FIRE_BOLT, SPRITE_SPELL_FIRE_FIRE_SPIKE, SPRITE_SPELL_FIRE_FIREBALL, SPRITE_SPELL_FIRE_INCINERATE, SPRITE_SPELL_FIRE_METEOR_SHOWER, SPRITE_SPELL_LIGHT_DESTROY_UNDEAD, SPRITE_SPELL_LIGHT_DESTROY_UNDEAD_1, SPRITE_SPELL_LIGHT_LIGHT_BOLT, SPRITE_SPELL_LIGHT_PARALYZE, SPRITE_SPELL_LIGHT_SUNRAY, SPRITE_SPELL_MIND_CHARM, SPRITE_SPELL_MIND_MIND_BLAST, SPRITE_SPELL_MIND_PSYCHIC_SHOCK, SPRITE_SPELL_WATER_ACID_BURST, SPRITE_SPELL_WATER_ICE_BLAST, SPRITE_SPELL_WATER_ICE_BLAST_FALLOUT, SPRITE_SPELL_WATER_ICE_BLAST_IMPACT, SPRITE_SPELL_WATER_ICE_BOLT, SPRITE_SPELL_WATER_POISON_SPRAY, Standing, stru_5C6E00, sub_43A97E(), trail_particle_generator, stru193_math::uIntegerDoublePi и stru193_math::uIntegerHalfPi.

Используется в sub_46DEF2(), SpriteObject::UpdateObject_fn0_BLV(), SpriteObject::UpdateObject_fn0_ODM() и UpdateObjects().

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

◆ sub_43A97E()

void sub_43A97E ( unsigned int  uLayingItemID,
int  a2 
)

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

1707  {
1708  if (PID_TYPE(a2) == OBJECT_Player) {
1709  layingitem_vel_50FDFC.x = pSpriteObjects[uLayingItemID].vVelocity.x;
1710  layingitem_vel_50FDFC.y = pSpriteObjects[uLayingItemID].vVelocity.y;
1711  layingitem_vel_50FDFC.z = pSpriteObjects[uLayingItemID].vVelocity.z;
1712 
1713  Vec3_int_::Normalize(&layingitem_vel_50FDFC.x, &layingitem_vel_50FDFC.y,
1715  DamagePlayerFromMonster(PID(OBJECT_Item, uLayingItemID),
1716  pSpriteObjects[uLayingItemID].field_61,
1717  &layingitem_vel_50FDFC, -1);
1718  } else if (PID_TYPE(a2) == OBJECT_Actor) {
1719  layingitem_vel_50FDFC.x = pSpriteObjects[uLayingItemID].vVelocity.x;
1720  layingitem_vel_50FDFC.y = pSpriteObjects[uLayingItemID].vVelocity.y;
1721  layingitem_vel_50FDFC.z = pSpriteObjects[uLayingItemID].vVelocity.z;
1722 
1723  Vec3_int_::Normalize(&layingitem_vel_50FDFC.x, &layingitem_vel_50FDFC.y,
1725  switch (PID_TYPE(pSpriteObjects[uLayingItemID].spell_caster_pid)) {
1726  case OBJECT_Actor:
1728  PID(OBJECT_Item, uLayingItemID), PID_ID(a2),
1730  pSpriteObjects[uLayingItemID].field_61);
1731  break;
1732  case OBJECT_Player:
1733  Actor::DamageMonsterFromParty(PID(OBJECT_Item, uLayingItemID),
1734  PID_ID(a2),
1736  break;
1737  case OBJECT_Item:
1738  ItemDamageFromActor(PID(OBJECT_Item, uLayingItemID), PID_ID(a2),
1740  break;
1741  }
1742  }
1743 }

Перекрестные ссылки Actor::ActorDamageFromMonster(), Actor::DamageMonsterFromParty(), DamagePlayerFromMonster(), ItemDamageFromActor(), layingitem_vel_50FDFC, OBJECT_Actor, OBJECT_Item, OBJECT_Player и pSpriteObjects.

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

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

Переменные

◆ spell_fx_renderer

SpellFxRenderer* spell_fx_renderer = EngineIoc::ResolveSpellFxRenderer()
static

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

Используется в SpriteObject::UpdateObject_fn0_BLV() и SpriteObject::UpdateObject_fn0_ODM().

◆ particle_engine

ParticleEngine* particle_engine = EngineIoc::ResolveParticleEngine()
static

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

Используется в SpriteObject::UpdateObject_fn0_BLV() и SpriteObject::UpdateObject_fn0_ODM().

◆ uNumSpriteObjects

◆ pSpriteObjects

SPRITE_PROJECTILE_530
@ SPRITE_PROJECTILE_530
Definition: SpriteObject.h:22
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
SpriteObject
Definition: SpriteObject.h:189
MONSTER_SUPERTYPE_UNDEAD
@ MONSTER_SUPERTYPE_UNDEAD
Definition: Monsters.h:70
SPRITE_SPELL_MIND_PSYCHIC_SHOCK
@ SPRITE_SPELL_MIND_PSYCHIC_SHOCK
Definition: SpriteObject.h:132
SPRITE_SPELL_BODY_FLYING_FIST
@ SPRITE_SPELL_BODY_FLYING_FIST
Definition: SpriteObject.h:145
stru193_math::uIntegerDoublePi
static const unsigned int uIntegerDoublePi
Definition: OurMath.h:90
SPRITE_SPELL_AIR_LIGHNING_BOLT
@ SPRITE_SPELL_AIR_LIGHNING_BOLT
Definition: SpriteObject.h:65
SPRITE_BLASTER_PROJECTILE
@ SPRITE_BLASTER_PROJECTILE
Definition: SpriteObject.h:30
int16_t
signed __int16 int16_t
Definition: SDL_config.h:36
SOUND_fireBall
@ SOUND_fireBall
Definition: AudioPlayer.h:14
SPRITE_SPELL_AIR_SPARKS
@ SPRITE_SPELL_AIR_SPARKS
Definition: SpriteObject.h:62
SPRITE_PROJECTILE_535
@ SPRITE_PROJECTILE_535
Definition: SpriteObject.h:24
Party::GetPlayingTime
GameTime & GetPlayingTime()
Definition: Party.h:230
pRnd
struct Random * pRnd
Definition: Random.cpp:5
pSpriteObjects
std::array< SpriteObject, MAX_SPRITE_OBJECTS > pSpriteObjects
Definition: SpriteObject.cpp:34
SPRITE_SPELL_LIGHT_DESTROY_UNDEAD_1
@ SPRITE_SPELL_LIGHT_DESTROY_UNDEAD_1
Definition: SpriteObject.h:152
OBJECT_Item
@ OBJECT_Item
Definition: Actor.h:66
layingitem_vel_50FDFC
Vec3_int_ layingitem_vel_50FDFC
Definition: mm7_data.cpp:588
AudioPlayer::PlaySound
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
Definition: AudioPlayer.cpp:195
ItemDamageFromActor
void ItemDamageFromActor(unsigned int uObjID, unsigned int uActorID, Vec3_int_ *pVelocity)
Definition: Actor.cpp:5553
SPRITE_SPELL_DARK_DRAGON_BREATH
@ SPRITE_SPELL_DARK_DRAGON_BREATH
Definition: SpriteObject.h:176
stru193_math::uIntegerHalfPi
static const unsigned int uIntegerHalfPi
Definition: OurMath.h:89
SPRITE_BLASTER_IMPACT
@ SPRITE_BLASTER_IMPACT
Definition: SpriteObject.h:31
SPRITE_SPELL_EARTH_MASS_DISTORTION
@ SPRITE_SPELL_EARTH_MASS_DISTORTION
Definition: SpriteObject.h:106
ObjectDesc
Definition: ObjectList.h:20
SPRITE_SPELL_DARK_SHARPMETAL_IMPACT
@ SPRITE_SPELL_DARK_SHARPMETAL_IMPACT
Definition: SpriteObject.h:172
SPRITE_SPELL_AIR_STARBURST
@ SPRITE_SPELL_AIR_STARBURST
Definition: SpriteObject.h:71
ObjectList::ObjectIDByItemID
unsigned int ObjectIDByItemID(unsigned int uItemID)
Definition: ObjectList.cpp:7
Standing
@ Standing
Definition: Actor.h:75
SPRITE_SPELL_FIRE_FIRE_BOLT
@ SPRITE_SPELL_FIRE_FIRE_BOLT
Definition: SpriteObject.h:43
OBJECT_Decoration
@ OBJECT_Decoration
Definition: Actor.h:69
SPRITE_PROJECTILE_500
@ SPRITE_PROJECTILE_500
Definition: SpriteObject.h:10
SPRITE_SPELL_EARTH_ROCK_BLAST
@ SPRITE_SPELL_EARTH_ROCK_BLAST
Definition: SpriteObject.h:100
SPRITE_SPELL_MIND_MIND_BLAST
@ SPRITE_SPELL_MIND_MIND_BLAST
Definition: SpriteObject.h:122
pTurnEngine
struct stru262_TurnBased * pTurnEngine
Definition: TurnEngine.cpp:21
SPRITE_SPELL_DARK_SHARPMETAL
@ SPRITE_SPELL_DARK_SHARPMETAL
Definition: SpriteObject.h:171
OBJECT_Actor
@ OBJECT_Actor
Definition: Actor.h:67
trail_particle_generator
TrailParticleGenerator trail_particle_generator
Definition: ParticleEngine.cpp:13
SPRITE_PROJECTILE_525
@ SPRITE_PROJECTILE_525
Definition: SpriteObject.h:20
SPRITE_SPELL_EARTH_DEATH_BLOSSOM
@ SPRITE_SPELL_EARTH_DEATH_BLOSSOM
Definition: SpriteObject.h:103
DAMAGE_TYPE
DAMAGE_TYPE
Definition: Items.h:10
pParty
Party * pParty
Definition: Party.cpp:30
object
GLuint object
Definition: SDL_opengl_glext.h:6060
SPRITE_PROJECTILE_510
@ SPRITE_PROJECTILE_510
Definition: SpriteObject.h:14
SPRITE_SPELL_EARTH_ROCK_BLAST_IMPACT
@ SPRITE_SPELL_EARTH_ROCK_BLAST_IMPACT
Definition: SpriteObject.h:101
SPRITE_PROJECTILE_515
@ SPRITE_PROJECTILE_515
Definition: SpriteObject.h:16
OBJECT_BModel
@ OBJECT_BModel
Definition: Actor.h:70
SPRITE_SPELL_BODY_HARM
@ SPRITE_SPELL_BODY_HARM
Definition: SpriteObject.h:138
SPRITE_SPELL_EARTH_DEADLY_SWARM
@ SPRITE_SPELL_EARTH_DEADLY_SWARM
Definition: SpriteObject.h:94
AudioPlayer::PlaySpellSound
void PlaySpellSound(unsigned int spell, unsigned int pid)
Definition: AudioPlayer.cpp:476
SPRITE_PROJECTILE_520
@ SPRITE_PROJECTILE_520
Definition: SpriteObject.h:18
Random::GetInRange
int GetInRange()
Definition: Random.cpp:28
sub_43A97E
void sub_43A97E(unsigned int uLayingItemID, int a2)
Definition: SpriteObject.cpp:1707
SPRITE_SPELL_WATER_ACID_BURST
@ SPRITE_SPELL_WATER_ACID_BURST
Definition: SpriteObject.h:82
pActors
std::array< Actor, 500 > pActors
Definition: Actor.cpp:38
SPRITE_OBJECT_EXPLODE_IMPACT
@ SPRITE_OBJECT_EXPLODE_IMPACT
Definition: SpriteObject.h:33
SPRITE_SPELL_DARK_TOXIC_CLOUD
@ SPRITE_SPELL_DARK_TOXIC_CLOUD
Definition: SpriteObject.h:168
SPRITE_SPELL_FIRE_METEOR_SHOWER
@ SPRITE_SPELL_FIRE_METEOR_SHOWER
Definition: SpriteObject.h:53
OBJECT_DESC_TRIAL_PARTICLE
@ OBJECT_DESC_TRIAL_PARTICLE
Definition: ObjectList.h:14
SPRITE_PROJECTILE_505
@ SPRITE_PROJECTILE_505
Definition: SpriteObject.h:12
Actor::ActorDamageFromMonster
static void ActorDamageFromMonster(int attacker_id, unsigned int actor_id, struct Vec3_int_ *pVelocity, int a4)
Definition: Actor.cpp:2507
stru298::Add
void Add(int16_t uID, int16_t a3, int16_t x, int16_t y, int16_t z, char a7, char a8)
Definition: stru298.cpp:4
TrailParticleGenerator::GenerateTrailParticles
void GenerateTrailParticles(int x, int y, int z, int bgr16)
Definition: ParticleEngine.cpp:29
SPRITE_OBJECT_TYPE
SPRITE_OBJECT_TYPE
Definition: SpriteObject.h:5
OBJECT_Player
@ OBJECT_Player
Definition: Actor.h:68
Party::bTurnBasedModeOn
bool bTurnBasedModeOn
Definition: Party.h:305
MonsterStats::BelongsToSupertype
static bool BelongsToSupertype(unsigned int uMonsterInfoID, enum MONSTER_SUPERTYPE eSupertype)
Definition: Monsters.cpp:1200
SPRITE_SPELL_EARTH_DEATH_BLOSSOM_IMPACT
@ SPRITE_SPELL_EARTH_DEATH_BLOSSOM_IMPACT
Definition: SpriteObject.h:104
uNumSpriteObjects
size_t uNumSpriteObjects
Definition: SpriteObject.cpp:33
SPRITE_SPELL_WATER_POISON_SPRAY
@ SPRITE_SPELL_WATER_POISON_SPRAY
Definition: SpriteObject.h:75
SPRITE_SPELL_FIRE_INCINERATE
@ SPRITE_SPELL_FIRE_INCINERATE
Definition: SpriteObject.h:56
SPRITE_SPELL_LIGHT_DESTROY_UNDEAD
@ SPRITE_SPELL_LIGHT_DESTROY_UNDEAD
Definition: SpriteObject.h:151
SPRITE_SPELL_EARTH_DEATH_BLOSSOM_FALLOUT
@ SPRITE_SPELL_EARTH_DEATH_BLOSSOM_FALLOUT
Definition: SpriteObject.h:105
SPRITE_SPELL_EARTH_STUN
@ SPRITE_SPELL_EARTH_STUN
Definition: SpriteObject.h:91
DamagePlayerFromMonster
void DamagePlayerFromMonster(unsigned int uObjID, int dmgSource, Vec3_int_ *pPos, signed int a4)
Definition: Player.cpp:6928
SPRITE_ARROW_PROJECTILE
@ SPRITE_ARROW_PROJECTILE
Definition: SpriteObject.h:28
SPRITE_SPELL_WATER_ICE_BLAST_FALLOUT
@ SPRITE_SPELL_WATER_ICE_BLAST_FALLOUT
Definition: SpriteObject.h:88
AttackerInfo
stru298 AttackerInfo
Definition: mm7_data.cpp:24
SPRITE_SPELL_LIGHT_SUNRAY
@ SPRITE_SPELL_LIGHT_SUNRAY
Definition: SpriteObject.h:162
SPRITE_SPELL_WATER_ICE_BLAST_IMPACT
@ SPRITE_SPELL_WATER_ICE_BLAST_IMPACT
Definition: SpriteObject.h:87
OBJECT_Any
@ OBJECT_Any
Definition: Actor.h:64
SPRITE_OBJECT_EXPLODE
@ SPRITE_OBJECT_EXPLODE
Definition: SpriteObject.h:32
SPRITE_SPELL_WATER_ICE_BOLT
@ SPRITE_SPELL_WATER_ICE_BOLT
Definition: SpriteObject.h:78
stru_5C6E00
struct stru193_math * stru_5C6E00
Definition: mm7_data.cpp:19
Random::SetRange
void SetRange(int min, int max)
Definition: Random.cpp:8
SPRITE_SPELL_LIGHT_PARALYZE
@ SPRITE_SPELL_LIGHT_PARALYZE
Definition: SpriteObject.h:155
ObjectList::pObjects
struct ObjectDesc * pObjects
Definition: ObjectList.h:54
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
SpriteObject::OnInteraction
static void OnInteraction(unsigned int uLayingItemID)
Definition: SpriteObject.cpp:872
SPRITE_SPELL_MIND_CHARM
@ SPRITE_SPELL_MIND_CHARM
Definition: SpriteObject.h:126
SPRITE_SPELL_FIRE_FIREBALL
@ SPRITE_SPELL_FIRE_FIREBALL
Definition: SpriteObject.h:48
SPRITE_PROJECTILE_540
@ SPRITE_PROJECTILE_540
Definition: SpriteObject.h:26
SPRITE_SPELL_WATER_ICE_BLAST
@ SPRITE_SPELL_WATER_ICE_BLAST
Definition: SpriteObject.h:86
SPRITE_PROJECTILE_550
@ SPRITE_PROJECTILE_550
Definition: SpriteObject.h:29
Actor::DamageMonsterFromParty
static void DamageMonsterFromParty(int a1, unsigned int uActorID_Monster, struct Vec3_int_ *pVelocity)
Definition: Actor.cpp:3379
stru262_TurnBased::pending_actions
int pending_actions
Definition: TurnEngine.h:81
SPRITE_SPELL_DARK_SHRINKING_RAY
@ SPRITE_SPELL_DARK_SHRINKING_RAY
Definition: SpriteObject.h:170
SPRITE_SPELL_LIGHT_LIGHT_BOLT
@ SPRITE_SPELL_LIGHT_LIGHT_BOLT
Definition: SpriteObject.h:149
GameTime
Definition: Time.h:14
SPRITE_SPELL_EARTH_BLADES
@ SPRITE_SPELL_EARTH_BLADES
Definition: SpriteObject.h:97
pObjectList
struct ObjectList * pObjectList
Definition: ObjectList.cpp:5
GameTime::FromSeconds
static GameTime FromSeconds(int seconds)
Definition: Time.h:83
SPRITE_SPELL_FIRE_FIRE_SPIKE
@ SPRITE_SPELL_FIRE_FIRE_SPIKE
Definition: SpriteObject.h:50