World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Party.cpp
См. документацию.
1 #include "Engine/Party.h"
2 
3 #include <stdlib.h>
4 #include <climits>
5 
6 #include "Engine/Engine.h"
7 #include "Engine/Localization.h"
8 #include "Engine/Time.h"
9 
12 #include "Engine/Objects/Actor.h"
18 #include "GUI/GUIWindow.h"
19 #include "IO/Mouse.h"
20 #include "LOD.h"
22 
23 #include "GUI/UI/UIStatusBar.h"
24 
26 
27 // should be injected in Party, but struct size cant be changed
29 
30 Party *pParty = nullptr;
31 
33 
34 std::array<bool, 4> playerAlreadyPicked; // byte_AE3368_
35 char PickedPlayer2_unused; // byte_AE3369_
36 char PickedPlayer3_unused; // byte_AE336A_
37 char PickedPlayer4_unused; // byte_AE336B_
38 
39 struct {
44 } _uianim;
45 
46 UIAnimation *pUIAnim_Food = &_uianim._pUIAnim_Food;
47 UIAnimation *pUIAnim_Gold = &_uianim._pUIAnim_Gold;
48 UIAnimation *pUIAnum_Torchlight = &_uianim._pUIAnum_Torchlight;
49 UIAnimation *pUIAnim_WizardEye = &_uianim._pUIAnim_WizardEye;
50 
51 std::array<class UIAnimation *, 4>
52  pUIAnims = // was struct byt defined as class
53  {&_uianim._pUIAnim_Food, &_uianim._pUIAnim_Gold,
54  &_uianim._pUIAnum_Torchlight, &_uianim._pUIAnim_WizardEye};
55 
56 //----- (0044A56A) --------------------------------------------------------
57 void Party::CountHirelings() { // non hired followers
59 
60  for (unsigned int i = 0; i < pNPCStats->uNumNewNPCs; ++i) {
61  NPCData *npc = &pNPCStats->pNewNPCData[i];
62  if (npc->Hired() &&
63  (!pHirelings[0].pName || strcmp(npc->pName, pHirelings[0].pName))) {
64  if (!pHirelings[1].pName || strcmp(npc->pName, pHirelings[1].pName))
66  }
67  }
68 }
69 
70 // inlined
71 //----- (mm6c::004858D0) --------------------------------------------------
72 void Party::Zero() {
73  uFlags2 = 0;
74  uNumGoldInBank = 0;
75 
76  uCurrentYear = 0;
77  uCurrentMonth = 0;
80  uCurrentHour = 0;
81  uCurrentMinute = 0;
83 
86  vPosition.x = 0;
87  vPosition.y = 0;
88  vPosition.z = 0;
89  uFallStartY = 0;
90  sRotationY = 0;
91  sRotationX = 0;
92  uFallSpeed = 0;
93  field_28 = 0;
94  uDefaultPartyHeight = 192;
95  field_14_radius = 37;
97  y_rotation_speed = 90;
98 
99  uWalkSpeed = 384;
100  walk_sound_timer = 0;
101 
102  field_24 = 5;
104  field_708 = 15;
105  field_0 = 25;
106 
107  uNumDeaths = 0;
108  uNumPrisonTerms = 0;
111  monster_id_for_hunting.fill(0);
112  memset(_quest_bits, 0, sizeof(_quest_bits));
113  pArcomageWins.fill(0);
114  uNumArenaPageWins = 0;
117  uNumArenaLordWins = 0;
118 }
119 
120 // inlined
121 //----- (mm6c::0045BE90) --------------------------------------------------
123 
124 //----- (004760C1) --------------------------------------------------------
126  if (uNumActions < 30) pActions[uNumActions++] = action;
127 }
128 
129 //----- (00497FC5) --------------------------------------------------------
131  int uMaxPerception; // edi@1
132  signed int v5; // eax@3
133  bool result; // eax@7
134 
135  uMaxPerception = 0;
136  for (int i = 0; i < 4; i++) {
137  if (this->pPlayers[i].CanAct()) {
138  v5 = this->pPlayers[i].GetPerception();
139  if (v5 > uMaxPerception) uMaxPerception = v5;
140  }
141  }
142  if (uLevelMapStatsID && (signed int)uLevelMapStatsID < 77)
143  result = uMaxPerception >= 2 * pMapStats->pInfos[uLevelMapStatsID]._per;
144  else
145  result = 0;
146  return result;
147 }
148 
149 //----- (004936E1) --------------------------------------------------------
152  memcpy(&pPickedItem, pItem, sizeof(pPickedItem));
154 }
155 
156 int Party::GetFirstCanAct() { // added to fix some nzi problems entering shops
157  for (int i = 0; i < 4; ++i) {
158  if (this->pPlayers[i].CanAct()) return i + 1;
159  }
160 
161  __debugbreak(); // should not get here
162  return 1;
163 }
164 
165 //----- (0049370F) --------------------------------------------------------
167  int v2; // eax@4
168  signed int v8; // esi@23
169  int v12; // [sp+Ch] [bp-4h]@1
170 
171  if (uActiveCharacter > 0 && this->pPlayers[uActiveCharacter - 1].CanAct() &&
172  this->pPlayers[uActiveCharacter - 1].uTimeToRecovery <
173  1) // avoid switching away from char that can act
174  return uActiveCharacter;
175 
176  v12 = 0;
177  if (pParty->bTurnBasedModeOn) {
179  return 0;
180  }
181  v2 = PID_ID(pTurnEngine->pQueue[0].uPackedID);
182  return v2 + 1;
183  }
184 
187  playerAlreadyPicked.fill(false);
188 
189  for (int i = 0; i < 4; i++) {
190  if (!this->pPlayers[i].CanAct() ||
191  this->pPlayers[i].uTimeToRecovery > 0) {
192  playerAlreadyPicked[i] = true;
193  } else if (!playerAlreadyPicked[i]) {
194  playerAlreadyPicked[i] = true;
195  if (i >
196  0) // TODO(_) check if this condition really should be here. it is
197  // equal to the original source but still seems kind of weird
198  return i + 1;
199  break;
200  }
201  }
202 
203  for (int i = 0; i < 4; i++) {
204  if (this->pPlayers[i].CanAct() &&
205  this->pPlayers[i].uTimeToRecovery == 0) {
206  if (v12 == 0 || this->pPlayers[i].uSpeedBonus > v8) {
207  v8 = this->pPlayers[i].uSpeedBonus;
208  v12 = i + 1;
209  }
210  }
211  }
212  return v12;
213 }
214 
215 //----- (00493244) --------------------------------------------------------
216 bool Party::HasItem(unsigned int uItemID) {
217  for (int player = 0; player < 4; player++) {
218  for (int itemPos = 0; itemPos < 138; itemPos++) {
219  if (pParty->pPlayers[player].pOwnItems[itemPos].uItemID == uItemID)
220  return true;
221  }
222  }
223  return false;
224 }
225 
227  pUIAnim_Gold->uAnimTime = 0;
229  pAudioPlayer->PlaySound(SOUND_gold01, 0, 0, -1, 0, 0);
230 }
231 
233  pUIAnim_Food->uAnimTime = 0;
235  // pAudioPlayer->PlaySound(SOUND_eat, 0, 0, -1, 0, 0);
236 }
237 
238 //----- (00492AD5) --------------------------------------------------------
239 void Party::SetFood(int amount) {
240  pParty->uNumFoodRations = amount;
242 }
243 
244 //----- (00492B03) --------------------------------------------------------
245 void Party::TakeFood(int amount) {
246  if (pParty->uNumFoodRations <= amount)
247  pParty->uNumFoodRations = 0;
248  else
249  pParty->uNumFoodRations -= amount;
250 
252 }
253 
254 //----- (00492B42) --------------------------------------------------------
255 void Party::GiveFood(int amount) {
256  pParty->uNumFoodRations += amount;
257 
258  if (pParty->uNumFoodRations > 0xFFFF)
259  Party::SetFood(0xFFFFu);
260 
262 }
263 
264 int Party::GetGold() const {
265  if (engine->config->debug_infinite_gold) {
266  return 99999;
267  }
268 
269  return uNumGold;
270 }
271 
272 int Party::GetFood() const {
273  if (engine->config->debug_infinite_food) {
274  return 99999;
275  }
276 
277  return uNumFoodRations;
278 }
279 
280 //----- (00492B70) --------------------------------------------------------
281 void Party::SetGold(int amount) {
282  pParty->uNumGold = amount;
283 
285 }
286 
287 void Party::AddGold(int amount) {
288  SetGold(pParty->GetGold() + amount);
289 }
290 
291 //----- (00492BB6) --------------------------------------------------------
292 void Party::TakeGold(int amount) {
293  if (amount <= pParty->uNumGold)
294  pParty->uNumGold -= amount;
295  else
296  pParty->uNumGold = 0;
297 
299 }
300 
301 //----- (0049135E) --------------------------------------------------------
302 unsigned int Party::GetPartyFame() {
303  unsigned __int64 total_exp = 0;
304  for (uint i = 0; i < 4; ++i) total_exp += pPlayers[i].uExperience;
305  return std::min(
306  (unsigned int)(total_exp / 1000),
307  UINT_MAX); // min wasn't present, but could be incorrect without it
308 }
309 
310 //----- (0049137D) --------------------------------------------------------
311 void Party::CreateDefaultParty(bool bDebugGiveItems) {
312  Player *pCharacter; // esi@3
313  int uSkillIdx; // eax@11
314  unsigned int v16; // [sp-4h] [bp-44h]@26
315  signed int uNumPlayers; // [sp+18h] [bp-28h]@1
316  ItemGen Dst; // [sp+1Ch] [bp-24h]@10
317 
318  pHireling1Name[0] = 0;
319  pHireling2Name[0] = 0;
320  this->hirelingScrollPosition = 0;
321  memset(&pHirelings, 0, sizeof(pHirelings));
322 
323  strcpy(this->pPlayers[0].pName, localization->GetString(509)); // Zoltan
324  this->pPlayers[0].uPrevFace = 17;
325  this->pPlayers[0].uCurrentFace = 17;
326  this->pPlayers[0].uPrevVoiceID = 17;
327  this->pPlayers[0].uVoiceID = 17;
328  this->pPlayers[0].uMight = 30;
329  this->pPlayers[0].uIntelligence = 5;
330  this->pPlayers[0].uWillpower = 5;
331  this->pPlayers[0].uEndurance = 13;
332  this->pPlayers[0].uAccuracy = 13;
333  this->pPlayers[0].uSpeed = 14;
334  this->pPlayers[0].uLuck = 7;
335  this->pPlayers[0].pActiveSkills[PLAYER_SKILL_LEATHER] = 1;
336  this->pPlayers[0].pActiveSkills[PLAYER_SKILL_ARMSMASTER] = 1;
337  this->pPlayers[0].pActiveSkills[PLAYER_SKILL_BOW] = 1;
338  this->pPlayers[0].pActiveSkills[PLAYER_SKILL_SWORD] = 1;
339 
340  strcpy(this->pPlayers[1].pName, localization->GetString(506)); // Roderic
341  this->pPlayers[1].uPrevFace = 3;
342  this->pPlayers[1].uCurrentFace = 3;
343  this->pPlayers[1].uPrevVoiceID = 3;
344  this->pPlayers[1].uVoiceID = 3;
345  this->pPlayers[1].uMight = 13;
346  this->pPlayers[1].uIntelligence = 9;
347  this->pPlayers[1].uWillpower = 9;
348  this->pPlayers[1].uEndurance = 13;
349  this->pPlayers[1].uAccuracy = 13;
350  this->pPlayers[1].uSpeed = 13;
351  this->pPlayers[1].uLuck = 13;
352  this->pPlayers[1].pActiveSkills[PLAYER_SKILL_LEATHER] = 1;
353  this->pPlayers[1].pActiveSkills[PLAYER_SKILL_STEALING] = 1;
354  this->pPlayers[1].pActiveSkills[PLAYER_SKILL_DAGGER] = 1;
355  this->pPlayers[1].pActiveSkills[PLAYER_SKILL_TRAP_DISARM] = 1;
356 
357  strcpy(this->pPlayers[2].pName, localization->GetString(508)); // Serena
358  this->pPlayers[2].uPrevFace = 14;
359  this->pPlayers[2].uCurrentFace = 14;
360  this->pPlayers[2].uPrevVoiceID = 14;
361  this->pPlayers[2].uVoiceID = 14;
362  this->pPlayers[2].uMight = 12;
363  this->pPlayers[2].uIntelligence = 9;
364  this->pPlayers[2].uWillpower = 20;
365  this->pPlayers[2].uEndurance = 22;
366  this->pPlayers[2].uAccuracy = 7;
367  this->pPlayers[2].uSpeed = 13;
368  this->pPlayers[2].uLuck = 7;
369  this->pPlayers[2].pActiveSkills[PLAYER_SKILL_ALCHEMY] = 1;
370  this->pPlayers[2].pActiveSkills[PLAYER_SKILL_LEATHER] = 1;
371  this->pPlayers[2].pActiveSkills[PLAYER_SKILL_BODY] = 1;
372  this->pPlayers[2].pActiveSkills[PLAYER_SKILL_MACE] = 1;
373 
374  strcpy(this->pPlayers[3].pName, localization->GetString(507)); // Alexis
375  this->pPlayers[3].uPrevFace = 10;
376  this->pPlayers[3].uCurrentFace = 10;
377  this->pPlayers[3].uEndurance = 13;
378  this->pPlayers[3].uAccuracy = 13;
379  this->pPlayers[3].uSpeed = 13;
380  this->pPlayers[3].uPrevVoiceID = 10;
381  this->pPlayers[3].uVoiceID = 10;
382  this->pPlayers[3].uMight = 5;
383  this->pPlayers[3].uIntelligence = 30;
384  this->pPlayers[3].uWillpower = 9;
385  this->pPlayers[3].uLuck = 7;
386  this->pPlayers[3].pActiveSkills[PLAYER_SKILL_LEATHER] = 1;
387  this->pPlayers[3].pActiveSkills[PLAYER_SKILL_AIR] = 1;
388  this->pPlayers[3].pActiveSkills[PLAYER_SKILL_FIRE] = 1;
389  this->pPlayers[3].pActiveSkills[PLAYER_SKILL_STAFF] = 1;
390 
391  for (uNumPlayers = 0; uNumPlayers < 4; uNumPlayers++) {
392  pCharacter = &pParty->pPlayers[uNumPlayers];
393 
394  if (pCharacter->classType == PLAYER_CLASS_KNIGHT)
395  pCharacter->sResMagicBase = 10;
396 
397  pCharacter->lastOpenedSpellbookPage = 0;
398  for (int i = 0; i < 9; i++) { // for Magic Book
399  if (pPlayers[uNumPlayers].pActiveSkills[12 + i]) {
400  pCharacter->lastOpenedSpellbookPage = i;
401  break;
402  }
403  }
404 
405  pCharacter->uExpressionTimePassed = 0;
406 
407  if (bDebugGiveItems) {
408  Dst.Reset();
409  pItemsTable->GenerateItem(2, 40, &Dst); // ring
410  pCharacter->AddItem2(-1, &Dst);
411  for (uSkillIdx = 0; uSkillIdx < 36; uSkillIdx++) {
412  if (pCharacter->pActiveSkills[uSkillIdx]) {
413  switch (uSkillIdx) {
414  case PLAYER_SKILL_STAFF:
415  pCharacter->WearItem(ITEM_STAFF_1);
416  break;
417  case PLAYER_SKILL_SWORD:
418  pCharacter->WearItem(ITEM_LONGSWORD_1);
419  break;
420  case PLAYER_SKILL_DAGGER:
421  pCharacter->WearItem(ITEM_DAGGER_1);
422  break;
423  case PLAYER_SKILL_AXE:
424  pCharacter->WearItem(ITEM_AXE_1);
425  break;
426  case PLAYER_SKILL_SPEAR:
427  pCharacter->WearItem(ITEM_SPEAR_1);
428  break;
429  case PLAYER_SKILL_BOW:
430  pCharacter->WearItem(ITEM_CROSSBOW_1);
431  break;
432  case PLAYER_SKILL_MACE:
433  pCharacter->WearItem(ITEM_MACE_1);
434  break;
435  case PLAYER_SKILL_SHIELD:
436  pCharacter->WearItem(ITEM_BUCKLER_1);
437  break;
439  pCharacter->WearItem(ITEM_LEATHER_1);
440  break;
441  case PLAYER_SKILL_CHAIN:
442  pCharacter->WearItem(ITEM_CHAINMAIL_1);
443  break;
444  case PLAYER_SKILL_PLATE:
445  pCharacter->WearItem(ITEM_PLATE_1);
446  break;
447  case PLAYER_SKILL_FIRE:
448  pCharacter->AddItem(-1, ITEM_SPELLBOOK_FIRE_STRIKE);
449  break;
450  case PLAYER_SKILL_AIR:
451  pCharacter->AddItem(
453  break;
454  case PLAYER_SKILL_WATER:
455  pCharacter->AddItem(
457  break;
458  case PLAYER_SKILL_EARTH:
459  pCharacter->AddItem(-1, ITEM_SPELLBOOK_EARTH_SLOW);
460  break;
461  case PLAYER_SKILL_SPIRIT:
462  pCharacter->AddItem(-1,
464  break;
465  case PLAYER_SKILL_MIND:
466  pCharacter->AddItem(-1,
468  break;
469  case PLAYER_SKILL_BODY:
470  pCharacter->AddItem(-1,
472  break;
474  case PLAYER_SKILL_REPAIR:
480  pCharacter->AddItem(-1, ITEM_POTION_BOTTLE);
481  v16 = 5 * (rand() % 3 + 40); // simple reagent
482  pCharacter->AddItem(-1, v16);
483  break;
484  case PLAYER_SKILL_DODGE:
485  pCharacter->AddItem(-1, ITEM_BOOTS_1);
486  break;
488  pCharacter->AddItem(-1, ITEM_GAUNTLETS_1);
489  break;
490  default:
491  break;
492  }
493  }
494  }
495  for (int i = 0; i < 138; i++) {
496  if (pCharacter->pInventoryItemList[i].uItemID != 0)
497  pCharacter->pInventoryItemList[i].SetIdentified();
498  }
499  }
500 
501  pCharacter->sHealth = pCharacter->GetMaxHealth();
502  pCharacter->sMana = pCharacter->GetMaxMana();
503  }
504 }
505 
506 //----- (004917CE) --------------------------------------------------------
507 void Party::Reset() {
508  Zero();
509 
510  field_708 = 15;
511  sEyelevel = 160;
512  uNumGold = 200;
513  uNumFoodRations = 7;
514 
517 
518  // game begins at 9 am
519  this->playing_time = GameTime(0, 0, 9);
520  this->last_regenerated = GameTime(0, 0, 9);
521  this->uCurrentHour = 9;
522 
523  bTurnBasedModeOn = false;
524 
525  uActiveCharacter = 1;
526  ::pPlayers.ZerothIndex() = &pPlayers[0];
527  for (uint i = 0; i < 4; ++i) ::pPlayers[i + 1] = &pPlayers[i];
528 
529  pPlayers[0].Reset(PLAYER_CLASS_KNIGHT);
530  pPlayers[0].uCurrentFace = 17;
531  pPlayers[0].uPrevVoiceID = 17;
532  pPlayers[0].uVoiceID = 17;
533  pPlayers[0].SetInitialStats();
534 
535  pPlayers[0].uSex = pPlayers[0].GetSexByVoice();
536  pPlayers[0].RandomizeName();
537  strcpy(pPlayers[0].pName, localization->GetString(509));
538 
539  pPlayers[1].Reset(PLAYER_CLASS_THEIF);
540  pPlayers[1].uCurrentFace = 3;
541  pPlayers[1].uPrevVoiceID = 3;
542  pPlayers[1].uVoiceID = 3;
543  pPlayers[1].SetInitialStats();
544  pPlayers[1].uSex = pPlayers[1].GetSexByVoice();
545  pPlayers[1].RandomizeName();
546  strcpy(pPlayers[1].pName, localization->GetString(506));
547 
548  pPlayers[2].Reset(PLAYER_CLASS_CLERIC);
549  pPlayers[2].uCurrentFace = 14;
550  pPlayers[2].uPrevVoiceID = 14;
551  pPlayers[2].uVoiceID = 14;
552  pPlayers[2].SetInitialStats();
553  pPlayers[2].uSex = pPlayers[3].GetSexByVoice();
554  pPlayers[2].RandomizeName();
555  strcpy(pPlayers[2].pName, localization->GetString(508));
556 
558  pPlayers[3].uCurrentFace = 10;
559  pPlayers[3].uPrevVoiceID = 10;
560  pPlayers[3].uVoiceID = 10;
561  pPlayers[3].SetInitialStats();
562  pPlayers[3].uSex = pPlayers[3].GetSexByVoice();
563  pPlayers[3].RandomizeName();
564  strcpy(pPlayers[3].pName, localization->GetString(507));
565 
566  for (uint i = 0; i < 4; ++i) {
567  pPlayers[i].uTimeToRecovery = 0;
568  for (uint j = 0; j < 20; ++j) pPlayers[i].conditions_times[j].Reset();
569 
570  for (uint j = 0; j < 24; ++j) pPlayers[i].pPlayerBuffs[j].Reset();
571 
572  pPlayers[i].expression = CHARACTER_EXPRESSION_1;
573  pPlayers[i].uExpressionTimePassed = 0;
574  pPlayers[i].uExpressionTimeLength = rand() % 256 + 128;
575  }
576 
577  for (uint i = 0; i < 20; ++i) pPartyBuffs[i].Reset();
578 
580  WINDOW_CharacterWindow_Stats; // default character ui - stats
581  uFlags = 0;
582  memset(_autonote_bits, 0, sizeof(_autonote_bits));
583  memset(_quest_bits, 0, sizeof(_quest_bits));
584  pIsArtifactFound.fill(0);
585 
587 
588  memcpy(pNPCStats->pNewNPCData, pNPCStats->pNPCData, 0x94BCu);
589  memcpy(pNPCStats->pGroups_copy, pNPCStats->pGroups, 0x66u);
590  pNPCStats->pNewNPCData[3].uFlags |= 128; //|= 0x80u; Lady Margaret
592  pEventTimer->Pause();
593 
594  this->pPickedItem.uItemID = 0;
595 }
596 
597 //----- (0043AD34) --------------------------------------------------------
598 void Party::Yell() {
599  Actor *v0; // esi@5
600  int v1; // edi@9
601  int v2; // ebx@9
602  int v3; // eax@9
603 
604  if (pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Active()) {
606  }
607 
608  if (!pParty->bTurnBasedModeOn) {
609  for (unsigned int i = 0; i < uNumActors; i++) {
610  v0 = &pActors[i];
611  if (v0->Actor::CanAct() &&
612  v0->pMonsterInfo.uHostilityType !=
614  v0->pMonsterInfo.uMovementType !=
616  v1 = abs(v0->vPosition.x - pParty->vPosition.x);
617  v2 = abs(v0->vPosition.y - pParty->vPosition.y);
618  v3 = abs(v0->vPosition.z - pParty->vPosition.z);
619  if (int_get_vector_length(v1, v2, v3) < 512)
620  Actor::AI_Flee(i, 4, 0, 0);
621  }
622  }
623  }
624 }
625 
626 //----- (00491BF9) --------------------------------------------------------
628  this->vPosition.y = 0;
629  this->vPosition.z = 0;
630  this->vPosition.x = 0;
631  this->uFallStartY = 0;
632  this->sRotationY = 0;
633  this->sRotationX = 0;
634  this->uFallSpeed = 0;
635  this->field_28 = 0;
636  this->uDefaultPartyHeight = 120;
637  this->field_14_radius = 37;
638  this->y_rotation_granularity = 25;
639  this->uWalkSpeed = 384;
640  this->y_rotation_speed = 90;
641  this->field_24 = 5;
642  this->_6FC_water_lava_timer = 0;
643  this->field_708 = 15;
644  this->field_0 = 25;
645 
646  for (int playerId = 0; playerId < 4; playerId++) {
647  for (int buffId = 0; buffId < 24; buffId++) {
648  this->pPlayers[playerId].pPlayerBuffs[buffId].Reset();
649  }
650  }
651  for (int buffId = 0; buffId < 20; buffId++) {
652  this->pPartyBuffs[buffId].Reset();
653  }
654 }
655 
656 //----- (004909F4) --------------------------------------------------------
658  int v4; // edx@27
659 
661 
662  for (int i = 0; i < 4; ++i) {
663  Player *player = &pPlayers[i];
664  player->uExpressionTimePassed +=
665  (unsigned short)pMiscTimer->uTimeElapsed;
666 
667  uint condition = player->GetMajorConditionIdx();
669  if (player->uExpressionTimePassed < player->uExpressionTimeLength)
670  continue;
671 
672  player->uExpressionTimePassed = 0;
673  if (player->expression != 1 || rand() % 5) {
675  player->uExpressionTimeLength = rand() % 256 + 32;
676  } else {
677  v4 = rand() % 100;
678  if (v4 < 25)
680  else if (v4 < 31)
682  else if (v4 < 37)
684  else if (v4 < 43)
686  else if (v4 < 46)
688  else if (v4 < 52)
690  else if (v4 < 58)
692  else if (v4 < 64)
694  else if (v4 < 70)
696  else if (v4 < 76)
698  else if (v4 < 82)
700  else if (v4 < 88)
702  else if (v4 < 94)
704  else
706  }
707 
708  for (unsigned int j = 0; j < pPlayerFrameTable->uNumFrames; ++j) {
709  PlayerFrame *frame = &pPlayerFrameTable->pFrames[j];
710  if (frame->expression == player->expression) {
711  player->uExpressionTimeLength = 8 * frame->uAnimLength;
712  break;
713  }
714  }
715  } else if (player->expression != CHARACTER_EXPRESSION_DMGRECVD_MINOR &&
718  player->uExpressionTimePassed >= player->uExpressionTimeLength) {
719  player->uExpressionTimeLength = 0;
720  player->uExpressionTimePassed = 0;
721 
722  switch (condition) {
723  case Condition_Dead:
725  break;
726  case Condition_Pertified:
728  break;
731  break;
732  case Condition_Cursed:
734  break;
735  case Condition_Weak:
737  break;
738  case Condition_Sleep:
740  break;
741  case Condition_Fear:
743  break;
744  case Condition_Drunk:
746  break;
747  case Condition_Insane:
749  break;
754  break;
759  break;
760  case Condition_Paralyzed:
762  break;
765  break;
766  default:
767  Error("Invalid condition: %u", condition);
768  }
769  }
770  }
771 
772  for (int i = 0; i < 2; ++i) {
773  NPCData *hireling = &pParty->pHirelings[i];
774  if (!hireling->evt_C) continue;
775 
776  hireling->evt_B += pMiscTimer->uTimeElapsed;
777  if (hireling->evt_B >= hireling->evt_C) {
778  hireling->evt_A = 0;
779  hireling->evt_B = 0;
780  hireling->evt_C = 0;
781 
782  Assert(sizeof(NPCData) == 0x4C);
783  memset(hireling, 0, sizeof(*hireling));
784 
787  viewparams->bRedrawGameUI = true;
788  }
789  }
790 }
791 
792 //----- (00490D02) --------------------------------------------------------
794  Player *pPlayer; // esi@4
795  bool have_vessels_soul; // [sp+10h] [bp-8h]@10
796 
797  for (uint i = 0; i < 20; ++i) pParty->pPartyBuffs[i].Reset();
798 
799  for (int pPlayerID = 0; pPlayerID < 4; ++pPlayerID) {
800  pPlayer = &pParty->pPlayers[pPlayerID];
801  for (uint i = 0; i < 20; ++i) pPlayer->pPlayerBuffs[i].Reset();
802 
803  pPlayer->Zero();
804  if (pPlayer->conditions_times[Condition_Dead] ||
807  continue;
808  }
809 
810  pPlayer->conditions_times[Condition_Unconcious].Reset();
811  pPlayer->conditions_times[Condition_Drunk].Reset();
812  pPlayer->conditions_times[Condition_Fear].Reset();
813  pPlayer->conditions_times[Condition_Sleep].Reset();
814  pPlayer->conditions_times[Condition_Weak].Reset();
815 
816  pPlayer->uTimeToRecovery = 0;
817  pPlayer->sHealth = pPlayer->GetMaxHealth();
818  pPlayer->sMana = pPlayer->GetMaxMana();
819  if (pPlayer->classType == PLAYER_CLASS_LICH) {
820  have_vessels_soul = false;
821  for (uint i = 0; i < 126; i++) {
822  if (pPlayer->pInventoryItemList[i].uItemID ==
824  pPlayer->pInventoryItemList[i].uHolderPlayer ==
825  pPlayerID + 1)
826  have_vessels_soul = true;
827  }
828  if (!have_vessels_soul) {
829  pPlayer->sHealth = pPlayer->GetMaxHealth() / 2;
830  pPlayer->sMana = pPlayer->GetMaxMana() / 2;
831  }
832  }
833 
834  if (pPlayer->conditions_times[Condition_Zombie]) {
835  pPlayer->sMana = 0;
836  pPlayer->sHealth /= 2;
837  } else if (pPlayer->conditions_times[Condition_Poison_Severe] ||
839  pPlayer->sHealth /= 4;
840  pPlayer->sMana /= 4;
841  } else if (pPlayer->conditions_times[Condition_Poison_Medium] ||
843  pPlayer->sHealth /= 3;
844  pPlayer->sMana /= 3;
845  } else if (pPlayer->conditions_times[Condition_Poison_Weak] ||
847  pPlayer->sHealth /= 2;
848  pPlayer->sMana /= 2;
849  }
850  if (pPlayer->conditions_times[Condition_Insane]) pPlayer->sMana = 0;
852  }
854 }
855 
856 //----- (004938D1) --------------------------------------------------------
857 void Rest(unsigned int uMinsToRest) { // this is passed mins not hours
858  auto rest_time = GameTime(0, uMinsToRest);
859 
860  if (uMinsToRest > 240) Actor::InitializeActors();
861 
862  pParty->GetPlayingTime() += rest_time;
863 
864  for (int i = 1; i <= 4; i++) {
865  pPlayers[i]->Recover(rest_time); // ??
866  }
867 
869 }
870 
871 //----- (004B1BDB) --------------------------------------------------------
872 void RestAndHeal(int minutes) {
873  pParty->GetPlayingTime().AddMinutes(minutes);
874 
875  pParty->pHirelings[0].bHasUsedTheAbility = false;
876  pParty->pHirelings[1].bHasUsedTheAbility = false;
877 
886  pParty->RestAndHeal();
887 
888  for (int i = 0; i < 4; i++) {
889  pParty->pPlayers[i].uTimeToRecovery = 0;
890  pParty->pPlayers[i].uNumDivineInterventionCastsThisDay = 0;
891  pParty->pPlayers[i].uNumArmageddonCasts = 0;
892  pParty->pPlayers[i].uNumFireSpikeCasts = 0;
893  pParty->pPlayers[i].field_1B3B = 0;
894  }
895 
897 }
898 //----- (0041F5BE) --------------------------------------------------------
905  }
906  if (_506F14_resting_stage == 2) {
907  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0);
908  }
909  } else {
910  Rest(6u);
913  }
915 }
916 
918  return _449B57_test_bit(pParty->_quest_bits, bit);
919 }
920 
921 //----- (0047752B) --------------------------------------------------------
923  DDM_DLV_Header *v0; // ebx@1
924  signed int v1; // esi@3
925 
926  v0 = &pOutdoor->ddm;
928  v1 = 0;
929  if (CheckHiredNPCSpeciality(Pirate)) v1 += 5;
931  if (CheckHiredNPCSpeciality(Gypsy)) v1 += 5;
932  if (CheckHiredNPCSpeciality(Duper)) v1 += 5;
934  return v1 + v0->uReputation;
935 }
936 
937 //----- (004269A2) --------------------------------------------------------
938 void Party::GivePartyExp(unsigned int pEXPNum) {
939  signed int pActivePlayerCount; // ecx@1
940  int pLearningPercent; // eax@13
941  int playermodexp;
942 
943  if (pEXPNum > 0) {
944  pActivePlayerCount = 0;
945  for (uint i = 0; i < 4; ++i) {
946  if (!pParty->pPlayers[i].conditions_times[Condition_Unconcious] &&
947  !pParty->pPlayers[i].conditions_times[Condition_Dead] &&
948  !pParty->pPlayers[i].conditions_times[Condition_Pertified] &&
949  !pParty->pPlayers[i].conditions_times[Condition_Eradicated]) {
950  pActivePlayerCount++;
951  }
952  }
953  if (pActivePlayerCount) {
954  pEXPNum = pEXPNum / pActivePlayerCount;
955  for (uint i = 0; i < 4; ++i) {
956  if (!pParty->pPlayers[i]
957  .conditions_times[Condition_Unconcious] &&
958  !pParty->pPlayers[i].conditions_times[Condition_Dead] &&
959  !pParty->pPlayers[i]
960  .conditions_times[Condition_Pertified] &&
961  !pParty->pPlayers[i]
962  .conditions_times[Condition_Eradicated]) {
963  pLearningPercent = pParty->pPlayers[i].GetLearningPercent();
964  playermodexp = pEXPNum + pEXPNum * pLearningPercent / 100;
965  pParty->pPlayers[i].uExperience += playermodexp;
966  if (pParty->pPlayers[i].uExperience > 4000000000) {
967  pParty->pPlayers[i].uExperience = 0;
968  }
969  }
970  }
971  }
972  }
973 }
974 
975 //----- (00420C05) --------------------------------------------------------
977  unsigned int amount,
978  int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal) {
979  NPCData *v12; // ecx@21
980  unsigned int v13; // ecx@23
981  int hirelingCount; // [sp+Ch] [bp-4h]@6
982 
983  int hirelingSalaries = 0;
984  unsigned int goldToGain = amount;
985 
986  String status;
987  if (_1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal ==
988  2) {
989  } else if (
990  _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal ==
991  1) {
992  status =
993  localization->FormatString(467, amount); // You found %lu gold!
994  } else {
995  unsigned char buf[1024];
996  hirelingCount = 0;
997  for (int i = 0; i < 2; i++) {
998  if (this->pHirelings[i].pName) {
999  hirelingCount++;
1000  buf[hirelingCount] = i;
1001  }
1002  }
1003  for (uint i = 0; i < pNPCStats->uNumNewNPCs; i++) {
1004  if (pNPCStats->pNewNPCData[i].uFlags & 0x80 &&
1005  (!this->pHirelings[0].pName ||
1006  strcmp(pNPCStats->pNewNPCData[i].pName,
1007  this->pHirelings[0].pName)) &&
1008  (!this->pHirelings[1].pName ||
1009  strcmp(pNPCStats->pNewNPCData[i].pName,
1010  this->pHirelings[1].pName))) {
1011  hirelingCount++;
1012  buf[hirelingCount] = i + 2;
1013  }
1014  }
1015  for (int i = 0; i < hirelingCount; i++) {
1016  uchar thisBufId = buf[i];
1017  if (thisBufId < 2)
1018  v12 = &this->pHirelings[thisBufId];
1019  else
1020  v12 = &pNPCStats->pNPCData[thisBufId + 499];
1021  v13 = v12->uProfession;
1022  if (v13)
1023  hirelingSalaries +=
1024  pNPCStats->pProfessions[v13]
1025  .uHirePrice;
1026  }
1028  goldToGain += (signed int)(10 * goldToGain) / 100;
1030  goldToGain += (signed int)(20 * goldToGain) / 100;
1032  goldToGain += (signed int)(10 * goldToGain) / 100;
1033  if (hirelingSalaries) {
1034  hirelingSalaries =
1035  (signed int)(goldToGain * hirelingSalaries / 100) / 100;
1036  if (hirelingSalaries < 1) hirelingSalaries = 1;
1037  status = localization->FormatString(
1038  466, goldToGain,
1039  hirelingSalaries); // You found %lu gold (followers take %lu)!
1040  } else {
1041  status = localization->FormatString(467, amount); // You found %lu gold!
1042  }
1043  }
1044  AddGold(goldToGain - hirelingSalaries);
1045  if (status.length() > 0) GameUI_StatusBar_OnEvent(status.c_str(), 2u);
1046 }
1047 
1049  if (!pParty->pPickedItem.uItemID) {
1050  return;
1051  }
1052 
1054 
1055  int v2 = ::pPlayers[uActiveCharacter]->AddItem(-1, pParty->pPickedItem.uItemID);
1056  if (uActiveCharacter && v2 != 0) {
1057  memcpy(&::pPlayers[uActiveCharacter]->pInventoryItemList[v2 - 1], &pParty->pPickedItem, 0x24u);
1059  } else {
1060  int v12 = 0;
1061  for (v12 = 0; v12 < 4; v12++) {
1062  int v4 = pParty->pPlayers[v12].AddItem(-1, pParty->pPickedItem.uItemID);
1063  if (v4) {
1064  memcpy(&pParty->pPlayers[v12].pInventoryItemList[v4 - 1], &pParty->pPickedItem, sizeof(ItemGen));
1066  break;
1067  }
1068  }
1069  if (v12 == 4) {
1071  object.uType = (SPRITE_OBJECT_TYPE)pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID;
1072  object.spell_caster_pid = OBJECT_Player;
1073  object.uObjectDescID = pObjectList->ObjectIDByItemID(object.uType);
1074  object.vPosition.y = pParty->vPosition.y;
1075  object.vPosition.x = pParty->vPosition.x;
1076  object.vPosition.z = pParty->sEyelevel + pParty->vPosition.z;
1077  object.uSoundID = 0;
1078  object.uFacing = 0;
1079  object.uAttributes = 8;
1080  object.uSpriteFrameID = 0;
1081  object.uSectorID = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y,
1083  memcpy(&object.containing_item, &pParty->pPickedItem, sizeof(object.containing_item));
1084  object.Create(pParty->sRotationY, 184, 200, 0);
1086  }
1087  }
1088 
1089  if (texture) {
1090  texture->Release();
1091  texture = nullptr;
1092  }
1093 }
1094 
1095 //----- (0048C6F6) --------------------------------------------------------
1097  unsigned int v2; // eax@1
1098  char *v5; // eax@8
1099  // Texture_MM7 *v7; // ebx@10
1100  signed int v8; // esi@10
1101  Player *v9; // edi@11
1102  int v10; // eax@11
1103  // int v21; // [sp+24h] [bp-4h]@10
1104 
1105  v2 = pItem->uItemID;
1106  if (!pItemsTable->pItems[v2].uItemID_Rep_St) pItem->SetIdentified();
1107 
1108  v5 = pItemsTable->pItems[v2].pIconName;
1109  if (v5) {
1110  auto texture = assets->GetImage_ColorKey(v5, 0x7FF);
1111  v8 = 0;
1112  uint current_player = uActiveCharacter;
1113  for (int i = 0; i < 4; i++) {
1114  current_player = current_player + i;
1115  if (current_player > 4) current_player = current_player - 4;
1116  v9 = ::pPlayers[current_player];
1117  v10 = v9->AddItem(-1, pItem->uItemID);
1118  if (v10) {
1119  memcpy(&v9->pInventoryItemList[v10 - 1], pItem, 0x24u);
1120  pItem->Reset();
1121  pAudioPlayer->PlaySound(SOUND_gold01, 0, 0, -1, 0, 0);
1122  v9->PlaySound(SPEECH_60, 0);
1123 
1124  if (texture) {
1125  texture->Release();
1126  }
1127  return true;
1128  }
1129  }
1130  if (texture) {
1131  texture->Release();
1132  }
1133  } else {
1134  logger->Warning(L"Invalid picture_name detected ::addItem()");
1135  }
1136  return false;
1137 }
1138 
1140 
1142 
1143 //----- (0046A89E) --------------------------------------------------------
1144 int Party::_46A89E_immolation_effect(int *affected, int affectedArrSize,
1145  int effectRange) {
1146  int v5; // ebx@3
1147  int v17; // [sp+Ch] [bp-10h]@3
1148  int v18; // [sp+10h] [bp-Ch]@3
1149  int affectedCount; // [sp+18h] [bp-4h]@1
1150 
1151  affectedCount = 0;
1152  for (size_t i = 0; i < uNumActors; ++i) {
1153  v5 = abs(pActors[i].vPosition.x - this->vPosition.x);
1154  v17 = abs(pActors[i].vPosition.y - this->vPosition.y);
1155  v18 = abs(pActors[i].vPosition.z - this->vPosition.z);
1156  if (int_get_vector_length(v5, v17, v18) <= effectRange) {
1157  if (pActors[i].uAIState != Dead && pActors[i].uAIState != Dying &&
1158  pActors[i].uAIState != Removed &&
1159  pActors[i].uAIState != Disabled &&
1160  pActors[i].uAIState != Summoned) {
1161  affected[affectedCount] = i;
1162  affectedCount++;
1163  if (affectedCount >= affectedArrSize) break;
1164  }
1165  }
1166  }
1167  return affectedCount;
1168 }
1169 
1170 //----- (00444D80) --------------------------------------------------------
1172  signed int new_travel_time; // esi@1
1173 
1174  new_travel_time = uDefaultTravelTime_ByFoot;
1175  if (CheckHiredNPCSpeciality(Guide)) --new_travel_time;
1176  if (CheckHiredNPCSpeciality(Tracker)) new_travel_time -= 2;
1177  if (CheckHiredNPCSpeciality(Pathfinder)) new_travel_time -= 3;
1178  if (CheckHiredNPCSpeciality(Explorer)) --new_travel_time;
1179  if (new_travel_time < 1) new_travel_time = 1;
1180  return new_travel_time;
1181 }
1182 // 6BD07C: using guessed type int uDefaultTravelTime_ByFoot;
1183 
1184 //----- (00449B57) --------------------------------------------------------
1185 bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2) {
1186  return (a1[(a2 - 1) >> 3] & (0x80 >> (a2 - 1) % 8)) != 0;
1187 }
1188 
1189 //----- (00449B7E) --------------------------------------------------------
1190 void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2,
1191  unsigned __int16 bToggle) {
1192  signed int v3; // esi@1
1193  unsigned char set_bit; // edx@1
1194 
1195  v3 = a2 - 1;
1196  set_bit = 0x80 >> v3 % 8;
1197  if (bToggle)
1198  pArray[v3 / 8] |= set_bit;
1199  else
1200  pArray[v3 / 8] &= ~set_bit;
1201 }
1202 
1203 //----- (004760D5) --------------------------------------------------------
1205  if (!uNumActions) return PARTY_INVALID;
1206 
1208  for (unsigned int i = 0; i < uNumActions - 1; ++i)
1209  pActions[i] = pActions[i + 1];
1210  --uNumActions;
1211 
1212  return result;
1213 }
ITEM_SPELLBOOK_BODY_FIRST_AID
@ ITEM_SPELLBOOK_BODY_FIRST_AID
Definition: Items.h:147
Party::pPickedItem
ItemGen pPickedItem
Definition: Party.h:312
SpriteObject
Definition: SpriteObject.h:189
CHARACTER_EXPRESSION_PERTIFIED
@ CHARACTER_EXPRESSION_PERTIFIED
Definition: Player.h:354
IconFrameTable.h
ItemGen::uHolderPlayer
char uHolderPlayer
Definition: Items.h:352
Party::uCurrentTimeSecond
unsigned int uCurrentTimeSecond
Definition: Party.h:277
_pUIAnim_WizardEye
UIAnimation _pUIAnim_WizardEye
Definition: Party.cpp:43
Player
Definition: Player.h:401
Party::Zero
void Zero()
Definition: Party.cpp:72
Party::Reset
void Reset()
Definition: Party.cpp:507
TE_ATTACK
@ TE_ATTACK
Definition: TurnEngine.h:21
uNumActors
size_t uNumActors
Definition: Actor.cpp:39
Party::vPosition
Vec3_int_ vPosition
Definition: Party.h:250
Engine_::IocContainer
Definition: IocContainer.h:15
Party::ResetPosMiscAndSpellBuffs
void ResetPosMiscAndSpellBuffs()
Definition: Party.cpp:627
Party::uNumBountiesCollected
unsigned int uNumBountiesCollected
Definition: Party.h:286
PLAYER_SKILL_DAGGER
@ PLAYER_SKILL_DAGGER
Definition: Player.h:173
CHARACTER_EXPRESSION_17
@ CHARACTER_EXPRESSION_17
Definition: Player.h:359
int_get_vector_length
uint32_t int_get_vector_length(int32_t x, int32_t y, int32_t z)
Definition: VectorTypes.cpp:8
Condition_Poison_Medium
@ Condition_Poison_Medium
Definition: Conditions.h:16
ActionQueue::pActions
PartyAction pActions[30]
Definition: Party.h:129
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
NPCData::uProfession
unsigned int uProfession
Definition: NPC.h:89
Party::y_rotation_granularity
int y_rotation_granularity
Definition: Party.h:242
PlayerFrame
Definition: PlayerFrameTable.h:7
Party::TakeFood
static void TakeFood(int amount)
Definition: Party.cpp:245
Party::uFallSpeed
int uFallSpeed
Definition: Party.h:259
Dying
@ Dying
Definition: Actor.h:79
CHARACTER_EXPRESSION_30
@ CHARACTER_EXPRESSION_30
Definition: Player.h:372
UIMSG_Escape
@ UIMSG_Escape
Definition: GUIWindow.h:96
PartyAlignment::PartyAlignment_Neutral
@ PartyAlignment_Neutral
Viewport.h
NPCProfession::uHirePrice
unsigned int uHirePrice
Definition: NPC.h:115
Timer::uTimeElapsed
unsigned int uTimeElapsed
Definition: Time.h:133
Party::field_24
int field_24
Definition: Party.h:245
Party::y_rotation_speed
int y_rotation_speed
Definition: Party.h:244
Party::uCurrentMonth
unsigned int uCurrentMonth
Definition: Party.h:272
SetUserInterface
void SetUserInterface(PartyAlignment align, bool bReplace)
Definition: GUIWindow.cpp:1032
MapStats::pInfos
MapInfo pInfos[77]
Definition: MapInfo.h:79
LOD.h
Party::GetPlayingTime
GameTime & GetPlayingTime()
Definition: Party.h:230
condition
EGLenum condition
Definition: SDL_egl.h:1629
PLAYER_SKILL_STAFF
@ PLAYER_SKILL_STAFF
Definition: Player.h:171
ITEM_PLATE_1
@ ITEM_PLATE_1
Definition: Items.h:86
Party::pIsArtifactFound
std::array< char, 29 > pIsArtifactFound
Definition: Party.h:298
Party::uCurrentMinute
unsigned int uCurrentMinute
Definition: Party.h:276
Mouse
Definition: Mouse.h:279
Pirate
@ Pirate
Definition: NPC.h:50
Party
Definition: Party.h:151
PLAYER_CLASS_CLERIC
@ PLAYER_CLASS_CLERIC
Definition: Player.h:240
NPCData::uFlags
unsigned int uFlags
Definition: NPC.h:84
_pUIAnum_Torchlight
UIAnimation _pUIAnum_Torchlight
Definition: Party.cpp:42
Party::SetFood
static void SetFood(int amount)
Definition: Party.cpp:239
Party::GetNextActiveCharacter
int GetNextActiveCharacter()
Definition: Party.cpp:166
SOUND_gold01
@ SOUND_gold01
Definition: AudioPlayer.h:72
NPCData::Hired
bool Hired()
Definition: NPC.h:80
Party::sRotationX
int sRotationX
Definition: Party.h:252
ItemGen::SetIdentified
void SetIdentified()
Definition: Items.h:307
PARTY_INVALID
@ PARTY_INVALID
Definition: Party.h:95
PlayerFrameTable::pFrames
struct PlayerFrame * pFrames
Definition: PlayerFrameTable.h:29
_449B57_test_bit
bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2)
Definition: Party.cpp:1185
CHARACTER_EXPRESSION_55
@ CHARACTER_EXPRESSION_55
Definition: Player.h:388
PLAYER_SKILL_AXE
@ PLAYER_SKILL_AXE
Definition: Player.h:174
PARTY_QUEST_BITS
PARTY_QUEST_BITS
Definition: Party.h:13
_pUIAnim_Food
UIAnimation _pUIAnim_Food
Definition: Party.cpp:40
MapInfo::_per
int _per
Definition: MapInfo.h:48
Party::hirelingScrollPosition
unsigned __int8 hirelingScrollPosition
Definition: Party.h:268
Actor
Definition: Actor.h:151
uDefaultTravelTime_ByFoot
int uDefaultTravelTime_ByFoot
Definition: mm7_data.cpp:696
Party::sEyelevel
int sEyelevel
Definition: Party.h:239
AudioPlayer::PlaySound
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
Definition: AudioPlayer.cpp:195
CHARACTER_EXPRESSION_DMGRECVD_MAJOR
@ CHARACTER_EXPRESSION_DMGRECVD_MAJOR
Definition: Player.h:378
SpriteObject.h
Icon::GetAnimLength
unsigned int GetAnimLength() const
Definition: IconFrameTable.h:20
CHARACTER_EXPRESSION_16
@ CHARACTER_EXPRESSION_16
Definition: Player.h:358
engine
std::shared_ptr< Engine > engine
Definition: Engine.cpp:130
PLAYER_SKILL_EARTH
@ PLAYER_SKILL_EARTH
Definition: Player.h:186
NPCStats::pGroups_copy
uint16_t pGroups_copy[51]
Definition: NPC.h:177
GameTime::GetDaysOfMonth
int GetDaysOfMonth() const
Definition: Time.h:41
NPCData::evt_B
unsigned int evt_B
Definition: NPC.h:94
Party::uDefaultPartyHeight
unsigned int uDefaultPartyHeight
Definition: Party.h:238
game_starting_year
int game_starting_year
Definition: mm7_data.cpp:193
PLAYER_SKILL_MIND
@ PLAYER_SKILL_MIND
Definition: Player.h:188
Party::_quest_bits
unsigned __int8 _quest_bits[64]
Definition: Party.h:291
localization
Localization * localization
Definition: Localization.cpp:11
PLAYER_SKILL_LEARNING
@ PLAYER_SKILL_LEARNING
Definition: Player.h:207
CHARACTER_EXPRESSION_DEAD
@ CHARACTER_EXPRESSION_DEAD
Definition: Player.h:395
CHARACTER_EXPRESSION_SLEEP
@ CHARACTER_EXPRESSION_SLEEP
Definition: Player.h:346
mouse
static Mouse * mouse
Definition: Party.cpp:28
Party::uCurrentHour
unsigned int uCurrentHour
Definition: Party.h:275
ObjectList::ObjectIDByItemID
unsigned int ObjectIDByItemID(unsigned int uItemID)
Definition: ObjectList.cpp:7
CHARACTER_EXPRESSION_INSANE
@ CHARACTER_EXPRESSION_INSANE
Definition: Player.h:349
PLAYER_SKILL_BOW
@ PLAYER_SKILL_BOW
Definition: Player.h:176
Player::lastOpenedSpellbookPage
char lastOpenedSpellbookPage
Definition: Player.h:773
PlayerFrameTable.h
Burglar
@ Burglar
Definition: NPC.h:57
PlayerFrame::expression
CHARACTER_EXPRESSION_ID expression
Definition: PlayerFrameTable.h:8
Player::Zero
void Zero()
Definition: Player.cpp:3765
Party::pPlayers
std::array< Player, 4 > pPlayers
Definition: Party.h:310
FallenWizard
@ FallenWizard
Definition: NPC.h:58
Party::uNumArenaLordWins
char uNumArenaLordWins
Definition: Party.h:297
Party::uNumPrisonTerms
int uNumPrisonTerms
Definition: Party.h:285
CHARACTER_EXPRESSION_DMGRECVD_MINOR
@ CHARACTER_EXPRESSION_DMGRECVD_MINOR
Definition: Player.h:376
Party::UpdatePlayersAndHirelingsEmotions
void UpdatePlayersAndHirelingsEmotions()
Definition: Party.cpp:657
ITEM_GAUNTLETS_1
@ ITEM_GAUNTLETS_1
Definition: Items.h:89
ITEM_LONGSWORD_1
@ ITEM_LONGSWORD_1
Definition: Items.h:75
Party::uNumArenaSquireWins
char uNumArenaSquireWins
Definition: Party.h:295
Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
void sub_421B2C_PlaceInInventory_or_DropPickedItem()
Definition: Party.cpp:1048
texture
GLenum GLenum GLuint texture
Definition: SDL_opengl_glext.h:1181
CHARACTER_EXPRESSION_CURSED
@ CHARACTER_EXPRESSION_CURSED
Definition: Player.h:344
Party::uCurrentMonthWeek
unsigned int uCurrentMonthWeek
Definition: Party.h:273
_494035_timed_effects__water_walking_damage__etc
void _494035_timed_effects__water_walking_damage__etc()
Definition: Engine.cpp:1623
CHARACTER_EXPRESSION_UNCONCIOUS
@ CHARACTER_EXPRESSION_UNCONCIOUS
Definition: Player.h:353
GameTime::GetYears
int GetYears() const
Definition: Time.h:35
ItemGen::Reset
void Reset()
Definition: Items.cpp:133
NPCData::evt_C
unsigned int evt_C
Definition: NPC.h:95
Player::pActiveSkills
std::array< unsigned __int16, 37 > pActiveSkills
Definition: Player.h:711
Condition_Paralyzed
@ Condition_Paralyzed
Definition: Conditions.h:20
Player::WearItem
void WearItem(unsigned int uItemID)
Definition: Player.cpp:788
Party::uNumGold
unsigned int uNumGold
Definition: Party.h:281
ITEM_LEATHER_1
@ ITEM_LEATHER_1
Definition: Items.h:84
pPlayers
NZIArray< struct Player *, 5 > pPlayers
Definition: Player.cpp:46
playerAlreadyPicked
std::array< bool, 4 > playerAlreadyPicked
Definition: Party.cpp:34
_uianim
struct @45 _uianim
TurnEngine.h
ITEM_SPELLBOOK_FIRE_STRIKE
@ ITEM_SPELLBOOK_FIRE_STRIKE
Definition: Items.h:140
PLAYER_SKILL_ITEM_ID
@ PLAYER_SKILL_ITEM_ID
Definition: Player.h:192
PLAYER_SKILL_FIRE
@ PLAYER_SKILL_FIRE
Definition: Player.h:183
pIndoor
IndoorLocation * pIndoor
Definition: Indoor.cpp:49
Party::last_regenerated
GameTime last_regenerated
Definition: Party.h:248
Condition_Insane
@ Condition_Insane
Definition: Conditions.h:13
Engine.h
Party::GetPartyFame
unsigned int GetPartyFame()
Definition: Party.cpp:302
PLAYER_SKILL_UNARMED
@ PLAYER_SKILL_UNARMED
Definition: Player.h:202
Party::PartyTimes
PartyTimeStruct PartyTimes
Definition: Party.h:249
pTurnEngine
struct stru262_TurnBased * pTurnEngine
Definition: TurnEngine.cpp:21
Dead
@ Dead
Definition: Actor.h:80
Party::Sleep8Hours
static void Sleep8Hours()
Definition: Party.cpp:899
ITEM_SPELLBOOK_AIR_FEATHER_FALL
@ ITEM_SPELLBOOK_AIR_FEATHER_FALL
Definition: Items.h:141
Party::field_0
int field_0
Definition: Party.h:236
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9435
pMapStats
struct MapStats * pMapStats
Definition: mm7_data.cpp:20
Party::pPartyBuffs
std::array< SpellBuff, 20 > pPartyBuffs
Definition: Party.h:309
PlayerFrameTable::uNumFrames
unsigned int uNumFrames
Definition: PlayerFrameTable.h:28
uLevelMapStatsID
unsigned int uLevelMapStatsID
Definition: mm7_data.cpp:713
GameTime::GetMinutesFraction
int GetMinutesFraction() const
Definition: Time.h:38
Player::sResMagicBase
__int16 sResMagicBase
Definition: Player.h:739
SPEECH_60
@ SPEECH_60
Definition: Player.h:106
Party::uFallStartY
int uFallStartY
Definition: Party.h:265
CHARACTER_EXPRESSION_13
@ CHARACTER_EXPRESSION_13
Definition: Player.h:355
_506F14_resting_stage
int _506F14_resting_stage
Definition: mm7_data.cpp:544
Actor.h
Party::Yell
void Yell()
Definition: Party.cpp:598
Party::AddItemToParty
bool AddItemToParty(ItemGen *pItem)
Definition: Party.cpp:1096
pItemsTable
struct ItemsTable * pItemsTable
Definition: Items.cpp:37
Party::PartyFindsGold
void PartyFindsGold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal)
Definition: Party.cpp:976
current_character_screen_window
enum WindowType current_character_screen_window
Definition: GUIWindow.cpp:78
pUIAnum_Torchlight
UIAnimation * pUIAnum_Torchlight
Definition: Party.cpp:48
Player::uExpressionTimeLength
unsigned __int16 uExpressionTimeLength
Definition: Player.h:790
Localization.h
GameTime::GetSecondsFraction
int GetSecondsFraction() const
Definition: Time.h:37
NPCData::evt_A
unsigned int evt_A
Definition: NPC.h:93
PLAYER_SKILL_PERCEPTION
@ PLAYER_SKILL_PERCEPTION
Definition: Player.h:197
CHARACTER_EXPRESSION_29
@ CHARACTER_EXPRESSION_29
Definition: Player.h:371
NPCStats::uNumNewNPCs
unsigned int uNumNewNPCs
Definition: NPC.h:179
ITEM_BOOTS_1
@ ITEM_BOOTS_1
Definition: Items.h:90
TurnBased_QueueElem::uPackedID
int uPackedID
Definition: TurnEngine.h:34
Condition_Fear
@ Condition_Fear
Definition: Conditions.h:11
PLAYER_SKILL_DIPLOMACY
@ PLAYER_SKILL_DIPLOMACY
Definition: Player.h:198
pParty
Party * pParty
Definition: Party.cpp:30
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: SDL_opengl_glext.h:2483
CHARACTER_EXPRESSION_WEAK
@ CHARACTER_EXPRESSION_WEAK
Definition: Player.h:345
Party::_497FC5_check_party_perception_against_level
bool _497FC5_check_party_perception_against_level()
Definition: Party.cpp:130
pUIAnims
std::array< class UIAnimation *, 4 > pUIAnims
Definition: Party.cpp:52
object
GLuint object
Definition: SDL_opengl_glext.h:6060
CHARACTER_EXPRESSION_19
@ CHARACTER_EXPRESSION_19
Definition: Player.h:361
CHARACTER_EXPRESSION_PARALYZED
@ CHARACTER_EXPRESSION_PARALYZED
Definition: Player.h:352
PLAYER_SKILL_SPIRIT
@ PLAYER_SKILL_SPIRIT
Definition: Player.h:187
UIAnimation::uAnimLength
int16_t uAnimLength
Definition: IconFrameTable.h:75
NPCData::pName
char * pName
Definition: NPC.h:82
NPCStats::pNewNPCData
NPCData pNewNPCData[501]
Definition: NPC.h:165
Party::days_played_without_rest
unsigned char days_played_without_rest
Definition: Party.h:290
_506F18_num_minutes_to_sleep
int _506F18_num_minutes_to_sleep
Definition: mm7_data.cpp:545
ActionQueue::Reset
void Reset()
Definition: Party.cpp:122
Banker
@ Banker
Definition: NPC.h:37
Gypsy
@ Gypsy
Definition: NPC.h:54
Player::uExpressionTimePassed
unsigned __int16 uExpressionTimePassed
Definition: Player.h:789
Party::_6FC_water_lava_timer
int _6FC_water_lava_timer
Definition: Party.h:264
PLAYER_SKILL_DODGE
@ PLAYER_SKILL_DODGE
Definition: Player.h:201
NPCStats::pProfessions
NPCProfession pProfessions[59]
Definition: NPC.h:167
ITEM_CROSSBOW_1
@ ITEM_CROSSBOW_1
Definition: Items.h:79
Party::pHireling2Name
char pHireling2Name[100]
Definition: Party.h:319
viewparams
struct ViewingParams * viewparams
Definition: mm7_data.cpp:22
NPCStats::pNPCData
NPCData pNPCData[501]
Definition: NPC.h:164
ItemsTable::GenerateItem
void GenerateItem(int treasure_level, unsigned int uTreasureType, ItemGen *pItem)
Definition: Items.cpp:680
Player::expression
CHARACTER_EXPRESSION_ID expression
Definition: Player.h:788
Disabled
@ Disabled
Definition: Actor.h:94
Party::field_708
char field_708
Definition: Party.h:267
uchar
unsigned char uchar
Definition: MM7.h:44
Condition_Dead
@ Condition_Dead
Definition: Conditions.h:22
Party::field_28
int field_28
Definition: Party.h:246
CHARACTER_EXPRESSION_14
@ CHARACTER_EXPRESSION_14
Definition: Player.h:356
Condition_Disease_Weak
@ Condition_Disease_Weak
Definition: Conditions.h:15
PLAYER_SKILL_MEDITATION
@ PLAYER_SKILL_MEDITATION
Definition: Player.h:196
Party::_46A89E_immolation_effect
int _46A89E_immolation_effect(int *affected, int affectedArrSize, int effectRange)
Definition: Party.cpp:1144
ItemGen::GetIconName
char * GetIconName()
Definition: Items.cpp:1521
ItemGen::uItemID
int uItemID
Definition: Items.h:326
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
ITEM_MACE_1
@ ITEM_MACE_1
Definition: Items.h:80
PLAYER_SKILL_AIR
@ PLAYER_SKILL_AIR
Definition: Player.h:184
PLAYER_CLASS_LICH
@ PLAYER_CLASS_LICH
Definition: Player.h:251
v1
GLfloat GLfloat v1
Definition: SDL_opengl_glext.h:694
stru262_TurnBased::pQueue
TurnBased_QueueElem pQueue[530]
Definition: TurnEngine.h:82
ITEM_SPELLBOOK_WATER_POISON_SPRAY
@ ITEM_SPELLBOOK_WATER_POISON_SPRAY
Definition: Items.h:142
Engine_::IocContainer::ResolveMouse
static Mouse * ResolveMouse()
Definition: IocContainer.cpp:88
UIAnimation::icon
class Icon * icon
Definition: IconFrameTable.h:71
IndoorLocation::dlv
struct DDM_DLV_Header dlv
Definition: Indoor.h:648
Party::TakeGold
static void TakeGold(int amount)
Definition: Party.cpp:292
Log::Warning
void Warning(const wchar_t *pFormat,...)
Definition: Log.cpp:28
Party::RestAndHeal
void RestAndHeal()
Definition: Party.cpp:793
ui_play_gold_anim
void ui_play_gold_anim()
Definition: Party.cpp:226
ITEM_SPELLBOOK_EARTH_SLOW
@ ITEM_SPELLBOOK_EARTH_SLOW
Definition: Items.h:143
pActors
std::array< Actor, 500 > pActors
Definition: Actor.cpp:38
PLAYER_SKILL_LEATHER
@ PLAYER_SKILL_LEATHER
Definition: Player.h:180
Condition_Zombie
@ Condition_Zombie
Definition: Conditions.h:25
Party.h
PLAYER_SKILL_MACE
@ PLAYER_SKILL_MACE
Definition: Player.h:177
pPlayerFrameTable
struct PlayerFrameTable * pPlayerFrameTable
Definition: mm7_data.cpp:171
Player::GetMaxMana
int GetMaxMana()
Definition: Player.cpp:2369
PickedPlayer2_unused
char PickedPlayer2_unused
Definition: Party.cpp:35
CHARACTER_EXPRESSION_56
@ CHARACTER_EXPRESSION_56
Definition: Player.h:389
PLAYER_SKILL_TRAP_DISARM
@ PLAYER_SKILL_TRAP_DISARM
Definition: Player.h:200
Party::IsPartyGood
bool IsPartyGood()
Definition: Party.cpp:1141
ActionQueue::Next
PartyAction Next()
Definition: Party.cpp:1204
Party::uFlags
unsigned int uFlags
Definition: Party.h:313
Player::uTimeToRecovery
unsigned __int16 uTimeToRecovery
Definition: Player.h:762
PLAYER_SKILL_WATER
@ PLAYER_SKILL_WATER
Definition: Player.h:185
GameTime::GetHoursOfDay
int GetHoursOfDay() const
Definition: Time.h:39
CHARACTER_EXPRESSION_DMGRECVD_MODERATE
@ CHARACTER_EXPRESSION_DMGRECVD_MODERATE
Definition: Player.h:377
DDM_DLV_Header::uReputation
int uReputation
Definition: Indoor.h:96
Player::sMana
int sMana
Definition: Player.h:767
_pUIAnim_Gold
UIAnimation _pUIAnim_Gold
Definition: Party.cpp:41
ITEM_STAFF_1
@ ITEM_STAFF_1
Definition: Items.h:81
Party::uWalkSpeed
unsigned int uWalkSpeed
Definition: Party.h:243
PLAYER_CLASS_SORCERER
@ PLAYER_CLASS_SORCERER
Definition: Player.h:248
LEVEL_Outdoor
@ LEVEL_Outdoor
Definition: Indoor.h:287
DDM_DLV_Header
Definition: Indoor.h:82
Timer::Pause
void Pause()
Definition: Time.cpp:19
NPCData
Definition: NPC.h:79
ActionQueue::ActionQueue
ActionQueue()
Definition: Party.h:122
Player::GetMaxHealth
int GetMaxHealth()
Definition: Player.cpp:2354
pPartyActionQueue
struct ActionQueue * pPartyActionQueue
Definition: Party.cpp:32
PLAYER_CLASS_THEIF
@ PLAYER_CLASS_THEIF
Definition: Player.h:220
PartyAction
PartyAction
Definition: Party.h:94
MonsterInfo::Hostility_Long
@ Hostility_Long
Definition: Monsters.h:115
PLAYER_SKILL_SPEAR
@ PLAYER_SKILL_SPEAR
Definition: Player.h:175
Player::AddItem2
int AddItem2(int uSlot, ItemGen *Src)
Definition: Player.cpp:828
ui_play_food_anim
void ui_play_food_anim()
Definition: Party.cpp:232
Party::GetFood
int GetFood() const
Definition: Party.cpp:272
Removed
@ Removed
Definition: Actor.h:86
Party::CreateDefaultParty
void CreateDefaultParty(bool bDebugGiveItems=false)
Definition: Party.cpp:311
Tracker
@ Tracker
Definition: NPC.h:11
Condition_Poison_Severe
@ Condition_Poison_Severe
Definition: Conditions.h:18
UIAnimation::uAnimTime
int16_t uAnimTime
Definition: IconFrameTable.h:74
Player::pInventoryItemList
ItemGen pInventoryItemList[126]
Definition: Player.h:727
Party::uNumArenaPageWins
char uNumArenaPageWins
Definition: Party.h:294
GameTime::GetWeeksOfMonth
int GetWeeksOfMonth() const
Definition: Time.h:42
TestPartyQuestBit
bool TestPartyQuestBit(PARTY_QUEST_BITS bit)
Definition: Party.cpp:917
pUIAnim_Gold
UIAnimation * pUIAnim_Gold
Definition: Party.cpp:47
pMiscTimer
Timer * pMiscTimer
Definition: Time.cpp:7
PLAYER_SKILL_SHIELD
@ PLAYER_SKILL_SHIELD
Definition: Player.h:179
ITEM_DAGGER_1
@ ITEM_DAGGER_1
Definition: Items.h:76
Explorer
@ Explorer
Definition: NPC.h:49
PLAYER_SKILL_ALCHEMY
@ PLAYER_SKILL_ALCHEMY
Definition: Player.h:206
Outdoor.h
Party::GetPartyReputation
int GetPartyReputation()
Definition: Party.cpp:922
OutdoorLocation::ddm
struct DDM_DLV_Header ddm
Definition: Outdoor.h:131
Condition_Cursed
@ Condition_Cursed
Definition: Conditions.h:8
ActionQueue::Add
void Add(PartyAction action)
Definition: Party.cpp:125
Party::cNonHireFollowers
char cNonHireFollowers
Definition: Party.h:269
Party::pArcomageWins
std::array< unsigned __int8, 16 > pArcomageWins
Definition: Party.h:292
Party::GivePartyExp
void GivePartyExp(unsigned int pEXPNum)
Definition: Party.cpp:938
SPRITE_OBJECT_TYPE
SPRITE_OBJECT_TYPE
Definition: SpriteObject.h:5
Party::pHirelings
std::array< NPCData, 2 > pHirelings
Definition: Party.h:311
Party::uNumGoldInBank
unsigned int uNumGoldInBank
Definition: Party.h:282
AudioPlayer.h
OBJECT_Player
@ OBJECT_Player
Definition: Actor.h:68
ITEM_SPELLBOOK_MIND_MIND_BLAST
@ ITEM_SPELLBOOK_MIND_MIND_BLAST
Definition: Items.h:146
Party::bTurnBasedModeOn
bool bTurnBasedModeOn
Definition: Party.h:305
RestAndHeal
void RestAndHeal(int minutes)
Definition: Party.cpp:872
Summoned
@ Summoned
Definition: Actor.h:92
Party::CountHirelings
void CountHirelings()
Definition: Party.cpp:57
GameTime::GetMonthsOfYear
int GetMonthsOfYear() const
Definition: Time.h:43
Player::conditions_times
std::array< GameTime, 20 > conditions_times
Definition: Player.h:635
Rest
void Rest(unsigned int uMinsToRest)
Definition: Party.cpp:857
Party::HasItem
bool HasItem(unsigned int uItemID)
Definition: Party.cpp:216
PLAYER_SKILL_STEALING
@ PLAYER_SKILL_STEALING
Definition: Player.h:205
Party::pHireling1Name
char pHireling1Name[100]
Definition: Party.h:318
GameTime::AddMinutes
void AddMinutes(int minutes)
Definition: Time.h:45
PARTY_BUFF_INVISIBILITY
@ PARTY_BUFF_INVISIBILITY
Definition: Party.h:82
Party::uCurrentDayOfMonth
unsigned int uCurrentDayOfMonth
Definition: Party.h:274
PLAYER_SKILL_CHAIN
@ PLAYER_SKILL_CHAIN
Definition: Player.h:181
Factor
@ Factor
Definition: NPC.h:36
PickedPlayer4_unused
char PickedPlayer4_unused
Definition: Party.cpp:37
UIAnimation
Definition: IconFrameTable.h:69
CHARACTER_EXPRESSION_DISEASED
@ CHARACTER_EXPRESSION_DISEASED
Definition: Player.h:351
Player::classType
PLAYER_CLASS_TYPE classType
Definition: Player.h:639
ActionQueue::uNumActions
unsigned int uNumActions
Definition: Party.h:128
GetTravelTime
int GetTravelTime()
Definition: Party.cpp:1171
Player::AddItem
bool AddItem(struct ItemGen *pItem)
Party::field_14_radius
int field_14_radius
Definition: Party.h:241
Condition_Weak
@ Condition_Weak
Definition: Conditions.h:9
CHARACTER_EXPRESSION_ERADICATED
@ CHARACTER_EXPRESSION_ERADICATED
Definition: Player.h:396
UIStatusBar.h
PLAYER_SKILL_SWORD
@ PLAYER_SKILL_SWORD
Definition: Player.h:172
Player::GetMajorConditionIdx
unsigned int GetMajorConditionIdx()
Definition: Player.cpp:2614
MONSTER_MOVEMENT_TYPE_STAIONARY
@ MONSTER_MOVEMENT_TYPE_STAIONARY
Definition: Monsters.h:65
v2
GLfloat GLfloat GLfloat v2
Definition: SDL_opengl_glext.h:695
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
CHARACTER_EXPRESSION_18
@ CHARACTER_EXPRESSION_18
Definition: Player.h:360
uint
unsigned int uint
Definition: MM7.h:4
Condition_Poison_Weak
@ Condition_Poison_Weak
Definition: Conditions.h:14
uActiveCharacter
unsigned int uActiveCharacter
Definition: mm7_data.cpp:555
v3
GLfloat GLfloat GLfloat GLfloat v3
Definition: SDL_opengl_glext.h:696
Localization::FormatString
String FormatString(unsigned int index,...) const
Definition: Localization.cpp:17
pUIAnim_Food
UIAnimation * pUIAnim_Food
Definition: Party.cpp:46
CHARACTER_EXPRESSION_57
@ CHARACTER_EXPRESSION_57
Definition: Player.h:390
Party::IsPartyEvil
bool IsPartyEvil()
Definition: Party.cpp:1139
_449B7E_toggle_bit
void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle)
Definition: Party.cpp:1190
__debugbreak
void __cdecl __debugbreak(void)
ITEM_POTION_BOTTLE
@ ITEM_POTION_BOTTLE
Definition: Items.h:120
Actor::AI_Flee
static void AI_Flee(unsigned int uActorID, signed int edx0, int uActionLength, struct AIDirection *a4)
Definition: Actor.cpp:2070
pNPCStats
struct NPCStats * pNPCStats
Definition: NPC.cpp:29
OutdoorLocation::LoadActualSkyFrame
static void LoadActualSkyFrame()
Definition: Outdoor.cpp:2143
PLAYER_SKILL_REPAIR
@ PLAYER_SKILL_REPAIR
Definition: Player.h:194
Pathfinder
@ Pathfinder
Definition: NPC.h:12
CHARACTER_EXPRESSION_15
@ CHARACTER_EXPRESSION_15
Definition: Player.h:357
GameUI_StatusBar_OnEvent
void GameUI_StatusBar_OnEvent(const String &str, unsigned int num_seconds)
Definition: UIStatusBar.cpp:33
Party::SetHoldingItem
void SetHoldingItem(ItemGen *pItem)
Definition: Party.cpp:150
Player::sHealth
int sHealth
Definition: Player.h:766
ITEM_SPEAR_1
@ ITEM_SPEAR_1
Definition: Items.h:78
Player::PlaySound
void PlaySound(PlayerSpeech speech, int a3)
Definition: Player.cpp:7874
PickedPlayer3_unused
char PickedPlayer3_unused
Definition: Party.cpp:36
WINDOW_CharacterWindow_Stats
@ WINDOW_CharacterWindow_Stats
Definition: GUIWindow.h:327
Mouse::SetCursorBitmapFromItemID
void SetCursorBitmapFromItemID(unsigned int uItemID)
Definition: Mouse.cpp:32
Condition_Good
@ Condition_Good
Definition: Conditions.h:26
Condition_Unconcious
@ Condition_Unconcious
Definition: Conditions.h:21
CHARACTER_EXPRESSION_54
@ CHARACTER_EXPRESSION_54
Definition: Player.h:387
Party::walk_sound_timer
int walk_sound_timer
Definition: Party.h:263
ViewingParams::bRedrawGameUI
int bRedrawGameUI
Definition: Viewport.h:74
PartyTimeStruct::_shop_ban_times
std::array< GameTime, 53 > _shop_ban_times
Definition: Party.h:144
CHARACTER_EXPRESSION_1
@ CHARACTER_EXPRESSION_1
Definition: Player.h:343
Duper
@ Duper
Definition: NPC.h:56
ActionQueue
Definition: Party.h:121
Party::_autonote_bits
unsigned char _autonote_bits[26]
Definition: Party.h:300
Party::uNumFoodRations
unsigned int uNumFoodRations
Definition: Party.h:278
uCurrentlyLoadedLevelType
LEVEL_TYPE uCurrentlyLoadedLevelType
Definition: Indoor.cpp:52
Party::GetFirstCanAct
int GetFirstCanAct()
Definition: Party.cpp:156
Party::uNumDeaths
unsigned int uNumDeaths
Definition: Party.h:283
PLAYER_SKILL_BODY
@ PLAYER_SKILL_BODY
Definition: Player.h:189
IndoorLocation::GetSector
int GetSector(int sX, int sY, int sZ)
Definition: Indoor.cpp:1279
pUIAnim_WizardEye
UIAnimation * pUIAnim_WizardEye
Definition: Party.cpp:49
CheckHiredNPCSpeciality
bool CheckHiredNPCSpeciality(unsigned int uProfession)
Definition: NPC.cpp:754
PlayerFrame::uAnimLength
__int16 uAnimLength
Definition: PlayerFrameTable.h:11
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
Condition_Disease_Severe
@ Condition_Disease_Severe
Definition: Conditions.h:19
v0
GLfloat v0
Definition: SDL_opengl_glext.h:693
CHARACTER_EXPRESSION_POISONED
@ CHARACTER_EXPRESSION_POISONED
Definition: Player.h:350
Condition_Eradicated
@ Condition_Eradicated
Definition: Conditions.h:24
GUIWindow.h
ItemGen
Definition: Items.h:263
ITEM_LICH_JAR_FULL
@ ITEM_LICH_JAR_FULL
Definition: Items.h:206
ObjectList.h
pMessageQueue_50CBD0
struct GUIMessageQueue * pMessageQueue_50CBD0
Definition: GUIWindow.cpp:86
logger
Log * logger
Definition: IocContainer.cpp:47
PLAYER_SKILL_ARMSMASTER
@ PLAYER_SKILL_ARMSMASTER
Definition: Player.h:204
Condition_Pertified
@ Condition_Pertified
Definition: Conditions.h:23
Party::uFlags2
int uFlags2
Definition: Party.h:307
Condition_Drunk
@ Condition_Drunk
Definition: Conditions.h:12
PLAYER_CLASS_KNIGHT
@ PLAYER_CLASS_KNIGHT
Definition: Player.h:216
pOutdoor
OutdoorLocation * pOutdoor
Definition: Outdoor.cpp:48
ITEM_CHAINMAIL_1
@ ITEM_CHAINMAIL_1
Definition: Items.h:85
ITEM_SPELLBOOK_SPIRIT_BLESS
@ ITEM_SPELLBOOK_SPIRIT_BLESS
Definition: Items.h:144
NPCStats::pGroups
uint16_t pGroups[51]
Definition: NPC.h:176
Party::uCurrentYear
unsigned int uCurrentYear
Definition: Party.h:271
Party::AddGold
static void AddGold(int amount)
Definition: Party.cpp:287
CHARACTER_EXPRESSION_20
@ CHARACTER_EXPRESSION_20
Definition: Player.h:362
Party::sRotationY
int sRotationY
Definition: Party.h:251
stru262_TurnBased::turn_stage
int turn_stage
Definition: TurnEngine.h:75
String
std::string String
Definition: Strings.h:10
CHARACTER_EXPRESSION_DRUNK
@ CHARACTER_EXPRESSION_DRUNK
Definition: Player.h:348
CHARACTER_EXPRESSION_FEAR
@ CHARACTER_EXPRESSION_FEAR
Definition: Player.h:347
pEventTimer
Timer * pEventTimer
Definition: Time.cpp:8
GameTime
Definition: Time.h:14
Party::monster_for_hunting_killed
std::array< __int16, 5 > monster_for_hunting_killed
Definition: Party.h:289
Player::pPlayerBuffs
std::array< SpellBuff, 24 > pPlayerBuffs
Definition: Player.h:756
Party::GetGold
int GetGold() const
Definition: Party.cpp:264
ITEM_BUCKLER_1
@ ITEM_BUCKLER_1
Definition: Items.h:87
Actor::InitializeActors
static void InitializeActors()
Definition: Actor.cpp:3334
Mouse::RemoveHoldingItem
void RemoveHoldingItem()
Definition: Mouse.cpp:25
Party::uNumArenaKnightWins
char uNumArenaKnightWins
Definition: Party.h:296
pObjectList
struct ObjectList * pObjectList
Definition: ObjectList.cpp:5
Guide
@ Guide
Definition: NPC.h:10
Party::monster_id_for_hunting
std::array< __int16, 5 > monster_id_for_hunting
Definition: Party.h:288
ItemsTable::pItems
NZIArray< ItemDesc, 800 > pItems
Definition: Items.h:460
Party::SetGold
static void SetGold(int amount)
Definition: Party.cpp:281
Mouse.h
Condition_Disease_Medium
@ Condition_Disease_Medium
Definition: Conditions.h:17
ITEM_AXE_1
@ ITEM_AXE_1
Definition: Items.h:77
Party::playing_time
GameTime playing_time
Definition: Party.h:247
Party::alignment
PartyAlignment alignment
Definition: Party.h:308
Party::GiveFood
static void GiveFood(int amount)
Definition: Party.cpp:255
Time.h
Condition_Sleep
@ Condition_Sleep
Definition: Conditions.h:10
PLAYER_SKILL_PLATE
@ PLAYER_SKILL_PLATE
Definition: Player.h:182