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

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

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

using EngineIoc = Engine_::IocContainer
 

Функции

void ui_play_gold_anim ()
 
void ui_play_food_anim ()
 
void Rest (unsigned int uMinsToRest)
 
void RestAndHeal (int minutes)
 
bool TestPartyQuestBit (PARTY_QUEST_BITS bit)
 
int GetTravelTime ()
 
bool _449B57_test_bit (unsigned __int8 *a1, __int16 a2)
 
void _449B7E_toggle_bit (unsigned char *pArray, __int16 a2, unsigned __int16 bToggle)
 

Переменные

static Mousemouse = EngineIoc::ResolveMouse()
 
PartypParty = nullptr
 
struct ActionQueuepPartyActionQueue = new ActionQueue
 
std::array< bool, 4 > playerAlreadyPicked
 
char PickedPlayer2_unused
 
char PickedPlayer3_unused
 
char PickedPlayer4_unused
 
struct {
   UIAnimation   _pUIAnim_Food
 
   UIAnimation   _pUIAnim_Gold
 
   UIAnimation   _pUIAnum_Torchlight
 
   UIAnimation   _pUIAnim_WizardEye
 
_uianim
 
UIAnimationpUIAnim_Food = &_uianim._pUIAnim_Food
 
UIAnimationpUIAnim_Gold = &_uianim._pUIAnim_Gold
 
UIAnimationpUIAnum_Torchlight = &_uianim._pUIAnum_Torchlight
 
UIAnimationpUIAnim_WizardEye = &_uianim._pUIAnim_WizardEye
 
std::array< class UIAnimation *, 4 > pUIAnims
 

Типы

◆ EngineIoc

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

Функции

◆ ui_play_gold_anim()

void ui_play_gold_anim ( )

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

226  {
227  pUIAnim_Gold->uAnimTime = 0;
229  pAudioPlayer->PlaySound(SOUND_gold01, 0, 0, -1, 0, 0);
230 }

Перекрестные ссылки Icon::GetAnimLength(), UIAnimation::icon, pAudioPlayer, AudioPlayer::PlaySound(), pUIAnim_Gold, SOUND_gold01, UIAnimation::uAnimLength и UIAnimation::uAnimTime.

Используется в Party::SetGold() и Party::TakeGold().

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

◆ ui_play_food_anim()

void ui_play_food_anim ( )

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

232  {
233  pUIAnim_Food->uAnimTime = 0;
235  // pAudioPlayer->PlaySound(SOUND_eat, 0, 0, -1, 0, 0);
236 }

Перекрестные ссылки Icon::GetAnimLength(), UIAnimation::icon, pUIAnim_Food, UIAnimation::uAnimLength и UIAnimation::uAnimTime.

Используется в Party::GiveFood(), Party::SetFood() и Party::TakeFood().

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

◆ Rest()

void Rest ( unsigned int  uMinsToRest)

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

857  { // 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 }

Перекрестные ссылки _494035_timed_effects__water_walking_damage__etc(), Party::GetPlayingTime(), Actor::InitializeActors(), pParty и pPlayers.

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

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

◆ RestAndHeal()

void RestAndHeal ( int  minutes)

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

872  {
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 }

Перекрестные ссылки GameTime::AddMinutes(), game_starting_year, GameTime::GetDaysOfMonth(), GameTime::GetHoursOfDay(), GameTime::GetMinutesFraction(), GameTime::GetMonthsOfYear(), Party::GetPlayingTime(), GameTime::GetSecondsFraction(), GameTime::GetWeeksOfMonth(), GameTime::GetYears(), Party::pHirelings, pParty, Party::pPlayers, Party::RestAndHeal(), Party::uCurrentDayOfMonth, Party::uCurrentHour, Party::uCurrentMinute, Party::uCurrentMonth, Party::uCurrentMonthWeek, Party::uCurrentTimeSecond, Party::uCurrentYear и Party::UpdatePlayersAndHirelingsEmotions().

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

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

◆ TestPartyQuestBit()

bool TestPartyQuestBit ( PARTY_QUEST_BITS  bit)

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

917  {
918  return _449B57_test_bit(pParty->_quest_bits, bit);
919 }

Перекрестные ссылки _449B57_test_bit(), Party::_quest_bits и pParty.

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

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

◆ GetTravelTime()

int GetTravelTime ( )

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

1171  {
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 }

Перекрестные ссылки CheckHiredNPCSpeciality(), Explorer, Guide, Pathfinder, Tracker и uDefaultTravelTime_ByFoot.

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

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

◆ _449B57_test_bit()

bool _449B57_test_bit ( unsigned __int8 *  a1,
__int16  a2 
)

◆ _449B7E_toggle_bit()

void _449B7E_toggle_bit ( unsigned char *  pArray,
__int16  a2,
unsigned __int16  bToggle 
)

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

1191  {
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 }

Используется в Player::AddVariable(), Actor::ApplyFineForKillingPeasant(), GameResultsApply(), ItemInteraction(), Application::Game::Loop(), PartyCreationUI_Loop(), Player::SetVariable(), sub_4B1447_party_fine() и Player::SubtractVariable().

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

Переменные

◆ mouse

Mouse* mouse = EngineIoc::ResolveMouse()
static

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

Используется в Party::SetHoldingItem() и Party::sub_421B2C_PlaceInInventory_or_DropPickedItem().

◆ pParty

Party* pParty = nullptr

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

Используется в stru262_TurnBased::_406457(), GUIWindow::_41D73D_draw_buff_tooltip(), Actor::_427102_IsOkToCastSpell(), _42777D_CastSpell_UseWand_ShootArrow(), CastSpellInfoHelpers::_427E01_cast_spell(), Player::_42ECB5_PlayerAttacksActor(), ItemGen::_439DF3_get_additional_damage(), _45063B_spawn_some_monster(), Engine::_461103_load_level_sub(), SpriteObject::_46BEF1_apply_spells_aoe(), _46BFFA_update_spell_fx(), _46EF01_collision_chech_player(), NPCStats::_476C60_on_load_game(), _493938_regenerate(), _494035_timed_effects__water_walking_damage__etc(), _4B254D_SkillMasteryTeacher(), Actor::_SelectTarget(), _set_3d_modelview_matrix(), ActorInteraction(), Party::AddGold(), Player::AddVariable(), Actor::AI_MeleeAttack(), Actor::AI_MissileAttack1(), Actor::AI_MissileAttack2(), Actor::AI_Pursue1(), Actor::AI_Pursue2(), Actor::AI_Pursue3(), Actor::AI_SpellAttack(), Actor::AI_SpellAttack1(), Actor::AI_SpellAttack2(), stru262_TurnBased::AITurnBasedAction(), AlchemyMagicShopWares(), Actor::ApplyFineForKillingPeasant(), stru262_TurnBased::ApplyPlayerAction(), area_of_effect__damage_evaluate(), Arena_SelectionFightLevel(), ArenaFight(), ArmorShopWares(), BackToHouseMenu(), BankDialog(), BLV_ProcessPartyActions(), BookUI_Spellbook_DrawCurrentSchoolBackground(), BuildDialogueString(), stru10::CalcFaceBounding(), Player::CanEquip_RaceAndAlignmentCheck(), ViewingParams::CenterOnPartyZoomIn(), ViewingParams::CenterOnPartyZoomOut(), GUIWindow_CharacterRecord::CharacterUI_AwardsTab_Draw(), CharacterUI_GetSkillDescText(), CharacterUI_LoadPaperdollTextures(), GUIWindow_CharacterRecord::CharacterUI_SkillsTab_CreateButtons(), CharacterUI_StatsTab_ShowHint(), check_event_triggers(), CheckActors_proximity(), CheckHiredNPCSpeciality(), Player::CleanupBeacons(), ClickNPCTopic(), Player::CompareVariable(), ContractSelectText(), Party::CreateDefaultParty(), CreateParty_EventLoop(), Actor::DamageMonsterFromParty(), DamagePlayerFromMonster(), Actor::Die(), OutdoorLocation::DoGetTile(), DoPrepareWorld(), DoSavegame(), OutdoorLocation::Draw(), Engine::Draw(), IndoorLocation::Draw(), DrawBook_Map_sub(), Engine::DrawGUI(), RenderOpenGL::DrawOutdoorSkyPolygon(), OtherOverlayList::DrawTurnBasedIcon(), Engine::DropHeldItem(), EnterHouse(), Player::EquipBody(), EventCastSpell(), Application::Menu::EventLoop(), Application::Game::EventLoop(), EventProcessor(), OutdoorLocation::ExecDraw(), SpriteObject::ExplosionTraps(), Game_StartHirelingDialogue(), Application::Game::GameLoop(), GameResultsApply(), GameUI_CharacterQuickRecord_Draw(), GameUI_DrawFoodAndGold(), GameUI_DrawHiredNPCs(), GameUI_DrawItemInfo(), GameUI_DrawLifeManaBars(), GameUI_DrawMinimap(), GameUI_DrawNPCPopup(), GameUI_DrawPartySpells(), GameUI_DrawPortraits(), GameUI_DrawRightPanelItems(), GameUI_DrawTorchlightAndWizardEye(), GameUI_GetMinimapHintText(), GameUI_InitializeDialogue(), GameUI_LoadPlayerPortraintsAndVoices(), GameUI_OnPlayerPortraitLeftClick(), GameUI_WritePointedObjectStatusString(), ItemGen::GenerateArtifact(), ItemsTable::GenerateItem(), GenerateSpecialShopItems(), GenerateStandartShopItems(), GetActorTintColor(), Player::GetAttackRecoveryTime(), Player::GetBaseAge(), Player::GetConditionDaysPassed(), GetDayPart(), Actor::GetDirectionInfo(), OutdoorLocation::GetFogDensityByTime(), GetGreetType(), GetHouseGoodbyeSpeech(), Player::GetMagicalBonus(), Player::GetMerchant(), GetNewNPCData(), Party::GetNextActiveCharacter(), GetNPCData(), OutdoorLocation::GetNumFoodRequiredToRestInCurrentPos(), OutdoorLocation::GetTravelDestination(), Party::GiveFood(), Party::GivePartyExp(), Chest::GrabItem(), GuildDialog(), GUIWindow_LloydsBook::GUIWindow_LloydsBook(), GUIWindow_MapBook::GUIWindow_MapBook(), GUIWindow_Transition::GUIWindow_Transition(), GUIWindow_Travel::GUIWindow_Travel(), Party::HasItem(), Player::HasItem(), InitializaDialogueOptions(), InitializaDialogueOptions_Tavern(), GUIProgressBar::Initialize(), Actor::InitializeActors(), Render::InitializeFullscreen(), Inventory_ItemPopupAndAlchemy(), IsDwarfPresentInParty(), LevelDecoration::IsObeliskChestActive(), ConditionProcessor::IsPlayerAffected(), IsTravelAvailable(), ItemInteraction(), OutdoorLocation::Load(), OutdoorLocation::LoadActualSkyFrame(), LoadGame(), Application::Game::Loop(), Actor::LootActor(), Actor::MakeActorAIList_BLV(), Actor::MakeActorAIList_ODM(), Engine::MM7_Initialize(), MM7Initialization(), MonsterPopup_Draw(), stru262_TurnBased::NextTurn(), NPC_EventProcessor(), ODM_LoadAndInitialize(), ODM_ProcessPartyActions(), ODM_UpdateUserInputAndOther(), Chest::OnChestLeftClick(), Application::Game::OnEscape(), Engine::OnGameViewportClick(), SpriteObject::OnInteraction(), Player::OnInventoryLeftClick(), OnMapLoad(), WinApiWindow::OnOSMenu(), OnPaperdollLeftClick(), OnSelectNPCDialogueOption(), OnSelectShopDialogueOption(), OnTimer(), Chest::Open(), OracleDialogue(), PartyCreationUI_Loop(), PartyCreationUI_LoopInternal(), PlayerCreation_Choose4Skills(), PlayerCreation_GetUnspentAttributePointCount(), AudioPlayer::PlaySound(), IndoorLocation::PrepareActorRenderList_BLV(), OutdoorLocation::PrepareActorsDrawList(), IndoorLocation::PrepareDecorationsRenderList_BLV(), RenderOpenGL::PrepareDecorationsRenderList_ODM(), Render::PrepareDecorationsRenderList_ODM(), PrepareDrawLists_BLV(), PrepareHouse(), PrepareToLoadBLV(), PrepareToLoadRestUI(), PrepareWorld(), Keyboard::ProcessInputActions(), Mouse::ReadCursorWithItem(), Player::Recover(), GUIWindow_House::Release(), Mouse::RemoveHoldingItem(), Engine::ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows(), Rest(), Party::RestAndHeal(), RestAndHeal(), SaveGame(), SaveNewGame(), Player::SetBeacon(), Player::SetCondition(), SetDecorationSprite(), Party::SetFood(), Party::SetGold(), Player::SetRecoveryTime(), Player::SetVariable(), ShowPopupShopItem(), stru262_TurnBased::SortTurnQueue(), SpawnActor(), SpellBookGenerator(), stru262_TurnBased::Start(), Actor::StealFrom(), Player::StealFromActor(), sub_4070EF_prolly_detect_player(), Party::sub_421B2C_PlaceInInventory_or_DropPickedItem(), sub_4451A8_press_any_key(), sub_4465DF_check_season(), sub_44861E_set_texture(), sub_44892E_set_faces_bit(), sub_44FA4C_spawn_light_elemental(), sub_47C3D7_get_fog_specular(), sub_4B1447_party_fine(), sub_4B6478(), Player::SubtractVariable(), Party::TakeFood(), Party::TakeGold(), TavernDialog(), TeleportToStartingPoint(), TempleDialog(), TestPartyQuestBit(), IndoorLocation::ToggleLight(), TownHallDialog(), TrainingDialog(), TravelByTransport(), Mouse::UI_OnMouseLeftClick(), UI_OnMouseRightClick(), UIShop_Buy_Identify_Repair(), GUIWindow_JournalBook::Update(), GUIWindow_QuickReference::Update(), GUIWindow_LloydsBook::Update(), GUIWindow_CalendarBook::Update(), GUIWindow_AutonotesBook::Update(), GUIWindow_TownPortalBook::Update(), GUIWindow_MapBook::Update(), GUIWindow_Dialogue::Update(), GUIWindow_Rest::Update(), GUIWindow_Travel::Update(), GUIWindow_PartyCreation::Update(), GUIWindow_DebugMenu::Update(), GUIWindow_House::Update(), Actor::UpdateActorAI(), UpdateActors_BLV(), UpdateActors_ODM(), UpdateObjects(), Party::UpdatePlayersAndHirelingsEmotions(), AudioPlayer::UpdateSounds(), OutdoorLocation::UpdateSunlightVectors(), Player::UseItem_DrinkPotion_etc(), UseNPCSkill(), WeaponShopWares() и Party::Yell().

◆ pPartyActionQueue

struct ActionQueue* pPartyActionQueue = new ActionQueue

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

Используется в BLV_ProcessPartyActions(), Application::Game::GameLoop(), ODM_ProcessPartyActions() и Keyboard::ProcessInputActions().

◆ playerAlreadyPicked

std::array<bool, 4> playerAlreadyPicked

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

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

◆ PickedPlayer2_unused

char PickedPlayer2_unused

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

◆ PickedPlayer3_unused

char PickedPlayer3_unused

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

◆ PickedPlayer4_unused

char PickedPlayer4_unused

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

◆ _pUIAnim_Food

UIAnimation _pUIAnim_Food

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

◆ _pUIAnim_Gold

UIAnimation _pUIAnim_Gold

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

◆ _pUIAnum_Torchlight

UIAnimation _pUIAnum_Torchlight

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

◆ _pUIAnim_WizardEye

UIAnimation _pUIAnim_WizardEye

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

◆ _uianim

struct { ... } _uianim

◆ pUIAnim_Food

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

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

◆ pUIAnim_Gold

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

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

◆ pUIAnum_Torchlight

UIAnimation* pUIAnum_Torchlight = &_uianim._pUIAnum_Torchlight

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

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

◆ pUIAnim_WizardEye

UIAnimation* pUIAnim_WizardEye = &_uianim._pUIAnim_WizardEye

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

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

◆ pUIAnims

std::array<class UIAnimation *, 4> pUIAnims
Инициализатор
=
{&_uianim._pUIAnim_Food, &_uianim._pUIAnim_Gold,
&_uianim._pUIAnum_Torchlight, &_uianim._pUIAnim_WizardEye}

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

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

Party::uCurrentTimeSecond
unsigned int uCurrentTimeSecond
Definition: Party.h:277
Party::uCurrentMonth
unsigned int uCurrentMonth
Definition: Party.h:272
Party::GetPlayingTime
GameTime & GetPlayingTime()
Definition: Party.h:230
Party::uCurrentMinute
unsigned int uCurrentMinute
Definition: Party.h:276
SOUND_gold01
@ SOUND_gold01
Definition: AudioPlayer.h:72
_449B57_test_bit
bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2)
Definition: Party.cpp:1185
uDefaultTravelTime_ByFoot
int uDefaultTravelTime_ByFoot
Definition: mm7_data.cpp:696
AudioPlayer::PlaySound
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
Definition: AudioPlayer.cpp:195
Icon::GetAnimLength
unsigned int GetAnimLength() const
Definition: IconFrameTable.h:20
GameTime::GetDaysOfMonth
int GetDaysOfMonth() const
Definition: Time.h:41
game_starting_year
int game_starting_year
Definition: mm7_data.cpp:193
Party::_quest_bits
unsigned __int8 _quest_bits[64]
Definition: Party.h:291
Party::uCurrentHour
unsigned int uCurrentHour
Definition: Party.h:275
Party::pPlayers
std::array< Player, 4 > pPlayers
Definition: Party.h:310
Party::UpdatePlayersAndHirelingsEmotions
void UpdatePlayersAndHirelingsEmotions()
Definition: Party.cpp:657
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
GameTime::GetYears
int GetYears() const
Definition: Time.h:35
pPlayers
NZIArray< struct Player *, 5 > pPlayers
Definition: Player.cpp:46
_uianim
struct @45 _uianim
GameTime::GetMinutesFraction
int GetMinutesFraction() const
Definition: Time.h:38
GameTime::GetSecondsFraction
int GetSecondsFraction() const
Definition: Time.h:37
pParty
Party * pParty
Definition: Party.cpp:30
UIAnimation::uAnimLength
int16_t uAnimLength
Definition: IconFrameTable.h:75
UIAnimation::icon
class Icon * icon
Definition: IconFrameTable.h:71
Party::RestAndHeal
void RestAndHeal()
Definition: Party.cpp:793
GameTime::GetHoursOfDay
int GetHoursOfDay() const
Definition: Time.h:39
Tracker
@ Tracker
Definition: NPC.h:11
UIAnimation::uAnimTime
int16_t uAnimTime
Definition: IconFrameTable.h:74
GameTime::GetWeeksOfMonth
int GetWeeksOfMonth() const
Definition: Time.h:42
pUIAnim_Gold
UIAnimation * pUIAnim_Gold
Definition: Party.cpp:47
Explorer
@ Explorer
Definition: NPC.h:49
Party::pHirelings
std::array< NPCData, 2 > pHirelings
Definition: Party.h:311
GameTime::GetMonthsOfYear
int GetMonthsOfYear() const
Definition: Time.h:43
GameTime::AddMinutes
void AddMinutes(int minutes)
Definition: Time.h:45
Party::uCurrentDayOfMonth
unsigned int uCurrentDayOfMonth
Definition: Party.h:274
v3
GLfloat GLfloat GLfloat GLfloat v3
Definition: SDL_opengl_glext.h:696
pUIAnim_Food
UIAnimation * pUIAnim_Food
Definition: Party.cpp:46
Pathfinder
@ Pathfinder
Definition: NPC.h:12
CheckHiredNPCSpeciality
bool CheckHiredNPCSpeciality(unsigned int uProfession)
Definition: NPC.cpp:754
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
Party::uCurrentYear
unsigned int uCurrentYear
Definition: Party.h:271
GameTime
Definition: Time.h:14
Actor::InitializeActors
static void InitializeActors()
Definition: Actor.cpp:3334
Guide
@ Guide
Definition: NPC.h:10