World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Game.cpp
См. документацию.
1 #include "src/Application/Game.h"
2 
3 #include <algorithm>
4 #include <string>
5 
8 
9 #include "Engine/AssetsManager.h"
10 #include "Engine/Engine.h"
11 #include "Engine/EngineFactory.h"
12 #include "Engine/Localization.h"
13 #include "Engine/Time.h"
14 
15 #include "Engine/Events.h"
16 #include "Engine/LOD.h"
17 #include "Engine/Party.h"
18 #include "Engine/SaveLoad.h"
19 
20 #include "Engine/Objects/Actor.h"
21 #include "Engine/Objects/Chest.h"
24 
33 #include "Engine/Graphics/Vis.h"
34 
36 
38 
40 
41 #include "IO/Keyboard.h"
42 #include "IO/Mouse.h"
43 
44 #include "Arcomage/Arcomage.h"
45 
47 #include "Media/MediaPlayer.h"
48 
49 #include "GUI/GUIButton.h"
50 #include "GUI/GUIProgressBar.h"
51 #include "GUI/GUIWindow.h"
56 #include "GUI/UI/Books/MapBook.h"
57 #include "GUI/UI/Books/QuestBook.h"
59 #include "GUI/UI/Spellbook.h"
60 #include "GUI/UI/UIBooks.h"
61 #include "GUI/UI/UICharacter.h"
62 #include "GUI/UI/UICredits.h"
63 #include "GUI/UI/UIDialogue.h"
64 #include "GUI/UI/UIGame.h"
65 #include "GUI/UI/UIHouses.h"
66 #include "GUI/UI/UIMainMenu.h"
67 #include "GUI/UI/UIModal.h"
68 #include "GUI/UI/UIPartyCreation.h"
70 #include "GUI/UI/UIRest.h"
71 #include "GUI/UI/UISaveLoad.h"
72 #include "GUI/UI/UIShops.h"
73 #include "GUI/UI/UIStatusBar.h"
74 
76 void IntegrityTest();
77 
79 using Application::Game;
82 
83 int MM_Main(const char *pCmdLine) {
84  GameFactory gameFactory;
85 
86  auto game = gameFactory.CreateGame(std::string(pCmdLine));
87  game->Run();
88 
89  return 0;
90 }
91 
92 bool Game::Configure(std::shared_ptr<const Configuration> config) {
93  this->config = config;
94 
95  return true;
96 }
97 
98 
99 
100 void Game::Run() {
101  IntegrityTest();
102 
103  EngineFactory engineFactory;
104  engine = engineFactory.CreateEngine(config->command_line);
105  ::engine = engine;
106 
107  engine->Initialize();
108 
109  window->Activate();
110 
112 
113  dword_6BE364_game_settings_1 |= GAME_SETTINGS_4000;
114 
115  // logger->Warning(L"MM: entering main loop");
116  while (true) {
119 
120  if (!Loop()) {
121  break;
122  }
123  }
124 
125  if (engine) {
126  engine->Deinitialize();
127  engine = nullptr;
128  ::engine = nullptr;
129  }
130 }
131 
132 
133 
134 bool Game::Loop() {
135  while (1) {
136  if (uGameState == GAME_FINISHED ||
138  engine->Deinitialize();
139  return false;
140  } else if (GetCurrentMenuID() == MENU_SAVELOAD) {
144  GameLoop();
145  }
146  break;
147  } else if (GetCurrentMenuID() == MENU_NEWGAME) {
149  if (!PartyCreationUI_Loop()) {
150  break;
151  }
152 
154 
156  bFlashQuestBook = true;
157  pMediaPlayer->PlayFullscreenMovie("Intro Post");
158  SaveNewGame();
159  if (engine->config->NoMargareth())
161  GameLoop();
165  continue;
167  break;
168  }
169  assert(false && "Invalid game state");
170  } else if (GetCurrentMenuID() == MENU_CREDITS) {
173  break;
174  } else if (GetCurrentMenuID() == MENU_5 ||
177  GameLoop();
178  } else if (GetCurrentMenuID() == MENU_DebugBLVLevel) {
180  pParty->Reset();
181  pParty->CreateDefaultParty(true);
182 
183  __debugbreak();
184  /*extern void CreateDefaultBLVLevel();
185  CreateDefaultBLVLevel();
186 
187  OPENFILENAMEA ofn;
188  if ( !GetOpenFileNameA((LPOPENFILENAMEA)&ofn) )
189  {
190  pMouse->ChangeActivation(1);
191  break;
192  }
193  _chdir("..\\");
194  strcpy(pCurrentMapName, ofn.lpstrFileTitle);*/
196  GameLoop();
197  }
201  continue;
202  }
206  continue;
207  }
208  if (uGameState ==
209  GAME_STATE_GAME_QUITTING_TO_MAIN_MENU) { // from the loaded game
210  pAudioPlayer->StopChannels(-1, -1);
212  break;
213  }
214  }
215 
216  return true;
217 }
218 
219 
220 
222  bGameoverLoop = true;
223 
224  render->PresentBlackScreen();
225  if (!engine->config->NoVideo()) {
226  if (!engine->config->no_logo) {
227  pMediaPlayer->PlayFullscreenMovie("3dologo");
228  pMediaPlayer->PlayFullscreenMovie("new world logo");
230  }
231  if (!engine->config->no_intro) {
233  }
234  }
235 
236  bGameoverLoop = false;
237 }
238 
239 
240 
241 
242 Image *gamma_preview_image = nullptr; // 506E40
243 
244 void Game_StartDialogue(unsigned int actor_id) {
245  if (uActiveCharacter) {
246  viewparams->field_48 = 1;
247 
249 
250  dword_5B65D0_dialogue_actor_npc_id = pActors[actor_id].sNPC_ID;
251  GameUI_InitializeDialogue(&pActors[actor_id], true);
252  }
253 }
254 
255 void Game_StartHirelingDialogue(unsigned int hireling_id) {
257 
259 
260  uint hireling_slot = 0;
261  char buf[1024];
262  for (uint i = 0; i < 2; ++i) {
263  if (pParty->pHirelings[i].pName) buf[hireling_slot++] = i;
264  }
265 
266  for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i) {
267  NPCData *npc = &pNPCStats->pNewNPCData[i];
268  if (npc->Hired() &&
269  (!pParty->pHirelings[0].pName ||
270  strcmp(npc->pName, pParty->pHirelings[0].pName)) &&
271  (!pParty->pHirelings[1].pName ||
272  strcmp(npc->pName, pParty->pHirelings[1].pName))) {
273  buf[hireling_slot++] = i + 2;
274  }
275  }
276 
277  if ((signed int)hireling_id + (signed int)pParty->hirelingScrollPosition < hireling_slot) {
278  Actor actor;
279  memset(&actor, 0, sizeof(actor));
280  actor.sNPC_ID += -1 - pParty->hirelingScrollPosition - hireling_id;
281  GameUI_InitializeDialogue(&actor, true);
282  }
283 }
284 
288  mouse->SetCursorImage("MICON2");
289  } else {
290  pGUIWindow_CastTargetedSpell->Release(); // test to fix enchanting issue
291  pGUIWindow_CastTargetedSpell = nullptr; // test to fix enchanting issue
292  mouse->SetCursorImage("MICON1");
295  back_to_game();
296  }
297  }
298 }
299 
302 
303  // if ((signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4)
304 
306  pParty->GetNextActiveCharacter(); // always check this - could leave
307  // shops with characters who couldnt
308  // act sctive
309 
311  window_SpeakInHouse = nullptr;
312  }
313  if (pGUIWindow_CurrentMenu != nullptr) {
314  pGUIWindow_CurrentMenu->Release(); // check this
315  pGUIWindow_CurrentMenu = nullptr;
316  }
317  pEventTimer->Resume();
319  viewparams->bRedrawGameUI = true;
320 }
321 
323  unsigned int v2; // edx@7
324  GUIWindow *pWindow2; // ecx@248
325  int v37; // eax@341
326  int v38; // eax@358
327  char *v41; // eax@380
328  int v42; // eax@396
329  signed int v44; // eax@398
330  int v45; // edx@398
331  signed int v46; // ecx@398
332  char v47; // zf@399
333  char v48; // zf@405
334  BLVFace *pBLVFace; // ecx@410
335  ODMFace *pODMFace; // ecx@412
336  CastSpellInfo *pSpellInfo; // ecx@415
337  __int16 v53; // ax@431
338  int v54; // eax@432
339  int v55; // ecx@432
340  int v56; // edx@432
341  int v57; // eax@432
342  Player *pPlayer; // edx@442
343  unsigned int pMapNum; // eax@445
344  signed int v60; // ST64_4@459
345  __int16 v63; // dx@479
346  unsigned int v64; // eax@486
347  int v65; // ecx@486
348  int v66; // eax@488
349  // char *v67; // eax@489
350  __int16 v68; // dx@498
351  // int v70; // eax@525
352  // int v71; // edi@527
353  // NPCData *pNPCData3; // esi@527
354  // char *v73; // ecx@533
355  // signed int v74; // edi@535
356  // int v75; // eax@535
357  // int v76; // esi@535
358  // int v77; // eax@537
359  Player *pPlayer2; // ecx@549
360  // signed int v81; // eax@552
361  signed int v83; // ecx@554
362  signed int v84; // ecx@554
363  GUIButton *pButton; // eax@578
364  unsigned int v86; // eax@583
365  const char *v87; // ecx@595
366  const char *v88; // ecx@596
367  unsigned int v90; // eax@602
368  int v91; // edx@605
369  int v92; // eax@605
370  int v93; // edx@605
371  int pPlayerNum; // edx@611
372  int v95; // eax@611
373  unsigned int v97; // eax@624
374  int v98; // eax@636
375  int v103; // eax@671
376  Player *pPlayer4; // ecx@718
377  int v105; // eax@718
378  Player *pPlayer5; // ST78_4@758
379  // unsigned int v115; // eax@764
380  unsigned int v118; // eax@785
381  unsigned int v119; // ecx@786
382  // unsigned int v121; // [sp-28h] [bp-624h]@711
383  // unsigned int v123; // [sp-24h] [bp-620h]@711
384  // unsigned int v125; // [sp-20h] [bp-61Ch]@711
385  int v127; // [sp-1Ch] [bp-618h]@107
386  // unsigned int v128; // [sp-1Ch] [bp-618h]@711
387  GUIButton
388  *pButton2; // [sp-4h] [bp-600h]@59
389  // KeyToggleType pKeyToggleType; // [sp+0h] [bp-5FCh]@287
390  Player *pPlayer7; // [sp+14h] [bp-5E8h]@373
391  Player *pPlayer8; // [sp+14h] [bp-5E8h]@377
392  Player *pPlayer9; // [sp+14h] [bp-5E8h]@455
393  // int thisg; // [sp+14h] [bp-5E8h]@467
394  // int thish; // [sp+14h] [bp-5E8h]@528
395  // signed int thisi; // [sp+14h] [bp-5E8h]@535
396  MapInfo *pMapInfo; // [sp+14h] [bp-5E8h]@604
397  Player *pPlayer10; // [sp+14h] [bp-5E8h]@641
398  int uMessageParam; // [sp+18h] [bp-5E4h]@7
399  int uAction; // [sp+1Ch] [bp-5E0h]@18
400  NPCData *pNPCData4; // [sp+20h] [bp-5DCh]@23
401  unsigned int uNumSeconds; // [sp+24h] [bp-5D8h]@18
402  // char v197; // [sp+2Bh] [bp-5D1h]@101
403  enum UIMessageType uMessage; // [sp+2Ch] [bp-5D0h]@7
404  unsigned int v199; // [sp+30h] [bp-5CCh]@7
405  char *v200 = nullptr; // [sp+34h] [bp-5C8h]@518
406  // int v213; // [sp+98h] [bp-564h]@385
407  char pOut[32]; // [sp+BCh] [bp-540h]@370
408  int v217[9]; // [sp+158h] [bp-4A4h]@652
409  // char Str2[128]; // [sp+238h] [bp-3C4h]@527
410  Actor actor; // [sp+2B8h] [bp-344h]@4
411  int currHour;
412  int pItemID;
413 
414 
415  dword_50CDC8 = 0;
416  if (!pEventTimer->bPaused) {
419  }
421  // Actor::Actor(&actor);
422  memset(&actor, 0, 0x344u);
425  GameUI_InitializeDialogue(&actor, false);
427  }
428  if (!pMessageQueue_50CBD0->Empty()) {
429  // v1 = "";
430  while (2) {
431  if (pMessageQueue_50CBD0->Empty()) {
432  break;
433  }
434 
435  pMessageQueue_50CBD0->PopMessage(&uMessage, &uMessageParam,
436  (int *)&v199);
437  switch (uMessage) {
440  continue;
441  case UIMSG_PlayArcomage:
442  BackToHouseMenu();
445  continue;
446 
448  Game_StartDialogue(uMessageParam);
449  continue;
452  Game_StartHirelingDialogue(uMessage -
454  continue;
457  continue;
458  case UIMSG_ClickNPCTopic:
459  ClickNPCTopic(uMessageParam);
460  continue;
462  OnSelectShopDialogueOption(uMessageParam);
463  continue;
466  continue;
468  _4B4224_UpdateNPCTopics(uMessageParam);
469  continue;
470  // case UIMSG_StartNewGame:
471  // Game_StartNewGameWhilePlaying(uMessageParam); continue;
472  // case UIMSG_Game_OpenLoadGameDialog:
473  // Game_OpenLoadGameDialog(); continue; case UIMSG_Quit:
474  // Game_QuitGameWhilePlaying(uMessageParam); continue;
475  case UIMSG_80:
476  __debugbreak();
479  __debugbreak(); // pGUIWindow_CurrentMenu =
480  // GUIWindow::Create(0, 0,
481  // window->GetWidth(), window->GetHeight(),
482  // WINDOW_8, 0, 0);
483  continue;
484  case UIMSG_Cancel:
485  new OnCancel(350, 302, 106, 42, (int)pBtnCancel);
486  continue;
487  case UIMSG_OpenQuestBook:
492  continue;
493  case UIMSG_OpenAutonotes:
498  continue;
499  case UIMSG_OpenMapBook:
504  continue;
505  case UIMSG_OpenCalendar:
510  continue;
516  continue;
517  case UIMSG_OpenDebugMenu:
520  back_to_game();
521  OnEscape();
523  break;
524  }
529  continue;
530  case UIMSG_Escape: // нажатие Escape and return to game
531  back_to_game();
533  switch (current_screen_type) {
535  __debugbreak();
542  if (dword_50CDC8) break;
544  uMessageParam = 1;
545  break;
547  if (!dword_50CDC8) {
549  uMessageParam = 1;
550  break;
551  }
552  break;
553  }
554  if (pModalWindow) {
556  pModalWindow = nullptr;
557  continue;
558  }
559  render->ClearZBuffer(0, 479);
560  viewparams->bRedrawGameUI = true;
561  viewparams->field_48 = 1;
563  if (!pGUIWindow_CastTargetedSpell) { // Draw Menu
564  dword_6BE138 = -1;
565  new OnButtonClick2(0x25Au, 0x1C2u, 0, 0,
566  (int)pBtn_GameSettings, String(),
567  false);
568 
570  menu->MenuLoop();
571  } else {
574  mouse->SetCursorImage("MICON1");
577  back_to_game();
578  }
579  continue;
580  } else if (current_screen_type ==
582 /*
583  stru_506E40.Release();
584  Game_OnEscape();
585 */
586  break;
587  } else if (
590 /*
591  // crt_deconstruct_ptr_6A0118();
592  stru_506E40.Release();
593  Game_OnEscape();
594 */
595  break;
596  } else if (
598 /*
599  options_menu_skin.Relaease();
600  OS_SetAppInt("soundflag",
601  (char)uSoundVolumeMultiplier);
602  OS_SetAppInt("musicflag",
603  (char)uMusicVolimeMultiplier);
604  OS_SetAppInt("CharVoices",
605  (char)uVoicesVolumeMultiplier);
606  OS_SetAppInt("WalkSound", bWalkSound);
607  OS_SetAppInt("ShowDamage",
608  bShowDamage);
609  // OS_SetAppInt("graphicsmode",
610  (unsigned
611  __int8)byte_6BE388_graphicsmode);
612  OS_SetAppInt("valAlwaysRun",
613  bAlwaysRun);
614  OS_SetAppInt("FlipOnExit",
615  bFlipOnExit); if (uTurnSpeed == 0)
616  OS_SetAppInt("TurnDelta", 3);
617  else if (uTurnSpeed == 64)
618  OS_SetAppInt("TurnDelta", 2);
619  else if (uTurnSpeed == 128)
620  OS_SetAppInt("TurnDelta", 1);
621  stru_506E40.Release();
622  Game_OnEscape();
623 */
624  break;
625  } else if (
627 /*
628  // if ( render->pRenderD3D ) {
629  OS_SetAppInt("Colored Lights",
630  render->bUseColoredLights);
631  OS_SetAppInt("Tinting",
632  render->bTinting);
633  OS_SetAppInt("Bloodsplats",
634  (LOBYTE(engine->uFlags2) >> 5)
635  & 1);
636  }
637 
638  stru_506E40.Release();
639  Game_OnEscape();
640 */
641  break;
643  /*v197 = 1;
644  pKeyBindingFlag = false;
645  for (uint i = 0; i < 28; ++i)
646  {
647  if (GameMenuUI_InvaligKeyBindingsFlags[i])
648  pKeyBindingFlag = true;
649  }
650  if (!pKeyBindingFlag)
651  {
652  memset(&game_ui_options_controls, 0, 20);
653  for (uint i = 0; i < 28; ++i)
654  {
655  if (pKeyActionMap->GetActionVKey((enum InputAction)i) !=
656  pPrevVirtualCidesMapping[i])
657  {
658  if (v197)
659  {
660  GUI_ReplaceHotkey(pKeyActionMap->GetActionVKey((enum
661  InputAction)i), LOBYTE(pPrevVirtualCidesMapping[i]), 1);
662  v197 = 0;
663  }
664  else
665  GUI_ReplaceHotkey(pKeyActionMap->GetActionVKey((enum
666  InputAction)i), LOBYTE(pPrevVirtualCidesMapping[i]), 0);
667  }
668  if (i > 3 && i != 25 && i != 26)
669  pKeyToggleType = TOGGLE_OneTimePress;
670  else
671  pKeyToggleType = TOGGLE_Continuously;
672  pKeyActionMap->SetKeyMapping(i,
673  pPrevVirtualCidesMapping[i], pKeyToggleType);
674  }
675  pKeyActionMap->StoreMappings();
676  stru_506E40.Release();
677  }
678  else
679  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0,
680  0);
681 
682  Game_OnEscape();*/
683  break;
684  } else {
687  OnEscape();
688  continue;
689  }
690  } else {
692  switch (current_screen_type) {
694  if (some_active_character) {
698  pParty
703  ->ApplyPlayerAction();
706  0;
708  0;
709  }
713  ->uAttributes &= 0xFFFFFF0F;
715  ptr_50C9A4_ItemToEnchant = nullptr;
716  }
717  OnEscape();
718  continue;
720  if (pBooksButtonOverlay != nullptr) {
722  // crt_deconstruct_ptr_6A0118();
724  }
725  pEventTimer->Resume();
726  OnEscape();
727  continue;
730  continue;
732  pWindow2 = pChestWindow;
733  pWindow2->Release();
736  pEventTimer->Resume();
737  continue;
739  __debugbreak();
740  pWindow2 = ptr_507BC8;
741  pWindow2->Release();
744  pEventTimer->Resume();
745  continue;
746  case CURRENT_SCREEN::SCREEN_REST: // close rest screen
747  if (_506F14_resting_stage) {
749  pParty->pPlayers[3].SetAsleep(
750  GameTime(0));
751  pParty->pPlayers[2].SetAsleep(
752  GameTime(0));
753  pParty->pPlayers[1].SetAsleep(
754  GameTime(0));
755  pParty->pPlayers[0].SetAsleep(
756  GameTime(0));
757  }
760  ->Release();
761  rest_ui_sky_frame_current = nullptr;
762  }
763 
766  ->Release();
768  nullptr;
769  }
770 
772  LEVEL_Outdoor) {
774  pOutdoor->UpdateFog();
775  }
778  OnEscape();
779  continue;
781  __debugbreak();
784  continue;
786  if (uDialogueType) uDialogueType = 0;
787  if (uGameState ==
789  while (HouseDialogPressCloseBtn());
790  } else {
792  continue;
793  }
796  SOUND_WoodDoorClosing, 814, 0, -1, 0, 0);
797  pMediaPlayer->Unload();
800 
801  OnEscape();
802  continue;
803  case CURRENT_SCREEN::SCREEN_INPUT_BLV: // click escape
804  if (uCurrentHouse_Animation == 153)
806  0x99u, HouseSound_Greeting_2);
807  pMediaPlayer->Unload();
810  pNPCStats
811  ->pNewNPCData
813  .uFlags &= 0xFFFFFF7F;
815  viewparams->bRedrawGameUI = true;
817  }
818  DialogueEnding();
820  viewparams->bRedrawGameUI = true;
821  continue;
822  case CURRENT_SCREEN::SCREEN_NPC_DIALOGUE: // click escape
825  pNPCStats
826  ->pNewNPCData
828  .uFlags &= 0xFFFFFF7F;
830  viewparams->bRedrawGameUI = true;
832  }
833  // goto LABEL_317;
834  DialogueEnding();
836  viewparams->bRedrawGameUI = true;
837  continue;
839  // escape
841 
842  sub_4452BB();
843  DialogueEnding();
845  viewparams->bRedrawGameUI = true;
846  continue;
848  // escape
849  if (pParty->vPosition.x < -22528)
850  pParty->vPosition.x = -22528;
851  if (pParty->vPosition.x > 22528)
852  pParty->vPosition.x = 22528;
853  if (pParty->vPosition.y < -22528)
854  pParty->vPosition.y = -22528;
855  if (pParty->vPosition.y > 22528)
856  pParty->vPosition.y = 22528;
857  DialogueEnding();
859  viewparams->bRedrawGameUI = true;
860  continue;
862  pMediaPlayer->Unload();
863  continue;
867  OnEscape();
868  continue;
870  OnEscape();
871  continue;
872 
873  default:
874  __debugbreak(); // which GAME_MENU is
875  // this?
876  OnEscape();
877  continue;
878  }
879  __debugbreak(); // which GAME_MENU is this?
880  OnEscape();
881  continue;
882  }
883  __debugbreak(); // which GAME_MENU is this?
886  }
887  // __debugbreak(); // which GAME_MENU is this? debug / fallback
888  OnEscape();
889  continue;
890  }
891  continue;
892 
893  case UIMSG_ScrollNPCPanel: // Right and Left button for
894  // NPCPanel
895  if (uMessageParam) {
896  new OnButtonClick2(626, 179, 0, 0, (int)pBtn_NPCRight);
897  v37 = (pParty->pHirelings[0].pName != 0) +
898  (pParty->pHirelings[1].pName != 0) +
899  (unsigned __int8)pParty->cNonHireFollowers - 2;
900  // v37 is max scroll position
901  if (pParty->hirelingScrollPosition < v37) {
903  }
904  } else {
905  new OnButtonClick2(469, 179, 0, 0, (int)pBtn_NPCLeft);
906  if (pParty->hirelingScrollPosition > 0) {
908  }
909  }
911  continue;
912 
915  dword_50CDC8 = 1;
917 
918  // PlayHouseSound( // this is wrong - what is it meant to do??
919  // uCurrentHouse_Animation,
920  // HouseSound_NotEnoughMoney_TrainingSuccessful);
921 
923  DialogueEnding();
924  viewparams->bRedrawGameUI = true;
925 
931  if (Party_Teleport_X_Pos) {
933  }
934  if (Party_Teleport_Y_Pos) {
936  }
937  if (Party_Teleport_Z_Pos) {
940  }
943  }
948  } else {
950  }
951  if (*Party_Teleport_Map_Name != 48) {
959  OnMapLeave();
963  }
964  } else {
966  }
967  if (!_stricmp(s_SavedMapName.data(), "d05.blv"))
969  continue;
970 
973  pMediaPlayer->Unload();
974  DialogueEnding();
975  viewparams->bRedrawGameUI = true;
976  continue;
979  viewparams->bRedrawGameUI = true;
980  continue;
983  dword_50CDC8 = 1;
984 
986  // pNPCData4 = (NPCData *)GetTravelTime();
988  if (!engine->IsUnderwater() && pParty->bFlying ||
990  pParty->vPosition.y,
991  pOut, 20) != 1) {
994  if (pParty->vPosition.x < -22528)
995  pParty->vPosition.x = -22528;
996  if (pParty->vPosition.x > 22528)
997  pParty->vPosition.x = 22528;
998  if (pParty->vPosition.y < -22528)
999  pParty->vPosition.y = -22528;
1000  if (pParty->vPosition.y > 22528)
1001  pParty->vPosition.y = 22528;
1002  DialogueEnding();
1004  } else {
1005  pParty->field_6E4 = 0;
1006  pParty->field_6E0 = 0;
1008  DialogueEnding();
1009  pEventTimer->Pause();
1012  SaveGame(1, 0);
1014  RestAndHeal(24 * 60 * GetTravelTime());
1015  if (pParty->GetFood() > 0) {
1016  pParty->RestAndHeal();
1017  if (pParty->GetFood() < GetTravelTime()) {
1018  pPlayer7 = pParty->pPlayers.data();
1019  do {
1020  pPlayer7->SetCondition(1, 0);
1021  ++pPlayer7;
1022  } while ((signed int)pPlayer7 <
1023  (signed int)pParty->pHirelings.data());
1025  }
1027  } else {
1028  pPlayer8 = pParty->pPlayers.data();
1029  do {
1030  pPlayer8->SetCondition(1, 0);
1031  ++pPlayer8;
1032  } while ((signed int)pPlayer8 <
1033  (signed int)pParty->pHirelings.data());
1035  }
1038  pCurrentMapName = pOut;
1039  char pLevelName[32];
1040  strcpy(pLevelName, pCurrentMapName.c_str());
1041  v41 = strtok(pLevelName, ".");
1042  strcpy(pLevelName, v41);
1043  Level_LoadEvtAndStr(pLevelName);
1044  decal_builder->Reset(0);
1047 
1048  bNoNPCHiring = 0;
1049 
1050  engine->SetUnderwater(
1052 
1053  if (Is_out15odm_underwater() || (pCurrentMapName == "d47.blv"))
1054  bNoNPCHiring = 1;
1057  OnMapLoad();
1058  pOutdoor->SetFog();
1060  bool bOnWater = false;
1062  pParty->vPosition.x, pParty->vPosition.y, &bOnWater, 0);
1064  engine->_461103_load_level_sub();
1065  pEventTimer->Resume();
1069  }
1071  continue;
1074  if (pParty->vPosition.x < -22528)
1075  pParty->vPosition.x = -22528;
1076  if (pParty->vPosition.x > 22528)
1077  pParty->vPosition.x = 22528;
1078  if (pParty->vPosition.y < -22528)
1079  pParty->vPosition.y = -22528;
1080  if (pParty->vPosition.y > 22528)
1081  pParty->vPosition.y = 22528;
1082  DialogueEnding();
1084  viewparams->bRedrawGameUI = true;
1085  continue;
1087  HEXRAYS_LOWORD(v42) = vis->get_picked_object_zbuf_val();
1088  v44 = (unsigned __int16)v42;
1089  v45 = PID_TYPE(v44);
1090  uNumSeconds = v44;
1091  v46 = PID_ID(v44);
1092  if (v45 == 3) {
1093  v47 = pActors[v46].uAIState == Dead;
1094  if (!v47) continue;
1096  pSpellInfo->uFlags &= ~0x40u;
1097  pSpellInfo->uPlayerID_2 = uMessageParam;
1098  pSpellInfo->spell_target_pid = v44;
1099  pParty->pPlayers[pSpellInfo->uPlayerID].SetRecoveryTime(
1100  300);
1103  mouse->SetCursorImage("MICON1");
1106  back_to_game();
1107  continue;
1108  }
1109  if (v45 == 2) {
1110  v47 = (pObjectList
1111  ->pObjects[pSpriteObjects[v46].uObjectDescID]
1112  .uFlags &
1113  0x10) == 0;
1114  if (!v47) continue;
1115  pSpellInfo = (CastSpellInfo *)
1117  pSpellInfo->uFlags &= ~0x40u;
1118  pSpellInfo->uPlayerID_2 = uMessageParam;
1119  pSpellInfo->spell_target_pid = v44;
1120  pParty->pPlayers[pSpellInfo->uPlayerID].SetRecoveryTime(
1121  300);
1124  mouse->SetCursorImage("MICON1");
1127  back_to_game();
1128  continue;
1129  }
1130  if (v45 == 5) {
1131  v48 = pLevelDecorations[v46].uEventID == 0;
1132  } else {
1133  if (v45 != 6) continue;
1134  if (uCurrentlyLoadedLevelType != 1) {
1135  pODMFace = &pOutdoor->pBModels[v44 >> 9].pFaces[v46 & 0x3F];
1136  if (!pODMFace->Clickable() ||
1137  !pODMFace->sCogTriggeredID)
1138  continue;
1139  v44 = uNumSeconds;
1140  pSpellInfo =
1142  pSpellInfo->uFlags &= ~0x40u;
1143  pSpellInfo->uPlayerID_2 = uMessageParam;
1144  pSpellInfo->spell_target_pid = v44;
1145  pParty->pPlayers[pSpellInfo->uPlayerID].SetRecoveryTime(300);
1148  mouse->SetCursorImage("MICON1");
1151  back_to_game();
1152  continue;
1153  }
1154  pBLVFace = &pIndoor->pFaces[v46];
1155  if (!pBLVFace->Clickable())
1156  continue;
1157  v48 = pIndoor->pFaceExtras[pBLVFace->uFaceExtraID]
1158  .uEventID == 0;
1159  }
1160  if (v48) continue;
1161  pSpellInfo =
1163  pSpellInfo->uFlags &= ~0x40u;
1164  pSpellInfo->uPlayerID_2 = uMessageParam;
1165  pSpellInfo->spell_target_pid = v44;
1166  pParty->pPlayers[pSpellInfo->uPlayerID].SetRecoveryTime(
1167  300);
1170  mouse->SetCursorImage("MICON1");
1173  back_to_game();
1174  continue;
1175  case UIMSG_CastSpell_Character_Big_Improvement: // Preservation
1176  // and blessing,
1177  // treatment
1178  // paralysis,
1179  // hand
1180  // hammers(individual
1181  // upgrade)
1186  uActiveCharacter = uMessageParam;
1188  } else {
1190  pSpellInfo =
1191  (CastSpellInfo *)
1193  switch (uMessage) {
1195  pSpellInfo->uFlags &= ~0x02u;
1196  break;
1198  pSpellInfo->uFlags &= ~0x0100u;
1199  break;
1201  pSpellInfo->uFlags &= ~0x0200u;
1202  break;
1203  }
1204  pSpellInfo->uPlayerID_2 = uMessageParam;
1205  pParty->pPlayers[pSpellInfo->uPlayerID]
1206  .SetRecoveryTime(300);
1209  pEventTimer->Resume();
1210  mouse->SetCursorImage("MICON1");
1213  }
1214  }
1215  continue;
1216 
1217  case UIMSG_BF:
1218  __debugbreak();
1219  dword_50CDC8 = 1;
1221  SaveGame(1, 0);
1223  dword_6BE364_game_settings_1 |= GAME_SETTINGS_0001;
1225  // v53 = p2DEvents_minus1_::30[26 * (unsigned
1226  // int)ptr_507BC0->ptr_1C];
1227  v53 =
1228  p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1]
1229  ._quest_related;
1230  if (v53 < 0) {
1231  v54 = abs(v53) - 1;
1234  v55 = dword_4E4560[v54];
1236  v56 = dword_4E4590[v54];
1237  v57 = dword_4E45A8[v54];
1238  Party_Teleport_X_Pos = v55;
1239  Party_Teleport_Cam_Yaw = v57;
1240  Party_Teleport_Z_Pos = v56;
1242  v55 | Party_Teleport_Y_Pos | v56 | v57;
1243  }
1245  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0);
1246  continue;
1247 
1249  pAudioPlayer->StopChannels(-1, -1);
1251  new GUIWindow_TownPortalBook(); // (char *)uMessageParam);
1252  continue;
1253 
1255  pAudioPlayer->StopChannels(-1, -1);
1257  continue;
1258 
1260  bRecallingBeacon = uMessageParam;
1261  v127 = uMessageParam + 204;
1262  pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0);
1263  continue;
1264  case UIMSG_HintBeaconSlot: {
1265  if (!pGUIWindow_CurrentMenu) continue;
1267  if (uMessageParam >= pPlayer->vBeacons.size()) {
1268  continue;
1269  }
1270  LloydBeacon *beacon = &pPlayer->vBeacons[uMessageParam];
1271  if (bRecallingBeacon) {
1272  if (beacon->uBeaconTime) {
1274  GameUI_StatusBar_Set(localization->FormatString(474, v173.c_str())); // Recall to %s
1275  }
1276  continue;
1277  }
1278  pMapNum = pMapStats->GetMapInfo(pCurrentMapName);
1279  String pMapName = "Not in Map Stats";
1280  if (pMapNum) {
1281  pMapName = pMapStats->pInfos[pMapNum].pName;
1282  }
1283 
1284  if (beacon->uBeaconTime) {
1286  475, pMapName.c_str(),
1288  beacon->SaveFileID)].pName.c_str())); // Set %s over %s
1289  } else {
1290  GameUI_StatusBar_Set(localization->FormatString(476, pMapName.c_str())); // Set to %s
1291  }
1292  continue;
1293  }
1295  dword_50CDC8 = 1;
1296  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0);
1297  continue;
1298  case UIMSG_InstallBeacon:
1299  pPlayer9 = pPlayers[_506348_current_lloyd_playerid + 1];
1300  if (!pPlayer9->vBeacons[uMessageParam].uBeaconTime && bRecallingBeacon) {
1301  continue;
1302  }
1303 
1304  extern bool _506360_installing_beacon;
1306 
1307  pPlayer9->CanCastSpell(uRequiredMana);
1308  if (pParty->bTurnBasedModeOn) {
1309  v60 = sRecoveryTime;
1311  pPlayer9->SetRecoveryTime(v60);
1313  } else {
1314  pPlayer9->SetRecoveryTime(
1315  (__int64)(flt_6BE3A4_debug_recmod1 *
1316  (double)sRecoveryTime *
1317  2.133333333333333));
1318  }
1320  if (bRecallingBeacon) {
1321  if (pCurrentMapName != pGames_LOD->GetSubNodeName(pPlayer9->vBeacons[uMessageParam].SaveFileID)) {
1322  SaveGame(1, 0);
1323  OnMapLeave();
1324  pCurrentMapName = pGames_LOD->GetSubNodeName(pPlayer9->vBeacons[uMessageParam].SaveFileID);
1325  dword_6BE364_game_settings_1 |= GAME_SETTINGS_0001;
1327  Party_Teleport_X_Pos = pPlayer9->vBeacons[uMessageParam].PartyPos_X;
1328  Party_Teleport_Y_Pos = pPlayer9->vBeacons[uMessageParam].PartyPos_Y;
1329  Party_Teleport_Z_Pos = pPlayer9->vBeacons[uMessageParam].PartyPos_Z;
1330  Party_Teleport_Cam_Yaw = pPlayer9->vBeacons[uMessageParam].PartyRot_X;
1331  Party_Teleport_Cam_Pitch = pPlayer9->vBeacons[uMessageParam].PartyRot_Y;
1333  } else {
1334  pParty->vPosition.x = pPlayer9->vBeacons[uMessageParam].PartyPos_X;
1335  pParty->vPosition.y = pPlayer9->vBeacons[uMessageParam].PartyPos_Y;
1336  pParty->vPosition.z = pPlayer9->vBeacons[uMessageParam].PartyPos_Z;
1338  pParty->sRotationY = pPlayer9->vBeacons[uMessageParam].PartyRot_X;
1339  pParty->sRotationX = pPlayer9->vBeacons[uMessageParam].PartyRot_Y;
1340  }
1341  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0);
1342  if (pBooksButtonOverlay != nullptr) {
1344  pBooksButtonOverlay = nullptr;
1345  }
1348  } else {
1349  pPlayer9->SetBeacon(uMessageParam, lloyds_beacon_spell_level);
1350  }
1351  continue;
1352  case UIMSG_ClickTownInTP:
1353  if (uMessageParam) {
1354  switch (uMessageParam) {
1355  case 1:
1356  v63 = 208;
1357  break;
1358  case 2:
1359  v63 = 207;
1360  break;
1361  case 3:
1362  v63 = 211;
1363  break;
1364  case 4:
1365  v63 = 209;
1366  break;
1367  default:
1368  if (uMessageParam != 5) {
1369  LABEL_486:
1370  SaveGame(1, 0);
1371  v64 =
1373  v65 = uMessageParam;
1374  // if in current map
1375  if (v64 == TownPortalList[uMessageParam]
1376  .uMapInfoID) {
1377  pParty->vPosition.x =
1378  TownPortalList[v65].pos.x;
1379  pParty->vPosition.y =
1380  TownPortalList[v65].pos.y;
1381  pParty->vPosition.z =
1382  TownPortalList[v65].pos.z;
1383  pParty->uFallStartY =
1384  pParty->vPosition.z;
1385  pParty->sRotationY =
1386  TownPortalList[v65].rot_y;
1387  pParty->sRotationX =
1388  TownPortalList[v65].rot_x;
1389  } else { // if change map
1390  SaveGame(1, 0);
1391  OnMapLeave();
1393  GAME_SETTINGS_0001;
1395  pCurrentMapName =
1396  pMapStats->pInfos[TownPortalList[uMessageParam].uMapInfoID]
1397  .pFilename;
1400  TownPortalList[uMessageParam].pos.x;
1402  TownPortalList[uMessageParam].pos.y;
1404  TownPortalList[uMessageParam].pos.z;
1405  v66 =
1406  TownPortalList[uMessageParam].rot_x;
1408  TownPortalList[uMessageParam].rot_y;
1410  v66;
1412  }
1413  // v67 =
1414  // (char*)pGUIWindow_CurrentMenu->sHint;
1415  // if (v67)
1416  // *((int
1417  // *)v67 +
1418  // 17) = 1;
1419  // else
1420  pParty
1421  ->pPlayers[(unsigned __int8)
1423  .CanCastSpell(0x14u);
1424 
1425  pMessageQueue_50CBD0->AddGUIMessage(
1426  UIMSG_Escape, 1, 0);
1427  continue;
1428  }
1429  v63 = 210;
1430  break;
1431  }
1432  } else {
1433  v63 = 206;
1434  }
1435  if (!(unsigned __int16)_449B57_test_bit(pParty->_quest_bits,
1436  v63) && !engine->config->debug_town_portal)
1437  return;
1438  goto LABEL_486;
1439  case UIMSG_HintTownPortal: {
1440  String v69;
1441  if (uMessageParam) {
1442  switch (uMessageParam) {
1443  case 1:
1444  v68 = 208;
1445  break;
1446  case 2:
1447  v68 = 207;
1448  break;
1449  case 3:
1450  v68 = 211;
1451  break;
1452  case 4:
1453  v68 = 209;
1454  break;
1455  default:
1456  v68 = 210;
1457  break;
1458  }
1459  } else {
1460  v68 = 206;
1461  }
1462 
1463  if (!(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v68) && !engine->config->debug_town_portal) {
1464  render->DrawTextureNew(0, 352 / 480.0f, game_ui_statusbar);
1465  continue;
1466  }
1467  // LABEL_506:
1468  if (uMessageParam) {
1469  switch (uMessageParam) {
1470  case 1:
1471  v69 = pMapStats->pInfos[4].pName;
1472  break;
1473  case 2:
1474  v69 = pMapStats->pInfos[3].pName;
1475  break;
1476  case 3:
1477  v69 = pMapStats->pInfos[10].pName;
1478  break;
1479  case 4:
1480  v69 = pMapStats->pInfos[7].pName;
1481  break;
1482  default:
1483  if (uMessageParam != 5) {
1485  localization->FormatString(35, v200));
1486  continue;
1487  }
1488  v69 = pMapStats->pInfos[8].pName;
1489  break;
1490  }
1491  } else {
1492  v69 = pMapStats->pInfos[21].pName;
1493  }
1494  GameUI_StatusBar_Set(localization->FormatString(35, v69.c_str()));
1495  continue;
1496  }
1497  case UIMSG_ShowFinalWindow: {
1498  static String
1499  final_message; // static due to GUIWindow_Modal not
1500  // holding a reference and text ptr will
1501  // be destroyed upon exiting scope
1502 
1503  final_message = StringPrintf("%s\n \n%s\n \n%s", localization->GetString(151), // Congratulations Adventurer.
1504  localization->GetString(118), // We hope that you've enjoyed playing Might
1505  // and Magic VII as much as we did making it.
1506  // We have saved this screen as MM7_WIN.PCX
1507  // in your MM7 directory. You can print it
1508  // out as proof of your accomplishment.
1509  localization->GetString(167)); // - The Might and Magic VII Development Team.
1510 
1511  pModalWindow = new GUIWindow_Modal(final_message.c_str(), UIMSG_OnFinalWindowClose);
1513  continue;
1514  }
1516  __debugbreak();
1518  strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2");
1519  __debugbreak(); // missed break/continue?
1520  case UIMSG_DD: {
1521  __debugbreak();
1522  // sprintf(tmp_str.data(), "%s",
1523  // pKeyActionMap->pPressedKeysBuffer);
1524  FrameTableTxtLine frameTableTxtLine;
1526  String status_string;
1527  if (frameTableTxtLine.uPropCount == 1) {
1528  size_t map_index = atoi(frameTableTxtLine.pProperties[0]);
1529  if (map_index <= 0 || map_index >= 77) continue;
1530  String map_name = pMapStats->pInfos[map_index].pFilename;
1531  if (pGames_LOD->GetSubNodeIndex(map_name) < (pGames_LOD->GetSubNodesCount() / 2)) {
1532  pCurrentMapName = map_name;
1533  dword_6BE364_game_settings_1 |= GAME_SETTINGS_0001;
1535  OnMapLeave();
1536  continue;
1537  }
1538  status_string = StringPrintf("No map found for %s", pMapStats->pInfos[map_index].pName.c_str());
1539  } else {
1540  if (frameTableTxtLine.uPropCount != 3) continue;
1541  int x = atoi(frameTableTxtLine.pProperties[0]);
1542  int y = atoi(frameTableTxtLine.pProperties[1]);
1543  int z = atoi(frameTableTxtLine.pProperties[2]);
1545  if (pIndoor->GetSector(x, y, z)) {
1546  pParty->vPosition.x = x;
1547  pParty->vPosition.y = y;
1548  pParty->vPosition.z = z;
1549  pParty->uFallStartY = z;
1550  continue;
1551  }
1552  } else {
1553  if ((x > -32768) && (x < 32768) && (y > -32768) && (y < 32768) && (z >= 0) && (z < 10000)) {
1554  pParty->vPosition.x = x;
1555  pParty->vPosition.y = y;
1556  pParty->vPosition.z = z;
1557  pParty->uFallStartY = z;
1558  continue;
1559  }
1560  }
1561  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
1562  status_string = "Can't jump to that location!";
1563  }
1564  GameUI_StatusBar_OnEvent(status_string, 6);
1565  continue;
1566  }
1567  case UIMSG_CastQuickSpell: {
1568  if (engine->IsUnderwater()) {
1569  GameUI_StatusBar_OnEvent(localization->GetString(652)); // "You can not do that while you are // underwater!"
1570  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
1571  continue;
1572  }
1573  if (!uActiveCharacter ||
1574  (pPlayer2 = pPlayers[uActiveCharacter],
1575  pPlayer2->uTimeToRecovery))
1576  continue;
1578  (SPELL_TYPE)pPlayer2->uQuickSpell, uActiveCharacter - 1,
1579  0, 0, uActiveCharacter);
1580  continue;
1581  }
1582 
1584  case UIMSG_CastSpell_Shoot_Monster: // FireBlow, Lightning, Ice
1585  // Lightning, Swarm,
1587  v44 = (unsigned __int16)v83;
1588  v84 = v83 >> 16;
1589  if (PID_TYPE(v44) != 3 || v84 >= 5120) continue;
1591  if (uMessage == UIMSG_CastSpell_Shoot_Monster) {
1592  pSpellInfo->uFlags &= ~0x08;
1593  } else {
1594  if (uMessage == UIMSG_CastSpell_Monster_Improvement)
1595  pSpellInfo->uFlags &= ~0x0100u;
1596  else
1597  pSpellInfo->uFlags &= ~0x0200u;
1598  }
1599  pSpellInfo->uPlayerID_2 = uMessageParam;
1600  pSpellInfo->spell_target_pid = v44;
1601  pParty->pPlayers[pSpellInfo->uPlayerID].SetRecoveryTime(300);
1604  mouse->SetCursorImage("MICON1");
1607  back_to_game();
1608  continue;
1609  case UIMSG_1C:
1610  __debugbreak();
1612  continue;
1613  __debugbreak(); // ptr_507BC8 = GUIWindow::Create(0, 0,
1614  // window->GetWidth(), window->GetHeight(),
1615  // WINDOW_68, uMessageParam, 0);
1617  pEventTimer->Pause();
1618  continue;
1619  case UIMSG_STEALFROMACTOR:
1620  if (!uActiveCharacter) continue;
1621  if (!pParty->bTurnBasedModeOn) {
1622  if (pActors[uMessageParam].uAIState == 5)
1623  pActors[uMessageParam].LootActor();
1624  else
1625  Actor::StealFrom(uMessageParam);
1626  continue;
1627  }
1628  if (pTurnEngine->turn_stage == TE_WAIT ||
1630  continue;
1632  if (pActors[uMessageParam].uAIState == 5)
1633  pActors[uMessageParam].LootActor();
1634  else
1635  Actor::StealFrom(uMessageParam);
1636  }
1637  continue;
1638 
1639  case UIMSG_Attack:
1640  if (!uActiveCharacter) continue;
1641  if (!pParty->bTurnBasedModeOn) {
1643  continue;
1644  }
1645  if (pTurnEngine->turn_stage == TE_WAIT ||
1647  continue;
1650  continue;
1651  case UIMSG_ExitRest:
1653  pButton_RestUI_Exit->uY, 0, 0,
1654  (int)pButton_RestUI_Exit,
1655  localization->GetString(81)); // "Exit Rest"
1656  continue;
1657  case UIMSG_Wait5Minutes:
1658  if (_506F14_resting_stage == 2) {
1660  477)); // "You are already resting!"
1661  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
1662  continue;
1663  }
1664  new OnButtonClick2(
1668  localization->GetString(238)); // "Wait 5 Minutes"
1671  continue;
1672  case UIMSG_Wait1Hour:
1673  if (_506F14_resting_stage == 2) {
1675  477)); // "You are already resting!"
1676  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
1677  continue;
1678  }
1679  new OnButtonClick2(
1683  localization->GetString(239)); // "Wait 1 Hour"
1686  continue;
1687  case UIMSG_RentRoom:
1689 
1691 
1692  v86 =
1696  if (uMessageParam == 111 || uMessageParam == 114 ||
1697  uMessageParam == 116) // 107 = Emerald Isle tavern
1698  _506F18_num_minutes_to_sleep = v86 + 12 * 60;
1700  pParty->RestAndHeal();
1702  pParty->pPlayers[3].SetAsleep(GameTime(1));
1703  pParty->pPlayers[2].SetAsleep(GameTime(1));
1704  pParty->pPlayers[1].SetAsleep(GameTime(1));
1705  pParty->pPlayers[0].SetAsleep(GameTime(1));
1706  continue;
1707  case UIMSG_RestWindow:
1710  if (CheckActors_proximity()) {
1711  if (pParty->bTurnBasedModeOn) {
1712  GameUI_StatusBar_OnEvent(localization->GetString(478)); // "You can't rest in turn-based mode!"
1713  continue;
1714  }
1715  v88 = localization->GetString(
1716  480); // "There are hostile enemies near!"
1717  if (pParty->uFlags & 0x88)
1718  v88 = localization->GetString(
1719  479); // "You can't rest here!"
1721  if (!uActiveCharacter) continue;
1722  pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)13,
1723  0);
1724  continue;
1725  }
1726  if (pParty->bTurnBasedModeOn) {
1727  GameUI_StatusBar_OnEvent(localization->GetString(478)); // "You can't rest in turn-based mode!"
1728  continue;
1729  }
1730  if (!(pParty->uFlags & 0x88)) {
1732  continue;
1733  }
1734  if (pParty->bTurnBasedModeOn) {
1735  GameUI_StatusBar_OnEvent(localization->GetString(478)); // "You can't rest in turn-based mode!"
1736  continue;
1737  }
1738  v88 = localization->GetString(
1739  480); // "There are hostile enemies near!"
1740  if (pParty->uFlags & 0x88)
1741  v88 = localization->GetString(
1742  479); // "You can't rest here!"
1744  if (!uActiveCharacter) continue;
1746  0);
1747  continue;
1748  case UIMSG_Rest8Hour:
1749  if (_506F14_resting_stage != 0) {
1751  477)); // "You are already resting!"
1752  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
1753  continue;
1754  }
1756  GameUI_StatusBar_OnEvent(localization->GetString(482)); // "You don't have enough food to rest"
1757  if (uActiveCharacter &&
1758  pPlayers[uActiveCharacter]->CanAct())
1759  pPlayers[uActiveCharacter]->PlaySound(SPEECH_108,
1760  0);
1761  } else {
1762  pParty->pPlayers[3].conditions_times[Condition_Sleep] =
1764  pParty->pPlayers[2].conditions_times[Condition_Sleep] =
1766  pParty->pPlayers[1].conditions_times[Condition_Sleep] =
1768  pParty->pPlayers[0].conditions_times[Condition_Sleep] =
1771  if (!v90)
1772  v90 = rand() % (signed int)pMapStats->uNumMaps + 1;
1773  pMapInfo = &pMapStats->pInfos[v90];
1774  if (rand() % 100 + 1 <= pMapInfo->Encounter_percent) {
1775  v91 = rand() % 100;
1776  v92 = pMapInfo->EncM1percent;
1777  v93 = v91 + 1;
1778  if (v93 > v92)
1779  pNPCData4 =
1780  (NPCData *)((v93 >
1781  v92 + pMapInfo->EncM2percent) +
1782  2);
1783  else
1784  pNPCData4 = (NPCData *)1;
1785  if (!_45063B_spawn_some_monster(pMapInfo,
1786  (int)pNPCData4))
1787  pNPCData4 = 0;
1788  if (pNPCData4) {
1789  pPlayerNum = rand() % 4;
1790  pParty->pPlayers[pPlayerNum]
1791  .conditions_times[Condition_Sleep]
1792  .Reset();
1793  v95 = rand();
1794  Rest(v95 % 6 + 60);
1797 
1798  pMessageQueue_50CBD0->AddGUIMessage(
1799  UIMSG_Escape, 0, 0);
1802  481)); // "Encounter!"
1804  -1, 0, 0);
1805  continue;
1806  }
1807  }
1811  pParty->RestAndHeal();
1813  pParty->pPlayers[3].SetAsleep(GameTime(1));
1814  pParty->pPlayers[2].SetAsleep(GameTime(1));
1815  pParty->pPlayers[1].SetAsleep(GameTime(1));
1816  pParty->pPlayers[0].SetAsleep(GameTime(1));
1817  }
1818  continue;
1819  case UIMSG_AlreadyResting:
1820  if (_506F14_resting_stage == 2) {
1822  477)); // "You are already resting!"
1823  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
1824  continue;
1825  }
1826  new OnButtonClick2(
1830  localization->GetString(237)); // "Wait until Dawn"
1834  60 * v97 - pParty->uCurrentMinute;
1835  continue;
1836 
1840  483,
1841  pSpellStats
1844  ->lastOpenedSpellbookPage]
1845  .pName));
1846  } else {
1847  if (pPlayers[uActiveCharacter]->uQuickSpell)
1849  584)); // "Click here to remove your Quick
1850  // Spell"
1851  else
1853  484)); // "Select a spell then click here to
1854  // set a QuickSpell"
1855  }
1856  continue;
1857  }
1858 
1860  if (!uActiveCharacter) // || (uNumSeconds = (unsigned
1861  // int)pPlayers[uActiveCharacter],!*(char
1862  // *)(uNumSeconds + 11 * *(char
1863  // *)(uNumSeconds + 6734) +
1864  // uMessageParam + 402)))
1865  continue; // this used to check if player had the spell
1866  // activated - no longer rquired here ??
1867 
1870  uMessageParam + 1;
1871  v98 = pPlayers[uActiveCharacter]
1872  ->lastOpenedSpellbookPage; // *(char
1873  // *)(uNumSeconds +
1874  // 6734);
1875  if (quick_spell_at_page - 1 == uMessageParam) {
1877  485,
1878  pSpellStats->pInfos[uMessageParam + 11 * v98 + 1]
1879  .pName));
1880  } else {
1882  486,
1883  pSpellStats->pInfos[uMessageParam + 11 * v98 + 1]
1884  .pName));
1885  }
1886  continue;
1887  }
1888 
1891  pBtn_InstallRemoveSpell->uY, 0, 0,
1893  if (!uActiveCharacter) continue;
1894  pPlayer10 = pPlayers[uActiveCharacter];
1895  if (!byte_506550 || !quick_spell_at_page) {
1896  pPlayer10->uQuickSpell = 0;
1897  quick_spell_at_page = 0;
1898  pAudioPlayer->PlaySound(SOUND_fizzle, 0, 0, -1, 0, 0);
1899  continue;
1900  }
1901  pPlayers[uActiveCharacter]->uQuickSpell =
1902  quick_spell_at_page + 11 * pPlayers[uActiveCharacter]->lastOpenedSpellbookPage;
1903  if (uActiveCharacter) pPlayer10->PlaySound(SPEECH_12, 0);
1904  byte_506550 = 0;
1905  continue;
1906  }
1907 
1908  case UIMSG_SpellBook_PressTab: //перелистывание страниц
1909  //клавишей Tab
1910  {
1911  if (!uActiveCharacter) continue;
1912  int skill_count = 0;
1913  uAction = 0;
1914  for (uint i = 0; i < 9; i++) {
1915  if (pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_FIRE + i] ||
1916  engine->config->debug_all_magic) {
1917  if (pPlayers[uActiveCharacter]->lastOpenedSpellbookPage == i)
1918  uAction = skill_count;
1919  v217[skill_count++] = i;
1920  }
1921  }
1922  if (!skill_count) { //нет скиллов
1924  (SoundID)(rand() % 2 + SOUND_TurnPageU), 0, 0, -1, 0, 0);
1925  } else {
1926  if (OS_IfShiftPressed()) {
1927  --uAction;
1928  if (uAction < 0)
1929  uAction = skill_count - 1;
1930  } else {
1931  ++uAction;
1932  if (uAction >= skill_count)
1933  uAction = 0;
1934  }
1935  ((GUIWindow_Spellbook *)pGUIWindow_CurrentMenu)->OpenSpellbookPage(v217[uAction]);
1936  }
1937  continue;
1938  }
1941  !uActiveCharacter ||
1942  uMessageParam ==
1943  pPlayers[uActiveCharacter]->lastOpenedSpellbookPage)
1944  continue;
1945  ((GUIWindow_Spellbook *)pGUIWindow_CurrentMenu)->OpenSpellbookPage(uMessageParam);
1946  continue;
1947  case UIMSG_SelectSpell: {
1948  if (pTurnEngine->turn_stage == TE_MOVEMENT) continue;
1949  if (!uActiveCharacter) continue;
1950 
1951  // uNumSeconds = (unsigned int)pPlayers[uActiveCharacter];
1952  Player *player = pPlayers[uActiveCharacter];
1953  if (player->spellbook.pChapters[player->lastOpenedSpellbookPage].bIsSpellAvailable[uMessageParam]
1954  || engine->config->debug_all_magic) {
1955  if (quick_spell_at_page - 1 == uMessageParam) {
1956  pGUIWindow_CurrentMenu->Release(); // spellbook close
1957  pEventTimer->Resume();
1960  v103 = quick_spell_at_page + 11 * player->lastOpenedSpellbookPage;
1961  /*if ( dword_50C9E8 < 40 )
1962  {
1963  dword_50C9EC[3 * dword_50C9E8] =
1964  UIMSG_CastSpellFromBook; dword_50C9EC[3 *
1965  dword_50C9E8 + 1] = v103; dword_50C9EC[3 *
1966  dword_50C9E8 + 2] = uActiveCharacter - 1;
1967  ++dword_50C9E8;
1968  }*/
1969  pMessageQueue_50C9E8->AddGUIMessage(
1971  uActiveCharacter - 1);
1972  // pMessageQueue_50CBD0->AddGUIMessage(UIMSG_CastSpellFromBook,
1973  // v103, uActiveCharacter - 1);
1974  } else {
1975  byte_506550 = 1;
1976  quick_spell_at_page = uMessageParam + 1;
1977  }
1978  }
1979  continue;
1980  }
1981 
1985  (SPELL_TYPE)uMessageParam, v199, 0, 0, 0);
1986  continue;
1987 
1988  case UIMSG_SpellScrollUse:
1989  __debugbreak();
1992  (SPELL_TYPE)uMessageParam, v199, 133, 1, 0);
1993  continue;
1994  case UIMSG_SpellBookWindow:
1995  if (pTurnEngine->turn_stage == TE_MOVEMENT) continue;
1996  if (engine->IsUnderwater()) {
1997  GameUI_StatusBar_OnEvent(localization->GetString(652)); // "You can not do that while you are underwater!"
1998  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
1999  } else {
2001  if (uActiveCharacter &&
2002  !pPlayers[uActiveCharacter]->uTimeToRecovery) {
2004  new OnButtonClick2(476, 450, 0, 0, (int)pBtn_CastSpell);
2006  continue;
2007  }
2013  new OnButtonClick2(476, 450, 0, 0,
2014  (int)pBtn_CastSpell);
2016  new GUIWindow_Spellbook();
2017  continue;
2018  }
2019  }
2020  }
2021  continue;
2022  case UIMSG_QuickReference:
2026 
2027  new OnButtonClick2(0x230u, 0x1C2u, 0, 0,
2028  (int)pBtn_QuickReference);
2029  viewparams->bRedrawGameUI = true;
2030 
2032  continue;
2033  case UIMSG_GameMenuButton:
2036  pEventTimer->Resume();
2039  }
2040 
2041  if (gamma_preview_image) {
2043  gamma_preview_image = nullptr;
2044  }
2045  render->SaveScreenshot("gamma.pcx", 155, 117);
2047  assets->GetImage_PCXFromFile("gamma.pcx");
2048 
2049  new OnButtonClick(0x25Au, 0x1C2u, 0, 0,
2050  (int)pBtn_GameSettings);
2051  // LABEL_453:
2052  /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40
2053  ) continue;
2054  pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType
2055  = UIMSG_Escape;
2056  //goto LABEL_770;
2057  pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param
2058  = 0;
2059  *(&pMessageQueue_50CBD0->uNumMessages + 3 *
2060  pMessageQueue_50CBD0->uNumMessages + 3) = 0;
2061  ++pMessageQueue_50CBD0->uNumMessages;*/
2062  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0);
2063  continue;
2065  books_page_number = 1;
2066  Point pt = mouse->GetCursorPos();
2067  if (pt.y > 178) books_page_number = -1;
2068  continue;
2069  }
2072  BtnUp_flag = 1;
2073  continue;
2076  BtnDown_flag = 1;
2077  continue;
2078  case UIMSG_ChangeDetaliz:
2079  ((GUIWindow_CharacterRecord *)pGUIWindow_CurrentMenu)->ToggleRingsOverlay();
2080  continue;
2081  case UIMSG_ClickPaperdoll:
2083  continue;
2084  case UIMSG_SkillUp:
2085  pPlayer4 = pPlayers[uActiveCharacter];
2086  v105 = (int)&pPlayer4->pActiveSkills[uMessageParam];
2087  HEXRAYS_LOWORD(v2) = *(short *)v105;
2088  uNumSeconds = v2;
2089  if (pPlayer4->uSkillPoints < (v2 & 0x3F) + 1) {
2090  v87 = localization->GetString(
2091  488); // "You don't have enough skill points!"
2092  } else {
2093  if ((uNumSeconds & 0x3F) < 0x3C) {
2094  *(short *)v105 = uNumSeconds + 1;
2095  pPlayer4->uSkillPoints -=
2096  pPlayer4->pActiveSkills[uMessageParam] & 0x3F;
2097  pPlayer4->PlaySound(SPEECH_14, 0);
2099  -1, 0, 0);
2100  continue;
2101  }
2102  v87 = localization->GetString(
2103  487); // "You have already mastered this skill!"
2104  }
2106  continue;
2107  case UIMSG_ClickStatsBtn:
2109  ->ShowStatsTab();
2110  continue;
2111  case UIMSG_ClickSkillsBtn:
2113  ->ShowSkillsTab();
2114  continue;
2117  ->ShowInventoryTab();
2118  continue;
2119  case UIMSG_ClickAwardsBtn:
2121  ->ShowAwardsTab();
2122  continue;
2127  continue;
2128  case UIMSG_ClickBooksBtn:
2129  switch (uMessageParam) {
2130  case 11: // Page UP
2131  BtnUp_flag = 1;
2132  pButton = pBtn_Book_2;
2133  break;
2134  case 10: // Page DOWN
2135  BtnDown_flag = 1;
2136  pButton = pBtn_Book_1;
2137  break;
2138  case 0: // Zoom plus
2139  pButton = pBtn_Book_1;
2140  BtnDown_flag = 1;
2141  break;
2142  case 1: // Zoom minus
2143  pButton = pBtn_Book_2;
2144  BtnUp_flag = 1;
2145  break;
2146  case 2: // Potions
2147  Book_PageBtn3_flag = 1;
2148  if (MapBookOpen) continue;
2149  pButton = pBtn_Book_3;
2150  break;
2151  case 3: // fountains
2152  Book_PageBtn4_flag = 1;
2153  if (MapBookOpen) continue;
2154  pButton = pBtn_Book_4;
2155  break;
2156  case 4: // obelisks
2158  1; // Autonotes_Obelisks_page_flag
2159  if (MapBookOpen) continue;
2160  pButton = pBtn_Book_5;
2161  break;
2162  case 5: // seer
2163  Book_PageBtn6_flag = 1; // Autonotes_Seer_page_flag
2164  if (MapBookOpen) continue;
2165  pButton = pBtn_Book_6;
2166  break;
2167  case 6: // misc
2168  pButton = pBtn_Autonotes_Misc;
2170  break;
2171  case 7: // Instructors
2172  pButton = pBtn_Autonotes_Instructors;
2174  break;
2175  default:
2176  continue;
2177  }
2178  new OnButtonClick(pButton->uX, pButton->uY, 0, 0,
2179  (int)pButton, String(), false);
2180  continue;
2181  case UIMSG_SelectCharacter:
2183  GameUI_OnPlayerPortraitLeftClick(uMessageParam);
2184  continue;
2185  case UIMSG_ShowStatus_Funds: {
2187  489, pParty->GetGold() + pParty->uNumGoldInBank,
2188  pParty->uNumGoldInBank)); // You have %d total gold, %d in
2189  // the Bank
2190  continue;
2191  }
2193  currHour = pParty->uCurrentHour;
2194  uNumSeconds = 1;
2195  if (pParty->uCurrentHour > 12) {
2196  if (pParty->uCurrentHour >= 24) uNumSeconds = 0;
2197  currHour = (currHour - 12);
2198  } else {
2199  if (pParty->uCurrentHour < 12) // 12:00 is PM
2200  uNumSeconds = 0;
2201  if (pParty->uCurrentHour == 0) currHour = 12;
2202  }
2204  "%d:%02d%s %s %d %s %d", currHour,
2206  localization->GetAmPm(uNumSeconds),
2208  7),
2209  7 * pParty->uCurrentMonthWeek +
2210  pParty->uCurrentDayOfMonth % 7 + 1,
2212  pParty->uCurrentYear));
2213  continue;
2214 
2215  case UIMSG_ShowStatus_Food: {
2216  GameUI_StatusBar_Set(localization->FormatString(501, pParty->GetFood())); // You have %lu food
2217  continue;
2218  }
2219 
2220  case UIMSG_ShowStatus_Player: {
2221  pPlayer5 = pPlayers[uMessageParam];
2222 
2223  auto status = localization->FormatString(
2224  429, pPlayer5->pName,
2226  pPlayer5->classType)); // %s the %s
2227  status += ": ";
2229  pPlayer5->GetMajorConditionIdx());
2230  GameUI_StatusBar_Set(status);
2231 
2233  PID(OBJECT_Player,
2234  (unsigned char)(8 * uMessageParam - 8) | 4);
2235  continue;
2236  }
2237 
2238  case UIMSG_ShowStatus_ManaHP: {
2240  StringPrintf("%d / %d %s %d / %d %s",
2241  pPlayers[uMessageParam]->GetHealth(),
2242  pPlayers[uMessageParam]->GetMaxHealth(),
2243  localization->GetString(108),
2244  pPlayers[uMessageParam]->GetMana(),
2245  pPlayers[uMessageParam]->GetMaxMana(),
2246  localization->GetString(212)));
2247  continue;
2248  }
2249 
2250  case UIMSG_CHEST_ClickItem:
2252  pPlayers[uActiveCharacter]->OnInventoryLeftClick();
2253  continue;
2254  }
2256  continue;
2258  pPlayers[uActiveCharacter]->OnInventoryLeftClick();
2259  continue;
2262  pMessageQueue_50CBD0->AddGUIMessage(
2264  continue;
2265  case UIMSG_MouseLeftClickInScreen: // срабатывает при нажатии на
2266  // правую кнопку мыши после
2267  // UIMSG_MouseLeftClickInGame
2269  engine->OnGameViewportClick();
2270  continue;
2271  case UIMSG_F: // what event?
2272  __debugbreak();
2273  pButton2 = (GUIButton *)(unsigned __int16)vis->get_picked_object_zbuf_val();
2274  __debugbreak(); // GUIWindow::Create(0, 0, 0, 0, WINDOW_F, (int)pButton2, 0);
2275  continue;
2276  case UIMSG_54: // what event?
2277  __debugbreak();
2278  pButton2 = (GUIButton *)uMessageParam;
2279  __debugbreak(); // GUIWindow::Create(0, 0, 0, 0, WINDOW_22, (int)pButton2, 0);
2280  continue;
2281  case UIMSG_Game_Action:
2283  // if currently in a chest
2286  } else {
2287  OnPressSpace();
2288  }
2289  continue;
2290  case UIMSG_ClickZoomOutBtn:
2292  pParty->uFlags |= 2u;
2293  new OnButtonClick2(519, 136, 0, 0, (int)pBtn_ZoomOut);
2294  uNumSeconds = 131072;
2295  v118 = 2 * viewparams->uMinimapZoom;
2296  ++viewparams->field_28;
2297  viewparams->uMinimapZoom *= 2;
2299  if (v118 > 4096) {
2300  viewparams->uMinimapZoom = 4096;
2301  viewparams->field_28 = 12;
2302  }
2303  continue;
2304  }
2305  v119 = 2048;
2306  if ((signed int)v118 <= 2048) {
2309  break;
2310  }
2311  viewparams->field_28 = 11;
2312  viewparams->uMinimapZoom = v119;
2315  break;
2316  case UIMSG_ClickZoomInBtn:
2318  pParty->uFlags |= 2u;
2319  new OnButtonClick2(574, 136, 0, 0, (int)pBtn_ZoomIn);
2320  uNumSeconds = 32768;
2321  v118 = (unsigned __int64)((signed __int64)(signed int)
2323  << 15) >>
2324  16;
2325  --viewparams->field_28;
2327  (unsigned __int64)((signed __int64)(signed int)
2329  << 15) >>
2330  16;
2332  v119 = 512;
2333  if (v118 < 512) {
2334  viewparams->field_28 = 9;
2335  v118 = v119;
2336  viewparams->uMinimapZoom = v119;
2337  }
2340  } else {
2341  if ((signed int)v118 < 256) {
2342  viewparams->uMinimapZoom = 256;
2343  viewparams->field_28 = 8;
2344  }
2345  }
2347  pItemID = rand() % 500;
2348  for (uint i = 0; i < 500; ++i) {
2349  if (pItemID + i > 499) pItemID = 0;
2350  if (pItemsTable->pItems[pItemID + i].uItemID_Rep_St > 6) {
2351  pPlayers[uActiveCharacter]->AddItem(-1, pItemID + i);
2352  break;
2353  }
2354  }
2356  continue;
2357  case UIMSG_DebugGenItem:
2358  pItemID = rand() % 500;
2359  for (uint i = 0; i < 500; ++i) {
2360  if (pItemID + i > 499) pItemID = 0;
2361  // if (pItemsTable->pItems[pItemID + i].uItemID_Rep_St ==
2362  // (item_id - 40015 + 1)) {
2363  pPlayers[uActiveCharacter]->AddItem(-1, pItemID + i);
2364  break;
2365  //}
2366  }
2368  continue;
2369  case UIMSG_DebugKillChar:
2370  pPlayers[uActiveCharacter]->SetCondition(Condition_Dead, 0);
2371  continue;
2372  case UIMSG_DebugEradicate:
2373  pPlayers[uActiveCharacter]->SetCondition(Condition_Eradicated, 0);
2374  continue;
2375  case UIMSG_DebugFullHeal:
2376  pPlayers[uActiveCharacter]->conditions_times.fill(GameTime(0));
2377  pPlayers[uActiveCharacter]->sHealth =
2378  pPlayers[uActiveCharacter]->GetMaxHealth();
2379  pPlayers[uActiveCharacter]->sMana =
2380  pPlayers[uActiveCharacter]->GetMaxMana();
2381  pAudioPlayer->PlaySound(SOUND_heal, 0, 0, -1, 0, 0);
2382  continue;
2383  case UIMSG_DebugCycleAlign:
2388  continue;
2389  case UIMSG_DebugTakeFood:
2390  pParty->SetFood(0);
2391  continue;
2392  case UIMSG_DebugGiveFood:
2393  pParty->GiveFood(20);
2394  continue;
2395  case UIMSG_DebugTakeGold:
2396  pParty->SetGold(0);
2397  continue;
2399  for (uint i = 1; i < 5; ++i) { // loop over players
2400  for (int ski = 0; ski < 37; ++ski) { // loop over skills
2402  [pPlayers[i]->classType][ski] >
2403  0) { // if class can learn this skill
2404  switch (ski) { // give skils
2405  case 0: // PLAYER_SKILL_STAFF = 0,
2406  if (pPlayers[i]->skillStaff == 0)
2407  pPlayers[i]->AddSkillByEvent(
2408  &Player::skillStaff, 1);
2409  break;
2410  case 1: // PLAYER_SKILL_SWORD = 1,
2411  if (pPlayers[i]->skillSword == 0)
2412  pPlayers[i]->AddSkillByEvent(
2413  &Player::skillSword, 1);
2414  break;
2415  case 2: // PLAYER_SKILL_DAGGER = 2,
2416  if (pPlayers[i]->skillDagger == 0)
2417  pPlayers[i]->AddSkillByEvent(
2418  &Player::skillDagger, 1);
2419  break;
2420  case 3: // PLAYER_SKILL_AXE = 3,
2421  if (pPlayers[i]->skillAxe == 0)
2422  pPlayers[i]->AddSkillByEvent(
2423  &Player::skillAxe, 1);
2424  break;
2425  case 4: // PLAYER_SKILL_SPEAR = 4,
2426  if (pPlayers[i]->skillSpear == 0)
2427  pPlayers[i]->AddSkillByEvent(
2428  &Player::skillSpear, 1);
2429  break;
2430  case 5: // PLAYER_SKILL_BOW = 5,
2431  if (pPlayers[i]->skillBow == 0)
2432  pPlayers[i]->AddSkillByEvent(
2433  &Player::skillBow, 1);
2434  break;
2435  case 6: // PLAYER_SKILL_MACE = 6,
2436  if (pPlayers[i]->skillMace == 0)
2437  pPlayers[i]->AddSkillByEvent(
2438  &Player::skillMace, 1);
2439  break;
2440  case 7: // PLAYER_SKILL_BLASTER = 7,
2441  if (pPlayers[i]->skillBlaster == 0)
2442  pPlayers[i]->AddSkillByEvent(
2443  &Player::skillBlaster, 1);
2444  break;
2445  case 8: // PLAYER_SKILL_SHIELD = 8,
2446  if (pPlayers[i]->skillShield == 0)
2447  pPlayers[i]->AddSkillByEvent(
2448  &Player::skillShield, 1);
2449  break;
2450  case 9: // PLAYER_SKILL_LEATHER = 9,
2451  if (pPlayers[i]->skillLeather == 0)
2452  pPlayers[i]->AddSkillByEvent(
2453  &Player::skillLeather, 1);
2454  break;
2455  case 10: // PLAYER_SKILL_CHAIN = 10,
2456  if (pPlayers[i]->skillChain == 0)
2457  pPlayers[i]->AddSkillByEvent(
2458  &Player::skillChain, 1);
2459  break;
2460  case 11: // PLAYER_SKILL_PLATE = 11,
2461  if (pPlayers[i]->skillPlate == 0)
2462  pPlayers[i]->AddSkillByEvent(
2463  &Player::skillPlate, 1);
2464  break;
2465  case 12: // PLAYER_SKILL_FIRE = 12,
2466  if (pPlayers[i]->skillFire == 0)
2467  pPlayers[i]->AddSkillByEvent(
2468  &Player::skillFire, 1);
2469  break;
2470  case 13: // PLAYER_SKILL_AIR = 13,
2471  if (pPlayers[i]->skillAir == 0)
2472  pPlayers[i]->AddSkillByEvent(
2473  &Player::skillAir, 1);
2474  break;
2475  case 14: // PLAYER_SKILL_WATER = 14,
2476  if (pPlayers[i]->skillWater == 0)
2477  pPlayers[i]->AddSkillByEvent(
2478  &Player::skillWater, 1);
2479  break;
2480  case 15: // PLAYER_SKILL_EARTH = 15,
2481  if (pPlayers[i]->skillEarth == 0)
2482  pPlayers[i]->AddSkillByEvent(
2483  &Player::skillEarth, 1);
2484  break;
2485  case 16: // PLAYER_SKILL_SPIRIT = 16,
2486  if (pPlayers[i]->skillSpirit == 0)
2487  pPlayers[i]->AddSkillByEvent(
2488  &Player::skillSpirit, 1);
2489  break;
2490  case 17: // PLAYER_SKILL_MIND = 17,
2491  if (pPlayers[i]->skillMind == 0)
2492  pPlayers[i]->AddSkillByEvent(
2493  &Player::skillMind, 1);
2494  break;
2495  case 18: // PLAYER_SKILL_BODY = 18,
2496  if (pPlayers[i]->skillBody == 0)
2497  pPlayers[i]->AddSkillByEvent(
2498  &Player::skillBody, 1);
2499  break;
2500  case 19: // PLAYER_SKILL_LIGHT = 19,
2501  if (pPlayers[i]->skillLight == 0)
2502  pPlayers[i]->AddSkillByEvent(
2503  &Player::skillLight, 1);
2504  break;
2505  case 20: // PLAYER_SKILL_DARK = 20,
2506  if (pPlayers[i]->skillDark == 0)
2507  pPlayers[i]->AddSkillByEvent(
2508  &Player::skillDark, 1);
2509  break;
2510  case 21: // PLAYER_SKILL_ITEM_ID = 21,
2511  if (pPlayers[i]->skillItemId == 0)
2512  pPlayers[i]->AddSkillByEvent(
2513  &Player::skillItemId, 1);
2514  break;
2515  case 22: // PLAYER_SKILL_MERCHANT = 22,
2516  if (pPlayers[i]->skillMerchant == 0)
2517  pPlayers[i]->AddSkillByEvent(
2518  &Player::skillMerchant, 1);
2519  break;
2520  case 23: // PLAYER_SKILL_REPAIR = 23,
2521  if (pPlayers[i]->skillRepair == 0)
2522  pPlayers[i]->AddSkillByEvent(
2523  &Player::skillRepair, 1);
2524  break;
2525  case 24: // PLAYER_SKILL_BODYBUILDING = 24,
2526  if (pPlayers[i]->skillBodybuilding == 0)
2527  pPlayers[i]->AddSkillByEvent(
2529  break;
2530  case 25: // PLAYER_SKILL_MEDITATION = 25,
2531  if (pPlayers[i]->skillMeditation == 0)
2532  pPlayers[i]->AddSkillByEvent(
2534  break;
2535  case 26: // PLAYER_SKILL_PERCEPTION = 26,
2536  if (pPlayers[i]->skillPerception == 0)
2537  pPlayers[i]->AddSkillByEvent(
2539  break;
2540  case 27: // PLAYER_SKILL_DIPLOMACY = 27,
2541  break;
2542  case 28: // PLAYER_SKILL_TIEVERY = 28,
2543  break;
2544  case 29: // PLAYER_SKILL_TRAP_DISARM = 29,
2545  if (pPlayers[i]->skillDisarmTrap == 0)
2546  pPlayers[i]->AddSkillByEvent(
2548  break;
2549  case 30: // PLAYER_SKILL_DODGE = 30,
2550  if (pPlayers[i]->skillDodge == 0)
2551  pPlayers[i]->AddSkillByEvent(
2552  &Player::skillDodge, 1);
2553  break;
2554  case 31: // PLAYER_SKILL_UNARMED = 31,
2555  if (pPlayers[i]->skillUnarmed == 0)
2556  pPlayers[i]->AddSkillByEvent(
2557  &Player::skillUnarmed, 1);
2558  break;
2559  case 32: // PLAYER_SKILL_MONSTER_ID = 32,
2560  if (pPlayers[i]->skillMonsterId == 0)
2561  pPlayers[i]->AddSkillByEvent(
2563  break;
2564  case 33: // PLAYER_SKILL_ARMSMASTER = 33,
2565  if (pPlayers[i]->skillArmsmaster == 0)
2566  pPlayers[i]->AddSkillByEvent(
2568  break;
2569  case 34: // PLAYER_SKILL_STEALING = 34,
2570  if (pPlayers[i]->skillStealing == 0)
2571  pPlayers[i]->AddSkillByEvent(
2572  &Player::skillStealing, 1);
2573  break;
2574  case 35: // PLAYER_SKILL_ALCHEMY = 35,
2575  if (pPlayers[i]->skillAlchemy == 0)
2576  pPlayers[i]->AddSkillByEvent(
2577  &Player::skillAlchemy, 1);
2578  break;
2579  case 36: // PLAYER_SKILL_LEARNING = 36,
2580  if (pPlayers[i]->skillLearning == 0)
2581  pPlayers[i]->AddSkillByEvent(
2582  &Player::skillLearning, 1);
2583  break;
2584 
2585  // PLAYER_SKILL_CLUB = 37,
2586  // PLAYER_SKILL_MISC = 38,
2587  // PLAYER_SKILL_INVALID = -1
2588  }
2589  }
2590  }
2591  }
2592  continue;
2593  case UIMSG_DebugGiveSkillP:
2594  for (uint i = 0; i < 4; ++i) pParty->pPlayers[i].uSkillPoints += 50;
2595  pPlayers[uActiveCharacter]->PlayAwardSound_Anim();
2596  continue;
2597  case UIMSG_DebugGiveEXP:
2598  pParty->GivePartyExp(20000);
2599  pPlayers[uActiveCharacter]->PlayAwardSound_Anim();
2600  continue;
2601  case UIMSG_DebugGiveGold:
2602  Party::AddGold(10000);
2603  continue;
2604  case UIMSG_DebugTownPortal:
2605  engine->ToggleDebugTownPortal();
2607  continue;
2608  case UIMSG_DebugWizardEye:
2609  engine->ToggleDebugWizardEye();
2611  continue;
2612  case UIMSG_DebugAllMagic:
2613  engine->ToggleDebugAllMagic();
2615  continue;
2616  case UIMSG_DebugTerrain:
2617  engine->ToggleDebugTerrain();
2619  continue;
2620  case UIMSG_DebugLightmap:
2621  engine->ToggleDebugLightmap();
2623  continue;
2624  case UIMSG_DebugTurboSpeed:
2625  engine->ToggleDebugTurboSpeed();
2627  continue;
2628  case UIMSG_DebugNoActors:
2629  engine->ToggleDebugNoActors();
2631  continue;
2632  case UIMSG_DebugDrawDist:
2633  engine->ToggleDebugDrawDist();
2635  continue;
2636  case UIMSG_DebugSnow:
2637  engine->ToggleDebugSnow();
2639  continue;
2640  case UIMSG_DebugNoDamage:
2641  engine->ToggleDebugNoDamage();
2643  continue;
2645  engine->ToggleDebugPortalLines();
2647  continue;
2648  case UIMSG_DebugPickedFace:
2649  engine->ToggleDebugPickedFace();
2651  continue;
2652  case UIMSG_DebugShowFPS:
2653  engine->ToggleDebugShowFPS();
2655  continue;
2657  engine->ToggleDebugSeasonsChange();
2659  continue;
2660  case UIMSG_DebugFarClip:
2661  if (pODMRenderParams->far_clip == 0x6000)
2662  pODMRenderParams->far_clip = 0x2000;
2663  else
2664  pODMRenderParams->far_clip = 0x6000;
2666  continue;
2667  default:
2668  continue;
2669  }
2670  }
2671  }
2672 
2675 
2676  if (dword_50C9DC) {
2678  (int)ptr_50C9E0, 0);
2679  dword_50C9DC = 0;
2680  } else {
2684  pMessageQueue_50CBD0->AddGUIMessage(
2690  }
2691  }
2692  }
2694 }
2695 
2696 //----- (0046A14B) --------------------------------------------------------
2698  engine->PickKeyboard(Keyboard::IsKeyBeingHeld(VK_CONTROL), &vis_sprite_filter_3, &vis_door_filter);
2699  int pid = vis->get_picked_object_zbuf_val();
2700  if (pid != -1)
2701  DoInteractionWithTopmostZObject(pid & 0xFFFF, PID_ID(pid));
2702 }
2703 
2705  const char *pLocationName; // [sp-4h] [bp-68h]@74
2706  bool bLoading; // [sp+10h] [bp-54h]@1
2707  signed int v16; // [sp+14h] [bp-50h]@8
2708  char Source[64]; // [sp+44h] [bp-20h]@76
2709 
2712  if (bLoading) {
2713  pParty->Reset();
2716  }
2717 
2718  extern bool use_music_folder;
2721  pAudioPlayer->SetMusicVolume(engine->config->music_level);
2722 
2723  while (2) {
2724  v16 = 1;
2726 
2728  if (pParty->bTurnBasedModeOn) {
2729  pTurnEngine->End(false);
2730  pParty->bTurnBasedModeOn = false;
2731  }
2732  DoPrepareWorld(bLoading, 1);
2733  pEventTimer->Resume();
2735  GAME_SETTINGS_0080_SKIP_USER_INPUT_THIS_FRAME;
2736  // uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions
2737  // = 0;
2739 
2740  // if ( render->pRenderD3D )
2741  vis->_4C1A02();
2742  engine->Draw();
2743 
2744  bool game_finished = false;
2745  do {
2746  window->PeekMessageLoop();
2747  if (dword_6BE364_game_settings_1 & GAME_SETTINGS_APP_INACTIVE) {
2748  OS_WaitMessage();
2749  // continue;
2750  }
2751 
2752  engine->_44EEA7(); // pop up . mouse picking
2755  EventLoop();
2758  render->Present();
2759  continue;
2760  }
2761 
2763 
2764  pEventTimer->Update();
2765  pMiscTimer->Update();
2766 
2767  OnTimer(0);
2770  pMiscTimer->Resume();
2774  if (!pEventTimer->bTackGameTime)
2776 
2777  if (dword_6BE364_game_settings_1 & GAME_SETTINGS_0001) {
2778  dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_0001;
2779  } else {
2782  }
2783  }
2784  if (v16) {
2785  v16 = 0;
2786  viewparams->bRedrawGameUI = true;
2787  }
2789  if (uGameState == GAME_STATE_PLAYING) {
2790  engine->Draw();
2791  continue;
2792  }
2793  if (uGameState == GAME_FINISHED) {
2794  game_finished = true;
2795  continue;
2796  }
2797  if (uGameState == GAME_STATE_CHANGE_LOCATION) { // смена локации
2798  pAudioPlayer->StopChannels(-1, -1);
2799  PrepareWorld(0);
2801  continue;
2802  }
2803  // if ((signed int)uGameState <= GAME_STATE_5 || uGameState ==
2804  // GAME_STATE_GAME_QUITTING_TO_MAIN_MENU)//GAME_STATE_NEWGAME_OUT_GAMEMENU,
2805  // GAME_STATE_LOADING_GAME
2808  uGameState == GAME_STATE_5 ||
2810  game_finished = true;
2811  continue;
2812  }
2814  render->BeginScene();
2816  render->EndScene();
2817  render->Present();
2818  continue;
2819  }
2821  engine->Draw();
2822  continue;
2823  }
2825  pAudioPlayer->StopChannels(-1, -1);
2826  memset(&pParty->pHirelings[0], 0, 0x4Cu);
2827  memset(&pParty->pHirelings[1], 0, 0x4Cu);
2828  for (int i = 0; i < (signed int)pNPCStats->uNumNewNPCs; ++i) {
2829  if (pNPCStats->pNewNPCData[i].field_24)
2830  pNPCStats->pNewNPCData[i].uFlags &= 0xFFFFFF7Fu;
2831  }
2832  pMediaPlayer->PlayFullscreenMovie("losegame");
2834  SaveGame(0, 0);
2835  ++pParty->uNumDeaths;
2836  for (uint i = 0; i < 4; ++i)
2837  pParty->pPlayers[i].SetVariable(VAR_Award, 85);
2839  pParty->GetPlayingTime().AddDays(7); // += 2580480
2840  HEXRAYS_LOWORD(pParty->uFlags) &= ~0x204;
2841  pParty->SetGold(0);
2843  memset(pParty->pPartyBuffs.data(), 0, 0x140u);
2844 
2845  if (pParty->bTurnBasedModeOn) {
2846  pTurnEngine->End(true);
2847  pParty->bTurnBasedModeOn = false;
2848  }
2849  for (int i = 1; i < 5; ++i) {
2850  pPlayers[i]->conditions_times.fill(GameTime(0));
2851  pPlayers[i]->pPlayerBuffs.fill(
2852  SpellBuff()); // ???
2853  // memset(pParty->pPlayers[i].conditions_times.data(),
2854  // 0, 0xA0u);//(pConditions, 0, 160)
2855  // memset(pParty->pPlayers[i].pPlayerBuffs.data(),
2856  // 0, 0x180u);//(pPlayerBuffs[0], 0, 384)
2857  pPlayers[i]->sHealth = 1;
2858  uActiveCharacter = 1;
2859  }
2862  pParty->vPosition.x = -17331; // respawn in harmondale
2863  pParty->vPosition.y = 12547;
2864  pParty->vPosition.z = 465;
2865  pParty->sRotationY = 0;
2866  pLocationName = "out02.odm";
2867  } else {
2868  pParty->vPosition.x = 12552; // respawn on emerald isle
2869  pParty->vPosition.y = 1816;
2870  pParty->vPosition.z = 0;
2871  pParty->sRotationY = 512;
2872  pLocationName = "out01.odm";
2873  }
2874  strcpy(Source, pLocationName);
2876  pParty->sRotationX = 0;
2877  pParty->uFallSpeed = 0;
2878  pParty->field_6E4 = 0;
2879  pParty->field_6E0 = 0;
2880  // change map
2881  if (pCurrentMapName != Source) {
2882  pCurrentMapName = Source;
2889  PrepareWorld(1);
2890  }
2892 
2893  int num_conscious_players = 0;
2894  int conscious_players_ids[4] = {-1, -1, -1, -1};
2895  for (int i = 0; i < 4; ++i) {
2896  if (pParty->pPlayers[i].CanAct())
2897  conscious_players_ids[num_conscious_players++] = i;
2898  }
2899  if (num_conscious_players) {
2900  int idx =
2901  conscious_players_ids[rand() % num_conscious_players];
2902  Assert(idx >= 0);
2903  pParty->pPlayers[idx].PlaySound(SPEECH_99, 0);
2904  }
2905 
2907  524)); // "Once again you've cheated death!.." "Вы снова
2908  // обхитрили смерть! …"
2910 
2911  // need to flush messages here??
2912  }
2913  } while (!game_finished);
2914 
2915  pEventTimer->Pause();
2916  engine->ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows();
2920  bLoading = true;
2921  continue;
2922  }
2923  break;
2924  }
2926 }
UIGame.h
MapInfo::EncM2percent
char EncM2percent
Definition: MapInfo.h:55
Party::pPickedItem
ItemGen pPickedItem
Definition: Party.h:312
UIMSG_DebugGiveSkillP
@ UIMSG_DebugGiveSkillP
Definition: GUIWindow.h:242
pButton_RestUI_Exit
GUIButton * pButton_RestUI_Exit
Definition: GUIButton.cpp:35
TE_MOVEMENT
@ TE_MOVEMENT
Definition: TurnEngine.h:22
OnPaperdollLeftClick
void OnPaperdollLeftClick()
Definition: UICharacter.cpp:2712
MENU_SAVELOAD
@ MENU_SAVELOAD
Definition: GUIWindow.h:254
OnButtonClick2
Definition: GUIWindow.h:523
uLoadGameUI_SelectedSlot
unsigned int uLoadGameUI_SelectedSlot
Definition: mm7_data.cpp:693
Player::SetRecoveryTime
void SetRecoveryTime(signed int sRecoveryTime)
Definition: Player.cpp:2593
CloseWindowBackground
void CloseWindowBackground()
Definition: Engine.cpp:761
UIMSG_HintSelectRemoveQuickSpellBtn
@ UIMSG_HintSelectRemoveQuickSpellBtn
Definition: GUIWindow.h:63
CURRENT_SCREEN::SCREEN_OPTIONS
@ SCREEN_OPTIONS
Player
Definition: Player.h:401
Book_PageBtn4_flag
int Book_PageBtn4_flag
Definition: mm7_data.cpp:526
PartyAlignment::PartyAlignment_Good
@ PartyAlignment_Good
Party::Reset
void Reset()
Definition: Party.cpp:507
ViewingParams::field_48
int field_48
Definition: Viewport.h:75
FrameTableTxtLine::uPropCount
int uPropCount
Definition: FrameTableInc.h:12
SOUND_fizzle
@ SOUND_fizzle
Definition: AudioPlayer.h:74
Party::vPosition
Vec3_int_ vPosition
Definition: Party.h:250
FrameTableTxtLine::pProperties
const char * pProperties[30]
Definition: FrameTableInc.h:13
Actor::StealFrom
static void StealFrom(unsigned int uActorID)
Definition: Actor.cpp:1385
UIMessageType
UIMessageType
Definition: GUIWindow.h:13
GUIMessageQueue::Empty
bool Empty()
Definition: GUIWindow.h:659
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
Localization::GetCharacterConditionName
const char * GetCharacterConditionName(unsigned int index) const
Definition: Localization.h:75
UIDialogue.h
Player::skillSword
unsigned __int16 skillSword
Definition: Player.h:673
pLevelDecorations
std::array< LevelDecoration, 3000 > pLevelDecorations
Definition: Decoration.cpp:8
UIMSG_DebugTerrain
@ UIMSG_DebugTerrain
Definition: GUIWindow.h:234
UIMSG_DebugNoActors
@ UIMSG_DebugNoActors
Definition: GUIWindow.h:231
Engine_::EngineFactory::CreateEngine
std::shared_ptr< Engine > CreateEngine(const std::string &command_line)
Definition: EngineFactory.cpp:11
GAME_STATE_5
@ GAME_STATE_5
Definition: Engine.h:37
GUIWindow_CharacterRecord
Definition: UICharacter.h:4
Chest::GrabItem
static void GrabItem(bool all=false)
Definition: Chest.cpp:580
Player::skillMeditation
unsigned __int16 skillMeditation
Definition: Player.h:697
Party::TakeFood
static void TakeFood(int amount)
Definition: Party.cpp:245
Party::uFallSpeed
int uFallSpeed
Definition: Party.h:259
UIMSG_ClickAwardsDownBtn
@ UIMSG_ClickAwardsDownBtn
Definition: GUIWindow.h:137
Application::Game::keyboard
Keyboard * keyboard
Definition: Game.h:46
Book_PageBtn6_flag
int Book_PageBtn6_flag
Definition: mm7_data.cpp:524
UIMSG_SPellbook_ShowHightlightedSpellInfo
@ UIMSG_SPellbook_ShowHightlightedSpellInfo
Definition: GUIWindow.h:64
UIMSG_Escape
@ UIMSG_Escape
Definition: GUIWindow.h:96
PartyAlignment::PartyAlignment_Neutral
@ PartyAlignment_Neutral
CURRENT_SCREEN::SCREEN_DEBUG
@ SCREEN_DEBUG
Viewport.h
Application::Game::CloseTargetedSpellWindow
void CloseTargetedSpellWindow()
Definition: Game.cpp:285
LOD::File::GetSubNodesCount
size_t GetSubNodesCount() const
Definition: LOD.h:72
Timer::uTimeElapsed
unsigned int uTimeElapsed
Definition: Time.h:133
Party::uCurrentMonth
unsigned int uCurrentMonth
Definition: Party.h:272
SetUserInterface
void SetUserInterface(PartyAlignment align, bool bReplace)
Definition: GUIWindow.cpp:1032
UIModal.h
MapStats::pInfos
MapInfo pInfos[77]
Definition: MapInfo.h:79
Timer::Update
void Update()
Definition: Time.cpp:53
UIMSG_ClickTownInTP
@ UIMSG_ClickTownInTP
Definition: GUIWindow.h:150
LOD.h
UIMSG_CycleCharacters
@ UIMSG_CycleCharacters
Definition: GUIWindow.h:143
Party::GetPlayingTime
GameTime & GetPlayingTime()
Definition: Party.h:230
Book_PageBtn5_flag
int Book_PageBtn5_flag
Definition: mm7_data.cpp:525
AudioPlayer::SetMusicVolume
void SetMusicVolume(int music_level)
Definition: AudioPlayer.cpp:165
SOUND_TurnPageU
@ SOUND_TurnPageU
Definition: AudioPlayer.h:75
MPlayer::PlayFullscreenMovie
void PlayFullscreenMovie(const std::string &pMovieName)
Definition: MediaPlayer.cpp:705
DialogueEnding
void DialogueEnding()
Definition: GUIWindow.cpp:812
UIShop_Buy_Identify_Repair
void UIShop_Buy_Identify_Repair()
Definition: UIShops.cpp:874
UIMSG_ShowFinalWindow
@ UIMSG_ShowFinalWindow
Definition: GUIWindow.h:165
Game.h
UIMSG_HintBeaconSlot
@ UIMSG_HintBeaconSlot
Definition: GUIWindow.h:147
TeleportToStartingPoint
void TeleportToStartingPoint(MapStartPoint point)
Definition: MapInfo.cpp:308
Mouse::GetCursorPos
Point GetCursorPos()
Definition: Mouse.cpp:108
GUIWindow_TownPortalBook
Definition: TownPortalBook.h:4
UIMSG_DebugWizardEye
@ UIMSG_DebugWizardEye
Definition: GUIWindow.h:236
ptr_507BC8
GUIWindow * ptr_507BC8
Definition: GUIWindow.cpp:53
GUIWindow
Definition: GUIWindow.h:433
OnMapLoad
void OnMapLoad()
Definition: Engine.cpp:2327
MENU_STATE
MENU_STATE
Definition: GUIWindow.h:250
QuestBook.h
Party::uCurrentMinute
unsigned int uCurrentMinute
Definition: Party.h:276
Timer::Resume
void Resume()
Definition: Time.cpp:27
CastSpellInfo::uFlags
uint16_t uFlags
Definition: CastSpellInfo.h:28
UIMSG_ShowStatus_ManaHP
@ UIMSG_ShowStatus_ManaHP
Definition: GUIWindow.h:78
sub_4452BB
void sub_4452BB()
Definition: Engine.cpp:2445
pSpriteFrameTable
struct SpriteFrameTable * pSpriteFrameTable
Definition: Sprites.cpp:22
CastSpellInfo
Definition: CastSpellInfo.h:17
pBtnCancel
GUIButton * pBtnCancel
Definition: GUIButton.cpp:87
OutdoorLocation::pBModels
BSPModelList pBModels
Definition: Outdoor.h:119
Player::skillArmsmaster
unsigned __int16 skillArmsmaster
Definition: Player.h:705
GUIWindow_QuestBook
Definition: QuestBook.h:4
SaveNewGame
void SaveNewGame()
Definition: SaveLoad.cpp:566
Player::skillItemId
unsigned __int16 skillItemId
Definition: Player.h:693
pSpriteObjects
std::array< SpriteObject, MAX_SPRITE_OBJECTS > pSpriteObjects
Definition: SpriteObject.cpp:34
Application::Game::GameLoop
void GameLoop()
Definition: Game.cpp:2704
Start_Party_Teleport_Flag
int Start_Party_Teleport_Flag
Definition: mm7_data.cpp:628
Player::skillBlaster
unsigned __int16 skillBlaster
Definition: Player.h:679
UIMSG_54
@ UIMSG_54
Definition: GUIWindow.h:69
NPCData::uFlags
unsigned int uFlags
Definition: NPC.h:84
UIMSG_ClickNPCTopic
@ UIMSG_ClickNPCTopic
Definition: GUIWindow.h:142
Party_Teleport_Y_Pos
int Party_Teleport_Y_Pos
Definition: mm7_data.cpp:623
Autonotes_Misc_page_flag
int Autonotes_Misc_page_flag
Definition: mm7_data.cpp:523
UIMSG_LloydsBeacon_FlippingBtn
@ UIMSG_LloydsBeacon_FlippingBtn
Definition: GUIWindow.h:145
UIMSG_DebugLearnSkills
@ UIMSG_DebugLearnSkills
Definition: GUIWindow.h:241
Player::skillDodge
unsigned __int16 skillDodge
Definition: Player.h:702
Party::SetFood
static void SetFood(int amount)
Definition: Party.cpp:239
Party::GetNextActiveCharacter
int GetNextActiveCharacter()
Definition: Party.cpp:166
uGameState
unsigned int uGameState
Definition: mm7_data.cpp:695
IntegrityTest
void IntegrityTest()
Definition: IocContainer.cpp:127
vis_sprite_filter_3
Vis_SelectionFilter vis_sprite_filter_3
Definition: Vis.cpp:30
UIMSG_DebugGiveFood
@ UIMSG_DebugGiveFood
Definition: GUIWindow.h:239
NPCData::Hired
bool Hired()
Definition: NPC.h:80
UIPartyCreation.h
PARTY_QUEST_EMERALD_MARGARETH_OFF
@ PARTY_QUEST_EMERALD_MARGARETH_OFF
Definition: Party.h:21
GUIWindow_QuickReference
Definition: UIQuickReference.h:3
Party::sRotationX
int sRotationX
Definition: Party.h:252
pGUIWindow_CurrentMenu
GUIWindow * pGUIWindow_CurrentMenu
Definition: GUIWindow.cpp:54
pArcomageGame
ArcomageGame * pArcomageGame
Definition: Arcomage.cpp:97
dword_50C9DC
int dword_50C9DC
Definition: mm7_data.cpp:583
GAME_STATE_FINAL_WINDOW
@ GAME_STATE_FINAL_WINDOW
Definition: Engine.h:41
lloyds_beacon_spell_id
int lloyds_beacon_spell_id
Definition: mm7_data.cpp:513
Player::skillLearning
unsigned __int16 skillLearning
Definition: Player.h:708
_449B57_test_bit
bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2)
Definition: Party.cpp:1185
SpellStats::pInfos
SpellInfo pInfos[100]
Definition: Spells.h:192
SpellBuff
Definition: Spells.h:147
z
GLdouble GLdouble z
Definition: SDL_opengl_glext.h:407
Player::skillStealing
unsigned __int16 skillStealing
Definition: Player.h:706
SetCurrentMenuID
void SetCurrentMenuID(MENU_STATE uMenu)
Definition: GUIWindow.cpp:128
OnButtonClick
Definition: GUIWindow.h:510
Application::Game::decal_builder
DecalBuilder * decal_builder
Definition: Game.h:47
GAME_FINISHED
@ GAME_FINISHED
Definition: Engine.h:33
GUIMessageQueue::Flush
void Flush()
Definition: GUIWindow.cpp:159
UIMSG_CastSpell_Character_Big_Improvement
@ UIMSG_CastSpell_Character_Big_Improvement
Definition: GUIWindow.h:55
CURRENT_SCREEN::SCREEN_CHEST
@ SCREEN_CHEST
MapStats::GetMapInfo
MAP_TYPE GetMapInfo(const String &Str2)
Definition: MapInfo.cpp:225
TownPortalBook.h
UIMSG_ClickHouseNPCPortrait
@ UIMSG_ClickHouseNPCPortrait
Definition: GUIWindow.h:197
ViewingParams::field_28
int field_28
Definition: Viewport.h:66
ShowMM7IntroVideo_and_LoadingScreen
void ShowMM7IntroVideo_and_LoadingScreen()
Definition: Game.cpp:221
PartyAlignment::PartyAlignment_Evil
@ PartyAlignment_Evil
Party::hirelingScrollPosition
unsigned __int8 hirelingScrollPosition
Definition: Party.h:268
CURRENT_SCREEN::SCREEN_SPELL_BOOK
@ SCREEN_SPELL_BOOK
Actor
Definition: Actor.h:151
Application::Menu::MenuLoop
void MenuLoop()
Definition: GameMenu.cpp:512
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
UIMSG_ClickZoomInBtn
@ UIMSG_ClickZoomInBtn
Definition: GUIWindow.h:191
Player::skillRepair
unsigned __int16 skillRepair
Definition: Player.h:695
SpriteObject.h
UIMSG_ShowStatus_Funds
@ UIMSG_ShowStatus_Funds
Definition: GUIWindow.h:85
UIMSG_CastSpell_Character_Small_Improvement
@ UIMSG_CastSpell_Character_Small_Improvement
Definition: GUIWindow.h:121
GameUI_WritePointedObjectStatusString
void GameUI_WritePointedObjectStatusString()
Definition: UIGame.cpp:1266
Player::skillSpear
unsigned __int16 skillSpear
Definition: Player.h:676
engine
std::shared_ptr< Engine > engine
Definition: Engine.cpp:130
IndoorLocation::pFaceExtras
struct BLVFaceExtra * pFaceExtras
Definition: Indoor.h:632
UIMSG_DebugGenItem
@ UIMSG_DebugGenItem
Definition: GUIWindow.h:219
GUIWindow_DebugMenu
Definition: UIGame.h:46
CURRENT_SCREEN::SCREEN_CASTING
@ SCREEN_CASTING
UIMSG_CastSpell_Shoot_Monster
@ UIMSG_CastSpell_Shoot_Monster
Definition: GUIWindow.h:56
UIMSG_DebugGiveEXP
@ UIMSG_DebugGiveEXP
Definition: GUIWindow.h:243
SpellInfo::pName
char * pName
Definition: Spells.h:176
Player::skillAxe
unsigned __int16 skillAxe
Definition: Player.h:675
SOUND_error
@ SOUND_error
Definition: AudioPlayer.h:19
pBtn_Book_1
GUIButton * pBtn_Book_1
Definition: GUIButton.cpp:23
UIMSG_QuickReference
@ UIMSG_QuickReference
Definition: GUIWindow.h:89
EngineFactory.h
BLVFaceExtra::uEventID
uint16_t uEventID
Definition: Indoor.h:512
stru262_TurnBased::ApplyPlayerAction
void ApplyPlayerAction()
Definition: TurnEngine.cpp:101
Player::skillBow
unsigned __int16 skillBow
Definition: Player.h:677
Party::uDefaultPartyHeight
unsigned int uDefaultPartyHeight
Definition: Party.h:238
dword_4E4560
std::array< int, 6 > dword_4E4560
Definition: mm7_data.cpp:247
bNoNPCHiring
char bNoNPCHiring
Definition: mm7_data.cpp:720
UIMSG_StartNPCDialogue
@ UIMSG_StartNPCDialogue
Definition: GUIWindow.h:128
UIMSG_GameMenuButton
@ UIMSG_GameMenuButton
Definition: GUIWindow.h:90
CURRENT_SCREEN::SCREEN_19
@ SCREEN_19
UIMSG_ClickExitCharacterWindowBtn
@ UIMSG_ClickExitCharacterWindowBtn
Definition: GUIWindow.h:135
OnButtonClick3
Definition: GUIWindow.h:536
UIMSG_CastSpell_Monster_Improvement
@ UIMSG_CastSpell_Monster_Improvement
Definition: GUIWindow.h:120
Party::_quest_bits
unsigned __int8 _quest_bits[64]
Definition: Party.h:291
localization
Localization * localization
Definition: Localization.cpp:11
GameUI_LoadPlayerPortraintsAndVoices
void GameUI_LoadPlayerPortraintsAndVoices()
Definition: UIGame.cpp:170
UIMSG_ClickSkillsBtn
@ UIMSG_ClickSkillsBtn
Definition: GUIWindow.h:97
DoPrepareWorld
void DoPrepareWorld(unsigned int bLoading, int _1_fullscreen_loading_2_box)
Definition: Engine.cpp:796
Overlays.h
GAME_STATE_LOADING_GAME
@ GAME_STATE_LOADING_GAME
Definition: Engine.h:35
BtnDown_flag
int BtnDown_flag
Definition: mm7_data.cpp:528
Timer::bPaused
unsigned int bPaused
Definition: Time.h:127
UIMSG_DebugGiveGold
@ UIMSG_DebugGiveGold
Definition: GUIWindow.h:244
UIMSG_DD
@ UIMSG_DD
Definition: GUIWindow.h:184
UIRest.h
pMediaPlayer
MPlayer * pMediaPlayer
Definition: MediaPlayer.cpp:43
Party::uCurrentHour
unsigned int uCurrentHour
Definition: Party.h:275
pStartingMapName
char pStartingMapName[32]
Definition: mm7_data.cpp:589
UIMSG_PlayArcomage
@ UIMSG_PlayArcomage
Definition: GUIWindow.h:33
UIMSG_TransitionWindowCloseBtn
@ UIMSG_TransitionWindowCloseBtn
Definition: GUIWindow.h:199
Player::skillDagger
unsigned __int16 skillDagger
Definition: Player.h:674
PaletteManager.h
CURRENT_SCREEN::SCREEN_QUICK_REFERENCE
@ SCREEN_QUICK_REFERENCE
GameUI_StatusBar_Set
void GameUI_StatusBar_Set(const String &str)
Definition: UIStatusBar.cpp:15
Player::lastOpenedSpellbookPage
char lastOpenedSpellbookPage
Definition: Player.h:773
SOUND_encounter
@ SOUND_encounter
Definition: AudioPlayer.h:92
Player::skillLight
unsigned __int16 skillLight
Definition: Player.h:691
ptr_50C9A4_ItemToEnchant
ItemGen * ptr_50C9A4_ItemToEnchant
Definition: Items.cpp:35
UIMSG_SelectCharacter
@ UIMSG_SelectCharacter
Definition: GUIWindow.h:93
Player::skillMerchant
unsigned __int16 skillMerchant
Definition: Player.h:694
Party::pPlayers
std::array< Player, 4 > pPlayers
Definition: Party.h:310
GameUI_OnPlayerPortraitLeftClick
void GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID)
Definition: UIGame.cpp:796
GUIWindow_Spellbook
Definition: Spellbook.h:4
HouseSound_Greeting_2
@ HouseSound_Greeting_2
Definition: UIHouses.h:115
GameUI_DrawHiredNPCs
void GameUI_DrawHiredNPCs()
Definition: UIGame.cpp:2236
GUIWindow::Release
virtual void Release()
Definition: GUIWindow.cpp:292
BLVFace::Clickable
bool Clickable() const
Definition: Indoor.h:453
UIMSG_DebugTakeGold
@ UIMSG_DebugTakeGold
Definition: GUIWindow.h:240
ODMFace::sCogTriggeredID
int16_t sCogTriggeredID
Definition: BSPModel.h:147
bDialogueUI_InitializeActor_NPC_ID
int bDialogueUI_InitializeActor_NPC_ID
Definition: mm7_data.cpp:642
Player::skillBodybuilding
unsigned __int16 skillBodybuilding
Definition: Player.h:696
dword_5C3418
int dword_5C3418
Definition: mm7_data.cpp:634
CastSpellInfo::uPlayerID
uint16_t uPlayerID
Definition: CastSpellInfo.h:25
GUIWindow_AutonotesBook
Definition: AutonotesBook.h:4
UIMSG_SpellBook_PressTab
@ UIMSG_SpellBook_PressTab
Definition: GUIWindow.h:37
_576E2C_current_minimap_zoom
int _576E2C_current_minimap_zoom
Definition: mm7_data.cpp:600
Party::uDefaultEyelevel
unsigned int uDefaultEyelevel
Definition: Party.h:240
pMovie_Track
PMovie pMovie_Track
Definition: MediaPlayer.cpp:44
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
ArcomageGame::Loop
static void Loop()
Definition: Arcomage.cpp:896
UIMSG_SpellBookWindow
@ UIMSG_SpellBookWindow
Definition: GUIWindow.h:88
MENU_DebugBLVLevel
@ MENU_DebugBLVLevel
Definition: GUIWindow.h:261
UIMSG_CastSpell_Telekinesis
@ UIMSG_CastSpell_Telekinesis
Definition: GUIWindow.h:157
GameFactory.h
UIMSG_SelectShopDialogueOption
@ UIMSG_SelectShopDialogueOption
Definition: GUIWindow.h:194
SOUND_WoodDoorClosing
@ SOUND_WoodDoorClosing
Definition: AudioPlayer.h:13
lloyds_beacon_spell_level
__int64 lloyds_beacon_spell_level
Definition: mm7_data.cpp:518
OutdoorLocation::UpdateFog
void UpdateFog()
Definition: Outdoor.cpp:453
vis_door_filter
Vis_SelectionFilter vis_door_filter
Definition: Vis.cpp:28
GUIWindow_Modal
Definition: UIModal.h:5
Chest::OnChestLeftClick
static void OnChestLeftClick()
Definition: Chest.cpp:537
UIMSG_RestWindow
@ UIMSG_RestWindow
Definition: GUIWindow.h:87
Player::uSkillPoints
unsigned int uSkillPoints
Definition: Player.h:765
SPELL_TYPE
SPELL_TYPE
Definition: Spells.h:10
AssetsManager.h
Player::pActiveSkills
std::array< unsigned __int16, 37 > pActiveSkills
Definition: Player.h:711
AutonotesBook.h
pPlayers
NZIArray< struct Player *, 5 > pPlayers
Definition: Player.cpp:46
UIMSG_DebugEradicate
@ UIMSG_DebugEradicate
Definition: GUIWindow.h:226
Timer::bTackGameTime
int bTackGameTime
Definition: Time.h:128
Actor::UpdateActorAI
static void UpdateActorAI()
Definition: Actor.cpp:2745
TurnEngine.h
Vis::get_picked_object_zbuf_val
int get_picked_object_zbuf_val()
Definition: Vis.cpp:517
pBtn_ZoomOut
GUIButton * pBtn_ZoomOut
Definition: mm7_data.cpp:550
AssetsManager::GetImage_PCXFromFile
Texture * GetImage_PCXFromFile(const String &name)
Definition: AssetsManager.cpp:111
UIMSG_StartHireling2Dialogue
@ UIMSG_StartHireling2Dialogue
Definition: GUIWindow.h:117
GUIButton
Definition: GUIButton.h:11
PLAYER_SKILL_FIRE
@ PLAYER_SKILL_FIRE
Definition: Player.h:183
OutdoorLocation::UpdateSunlightVectors
void UpdateSunlightVectors()
Definition: Outdoor.cpp:429
pIndoor
IndoorLocation * pIndoor
Definition: Indoor.cpp:49
UIMSG_OpenQuestBook
@ UIMSG_OpenQuestBook
Definition: GUIWindow.h:168
Player::skillLeather
unsigned __int16 skillLeather
Definition: Player.h:681
Chest.h
Level_LoadEvtAndStr
void Level_LoadEvtAndStr(const char *pLevelName)
Definition: Engine.cpp:2433
Engine.h
GAME_STATE_GAME_QUITTING_TO_MAIN_MENU
@ GAME_STATE_GAME_QUITTING_TO_MAIN_MENU
Definition: Engine.h:39
current_screen_type
enum CURRENT_SCREEN current_screen_type
Definition: GUIWindow.cpp:83
_494820_training_time
unsigned int _494820_training_time(unsigned int a1)
Definition: Engine.cpp:2263
Player::skillDisarmTrap
unsigned __int16 skillDisarmTrap
Definition: Player.h:701
pTurnEngine
struct stru262_TurnBased * pTurnEngine
Definition: TurnEngine.cpp:21
MM_Main
int MM_Main(const char *pCmdLine)
Definition: Game.cpp:83
UIMSG_ShowStatus_DateTime
@ UIMSG_ShowStatus_DateTime
Definition: GUIWindow.h:77
Dead
@ Dead
Definition: Actor.h:80
p2DEvents
_2devent p2DEvents[525]
Definition: Events.cpp:57
Player::skillWater
unsigned __int16 skillWater
Definition: Player.h:686
pMapStats
struct MapStats * pMapStats
Definition: mm7_data.cpp:20
Party::pPartyBuffs
std::array< SpellBuff, 20 > pPartyBuffs
Definition: Party.h:309
UIMSG_ClickAwardsBtn
@ UIMSG_ClickAwardsBtn
Definition: GUIWindow.h:100
_42777D_CastSpell_UseWand_ShootArrow
void _42777D_CastSpell_UseWand_ShootArrow(SPELL_TYPE spell, unsigned int uPlayerID, unsigned int a4, __int16 flags, int a6)
Definition: CastSpellInfo.cpp:4369
uHouse_ExitPic
int uHouse_ExitPic
Definition: UIHouses.cpp:45
TownPortalList
std::array< TownPortalData, 6 > TownPortalList
Definition: Spells.cpp:24
uLevelMapStatsID
unsigned int uLevelMapStatsID
Definition: mm7_data.cpp:713
UIMSG_DebugKillChar
@ UIMSG_DebugKillChar
Definition: GUIWindow.h:225
Events.h
Party::uFallStartY
int uFallStartY
Definition: Party.h:265
Application::Game::vis
Vis * vis
Definition: Game.h:48
_506F14_resting_stage
int _506F14_resting_stage
Definition: mm7_data.cpp:544
Party::uPartyHeight
unsigned int uPartyHeight
Definition: Party.h:237
Actor.h
GetCurrentMenuID
MENU_STATE GetCurrentMenuID()
Definition: GUIWindow.cpp:133
dword_507B00_spell_info_to_draw_in_popup
int dword_507B00_spell_info_to_draw_in_popup
Definition: mm7_data.cpp:554
pBtn_Book_4
GUIButton * pBtn_Book_4
Definition: GUIButton.cpp:20
UIHouses.h
UIMSG_SelectSpell
@ UIMSG_SelectSpell
Definition: GUIWindow.h:71
OnSelectShopDialogueOption
void OnSelectShopDialogueOption(signed int uMessageParam)
Definition: UIHouses.cpp:1047
pItemsTable
struct ItemsTable * pItemsTable
Definition: Items.cpp:37
CURRENT_SCREEN::SCREEN_E
@ SCREEN_E
Player::skillAlchemy
unsigned __int16 skillAlchemy
Definition: Player.h:707
ODMRenderParams
Definition: IRender.h:55
Localization.h
MENU_NEWGAME
@ MENU_NEWGAME
Definition: GUIWindow.h:252
UIMSG_CastQuickSpell
@ UIMSG_CastQuickSpell
Definition: GUIWindow.h:29
AudioPlayer::MusicStop
void MusicStop()
Definition: AudioPlayer.cpp:140
UIBooks.h
ItemGen::uAttributes
unsigned int uAttributes
Definition: Items.h:349
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
DecalBuilder::Reset
void Reset(bool bPreserveBloodsplats)
Definition: DecalBuilder.cpp:58
GameUI_StatusBar_Update
void GameUI_StatusBar_Update(bool force_hide)
Definition: Engine.cpp:1507
MENU_EXIT_GAME
@ MENU_EXIT_GAME
Definition: GUIWindow.h:255
rest_ui_hourglass_frame_current
Image * rest_ui_hourglass_frame_current
Definition: UIRest.cpp:32
Player::skillMonsterId
unsigned __int16 skillMonsterId
Definition: Player.h:704
NPCStats::uNumNewNPCs
unsigned int uNumNewNPCs
Definition: NPC.h:179
UIMSG_MouseLeftClickInScreen
@ UIMSG_MouseLeftClickInScreen
Definition: GUIWindow.h:22
pBtn_Book_5
GUIButton * pBtn_Book_5
Definition: GUIButton.cpp:19
CURRENT_SCREEN::SCREEN_BRANCHLESS_NPC_DIALOG
@ SCREEN_BRANCHLESS_NPC_DIALOG
UIMSG_OpenHistoryBook
@ UIMSG_OpenHistoryBook
Definition: GUIWindow.h:186
Keyboard::ProcessInputActions
void ProcessInputActions()
Definition: Keyboard.cpp:332
Player::skillStaff
unsigned __int16 skillStaff
Definition: Player.h:672
window_SpeakInHouse
GUIWindow * window_SpeakInHouse
Definition: GUIWindow.cpp:51
GUIButton.h
GUIProgressBar::Initialize
bool Initialize(Type type)
Definition: GUIProgressBar.cpp:22
MapInfo::EncM1percent
char EncM1percent
Definition: MapInfo.h:54
ptr_50C9E0
struct NPCData * ptr_50C9E0
Definition: mm7_data.cpp:584
CheckActors_proximity
bool CheckActors_proximity()
Definition: Actor.cpp:4034
pParty
Party * pParty
Definition: Party.cpp:30
Player::skillPlate
unsigned __int16 skillPlate
Definition: Player.h:683
Image
Definition: Image.h:19
Engine_::EngineFactory
Definition: EngineFactory.h:11
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: SDL_opengl_glext.h:2483
MapBook.h
UIMSG_SkillUp
@ UIMSG_SkillUp
Definition: GUIWindow.h:104
JournalBook.h
Party_Teleport_Cam_Pitch
int Party_Teleport_Cam_Pitch
Definition: mm7_data.cpp:626
UIMSG_OnFinalWindowClose
@ UIMSG_OnFinalWindowClose
Definition: GUIWindow.h:164
dword_4E4590
std::array< int, 6 > dword_4E4590
Definition: mm7_data.cpp:249
pMessageQueue_50C9E8
struct GUIMessageQueue * pMessageQueue_50C9E8
Definition: GUIWindow.cpp:87
npcIdToDismissAfterDialogue
int npcIdToDismissAfterDialogue
Definition: mm7_data.cpp:632
ViewingParams::uMinimapZoom
unsigned int uMinimapZoom
Definition: Viewport.h:65
UIMSG_DebugSnow
@ UIMSG_DebugSnow
Definition: GUIWindow.h:229
CharacterUI_ReleaseButtons
void CharacterUI_ReleaseButtons()
Definition: UICharacter.cpp:3371
IRender.h
_50C9D0_AfterEnchClickEventId
int _50C9D0_AfterEnchClickEventId
Definition: mm7_data.cpp:580
PartyCreationUI_Loop
bool PartyCreationUI_Loop()
Definition: UIPartyCreation.cpp:274
SPEECH_14
@ SPEECH_14
Definition: Player.h:60
NPCData::pName
char * pName
Definition: NPC.h:82
UIMSG_DebugCycleAlign
@ UIMSG_DebugCycleAlign
Definition: GUIWindow.h:237
NPCStats::pNewNPCData
NPCData pNewNPCData[501]
Definition: NPC.h:165
AudioPlayer::UpdateSounds
void UpdateSounds()
Definition: AudioPlayer.cpp:322
Party::days_played_without_rest
unsigned char days_played_without_rest
Definition: Party.h:290
Party::bFlying
unsigned int bFlying
Definition: Party.h:266
UIMSG_OpenCalendar
@ UIMSG_OpenCalendar
Definition: GUIWindow.h:171
UIMSG_DebugAllMagic
@ UIMSG_DebugAllMagic
Definition: GUIWindow.h:235
gamma_preview_image
Image * gamma_preview_image
Definition: Game.cpp:242
UIMSG_ChangeDetaliz
@ UIMSG_ChangeDetaliz
Definition: GUIWindow.h:70
UIMSG_DebugTakeFood
@ UIMSG_DebugTakeFood
Definition: GUIWindow.h:238
_506F18_num_minutes_to_sleep
int _506F18_num_minutes_to_sleep
Definition: mm7_data.cpp:545
UIMSG_MouseLeftClickInGame
@ UIMSG_MouseLeftClickInGame
Definition: GUIWindow.h:18
Player::SetCondition
void SetCondition(unsigned int uConditionIdx, int blockable)
Definition: Player.cpp:612
dword_50CDC8
int dword_50CDC8
Definition: mm7_data.cpp:587
UIMSG_OpenDebugMenu
@ UIMSG_OpenDebugMenu
Definition: GUIWindow.h:246
dword_4E4578
std::array< int, 6 > dword_4E4578
Definition: mm7_data.cpp:248
pButton_RestUI_Wait1Hour
GUIButton * pButton_RestUI_Wait1Hour
Definition: GUIButton.cpp:38
BackToHouseMenu
void BackToHouseMenu()
Definition: UIHouses.cpp:3991
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
UIMSG_ClickAwardScrollBar
@ UIMSG_ClickAwardScrollBar
Definition: GUIWindow.h:159
UIMSG_STEALFROMACTOR
@ UIMSG_STEALFROMACTOR
Definition: GUIWindow.h:31
GUIWindow_JournalBook
Definition: JournalBook.h:4
AudioPlayer::PlaySpellSound
void PlaySpellSound(unsigned int spell, unsigned int pid)
Definition: AudioPlayer.cpp:476
CURRENT_SCREEN::SCREEN_LOADGAME
@ SCREEN_LOADGAME
byte_506550
char byte_506550
Definition: mm7_data.cpp:531
Application::Game::Loop
bool Loop()
Definition: Game.cpp:134
UIMSG_ExitRest
@ UIMSG_ExitRest
Definition: GUIWindow.h:134
pGameLoadingUI_ProgressBar
GUIProgressBar * pGameLoadingUI_ProgressBar
Definition: GUIProgressBar.cpp:14
viewparams
struct ViewingParams * viewparams
Definition: mm7_data.cpp:22
Player::skillChain
unsigned __int16 skillChain
Definition: Player.h:682
quick_spell_at_page
int quick_spell_at_page
Definition: mm7_data.cpp:530
Application::Game::menu
Menu * menu
Definition: Game.h:50
GetHouseGoodbyeSpeech
void GetHouseGoodbyeSpeech()
Definition: UIShops.cpp:1654
Party_Teleport_Map_Name
char * Party_Teleport_Map_Name
Definition: mm7_data.cpp:608
GUICredits::ExecuteCredits
static void ExecuteCredits()
Definition: UICredits.cpp:95
PlayerSpells::pChapters
std::array< PlayerSpellbookChapter, 9 > pChapters
Definition: Player.h:304
Condition_Dead
@ Condition_Dead
Definition: Conditions.h:22
CURRENT_SCREEN::SCREEN_HOUSE
@ SCREEN_HOUSE
SpriteFrameTable::ResetSomeSpriteFlags
void ResetSomeSpriteFlags()
Definition: Sprites.cpp:32
GameUI_StatusBar_Clear
void GameUI_StatusBar_Clear()
Definition: UIStatusBar.cpp:23
SaveLoad.h
CastSpellInfo::uPlayerID_2
uint16_t uPlayerID_2
Definition: CastSpellInfo.h:26
Party_Teleport_X_Pos
int Party_Teleport_X_Pos
Definition: mm7_data.cpp:622
UIMSG_OnCastLloydsBeacon
@ UIMSG_OnCastLloydsBeacon
Definition: GUIWindow.h:144
BLVFace
Definition: Indoor.h:424
_506360_installing_beacon
bool _506360_installing_beacon
Definition: LloydsBook.cpp:18
ItemGen::uItemID
int uItemID
Definition: Items.h:326
SOUND_quest
@ SOUND_quest
Definition: AudioPlayer.h:106
GUIProgressBar::TYPE_Box
@ TYPE_Box
Definition: GUIProgressBar.h:12
MPlayer::Unload
void Unload()
Definition: MediaPlayer.cpp:826
UIMSG_DebugDrawDist
@ UIMSG_DebugDrawDist
Definition: GUIWindow.h:230
UIMSG_ShowStatus_Player
@ UIMSG_ShowStatus_Player
Definition: GUIWindow.h:79
MapBookOpen
int MapBookOpen
Definition: mm7_data.cpp:519
UIMSG_CastSpellFromBook
@ UIMSG_CastSpellFromBook
Definition: GUIWindow.h:122
Vis::_4C1A02
void _4C1A02()
Definition: Vis.cpp:427
GUIWindow_MainMenu::Loop
static void Loop()
Definition: UIMainMenu.cpp:118
sub_4637E0_is_there_popup_onscreen
char sub_4637E0_is_there_popup_onscreen()
Definition: GUIWindow.cpp:1361
GameMenu.h
KeyboardActionMapping::pPressedKeysBuffer
char pPressedKeysBuffer[257]
Definition: Keyboard.h:66
BtnUp_flag
int BtnUp_flag
Definition: mm7_data.cpp:529
ObjectDesc::uFlags
int16_t uFlags
Definition: ObjectList.h:27
UIMSG_DebugLightmap
@ UIMSG_DebugLightmap
Definition: GUIWindow.h:233
UIMSG_1C
@ UIMSG_1C
Definition: GUIWindow.h:32
CURRENT_SCREEN::SCREEN_CHARACTERS
@ SCREEN_CHARACTERS
CURRENT_SCREEN::SCREEN_SAVEGAME
@ SCREEN_SAVEGAME
pIcons_LOD
LODFile_IconsBitmaps * pIcons_LOD
Definition: LOD.cpp:12
Party::RestAndHeal
void RestAndHeal()
Definition: Party.cpp:793
UIMSG_CHANGE_LOCATION_ClickCencelBtn
@ UIMSG_CHANGE_LOCATION_ClickCencelBtn
Definition: GUIWindow.h:76
GUIWindow_CalendarBook
Definition: CalendarBook.h:4
dword_5B65D0_dialogue_actor_npc_id
signed int dword_5B65D0_dialogue_actor_npc_id
Definition: mm7_data.cpp:633
pBtn_Book_2
GUIButton * pBtn_Book_2
Definition: GUIButton.cpp:22
AudioPlayer::StopChannels
void StopChannels(int uStartChannel, int uEndChannel)
Definition: AudioPlayer.cpp:331
pActors
std::array< Actor, 500 > pActors
Definition: Actor.cpp:38
Mouse::uPointingObjectID
unsigned int uPointingObjectID
Definition: Mouse.h:315
MediaPlayer.h
sCurrentMenuID
MENU_STATE sCurrentMenuID
Definition: GUIWindow.cpp:81
Party_Teleport_Cam_Yaw
int Party_Teleport_Cam_Yaw
Definition: mm7_data.cpp:625
Arcomage.h
Party.h
UIMSG_OnTravelByFoot
@ UIMSG_OnTravelByFoot
Definition: GUIWindow.h:75
Application::Game::OnPressSpace
void OnPressSpace()
Definition: Game.cpp:2697
uCurrentHouse_Animation
int uCurrentHouse_Animation
Definition: mm7_data.cpp:607
UIMSG_AlreadyResting
@ UIMSG_AlreadyResting
Definition: GUIWindow.h:92
back_to_game
void back_to_game()
Definition: Engine.cpp:1609
MapStats::uNumMaps
unsigned int uNumMaps
Definition: MapInfo.h:80
ReleaseAwardsScrollBar
void ReleaseAwardsScrollBar()
Definition: GUIButton.cpp:123
LloydsBook.h
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
Player::pName
char pName[16]
Definition: Player.h:637
Party::uFlags
unsigned int uFlags
Definition: Party.h:313
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
CalendarBook.h
MainMenuLoad_Loop
void MainMenuLoad_Loop()
Definition: UISaveLoad.cpp:399
Party::field_6E0
int field_6E0
Definition: Party.h:257
Player::uTimeToRecovery
unsigned __int16 uTimeToRecovery
Definition: Player.h:762
stru262_TurnBased::End
void End(bool bPlaySound)
Definition: TurnEngine.cpp:220
uRestUI_FoodRequiredToRest
int uRestUI_FoodRequiredToRest
Definition: mm7_data.cpp:543
pBtn_NPCLeft
GUIButton * pBtn_NPCLeft
Definition: GUIButton.cpp:51
GUI_UpdateWindows
void GUI_UpdateWindows()
Definition: GUIWindow.cpp:956
Mouse::ChangeActivation
void ChangeActivation(int a1)
Definition: Mouse.cpp:249
Actor::sNPC_ID
int16_t sNPC_ID
Definition: Actor.h:287
MapInfo::pName
String pName
Definition: MapInfo.h:38
UIMSG_InventoryLeftClick
@ UIMSG_InventoryLeftClick
Definition: GUIWindow.h:103
LOD::File::GetSubNodeIndex
int GetSubNodeIndex(const String &name) const
Definition: LOD.cpp:1005
Transition_StopSound_Autosave
void Transition_StopSound_Autosave(const char *pMapName, MapStartPoint start_point)
Definition: Engine.cpp:2464
OS_IfShiftPressed
bool OS_IfShiftPressed()
Definition: Lin.cpp:18
_506348_current_lloyd_playerid
int _506348_current_lloyd_playerid
Definition: mm7_data.cpp:517
dword_4E45A8
std::array< int, 6 > dword_4E45A8
Definition: mm7_data.cpp:250
UIMSG_InstallBeacon
@ UIMSG_InstallBeacon
Definition: GUIWindow.h:146
DoInteractionWithTopmostZObject
char DoInteractionWithTopmostZObject(int a1, int a2)
Definition: Indoor.cpp:3716
pButton_RestUI_WaitUntilDawn
GUIButton * pButton_RestUI_WaitUntilDawn
Definition: GUIButton.cpp:37
UIMSG_CHEST_ClickItem
@ UIMSG_CHEST_ClickItem
Definition: GUIWindow.h:20
UIMainMenu.h
LEVEL_Outdoor
@ LEVEL_Outdoor
Definition: Indoor.h:287
Timer::Pause
void Pause()
Definition: Time.cpp:19
GAME_STATE_PARTY_DIED
@ GAME_STATE_PARTY_DIED
Definition: Engine.h:40
rest_ui_sky_frame_current
Image * rest_ui_sky_frame_current
Definition: UIRest.cpp:31
NPCData
Definition: NPC.h:79
UIMSG_SpellScrollUse
@ UIMSG_SpellScrollUse
Definition: GUIWindow.h:126
Player::skillShield
unsigned __int16 skillShield
Definition: Player.h:680
Application::GameFactory
Definition: GameFactory.h:10
SPEECH_CantRestHere
@ SPEECH_CantRestHere
Definition: Player.h:59
GUIWindow_Rest
Definition: UIRest.h:5
_4B4224_UpdateNPCTopics
void _4B4224_UpdateNPCTopics(int _this)
Definition: NPC.cpp:1110
UIMSG_DebugTownPortal
@ UIMSG_DebugTownPortal
Definition: GUIWindow.h:245
pPartyActionQueue
struct ActionQueue * pPartyActionQueue
Definition: Party.cpp:32
_50C9A0_IsEnchantingInProgress
bool _50C9A0_IsEnchantingInProgress
Definition: mm7_data.cpp:578
bFlashQuestBook
char bFlashQuestBook
Definition: mm7_data.cpp:549
PlayHouseSound
void PlayHouseSound(unsigned int uHouseID, HouseSoundID sound)
Definition: UIHouses.cpp:1036
OnSelectNPCDialogueOption
void OnSelectNPCDialogueOption(DIALOGUE_TYPE newDialogueType)
Definition: UIDialogue.cpp:660
pBtn_InstallRemoveSpell
GUIButton * pBtn_InstallRemoveSpell
Definition: GUIButton.cpp:15
MPlayer::HouseMovieLoop
void HouseMovieLoop()
Definition: MediaPlayer.cpp:653
GUIMessageQueue::PopMessage
void PopMessage(UIMessageType *pMsg, int *pParam, int *a4)
Definition: GUIWindow.cpp:174
MapInfo
Definition: MapInfo.h:35
UIMSG_BuyInShop_Identify_Repair
@ UIMSG_BuyInShop_Identify_Repair
Definition: GUIWindow.h:66
UIMSG_ClickAwardsUpBtn
@ UIMSG_ClickAwardsUpBtn
Definition: GUIWindow.h:136
UIMSG_Cancel
@ UIMSG_Cancel
Definition: GUIWindow.h:133
pGames_LOD
LOD::File * pGames_LOD
Definition: LOD.cpp:25
TE_WAIT
@ TE_WAIT
Definition: TurnEngine.h:20
Party::GetFood
int GetFood() const
Definition: Party.cpp:272
pCurrentMapName
String pCurrentMapName
Definition: mm7_data.cpp:712
LoadLevel_InitializeLevelEvt
void LoadLevel_InitializeLevelEvt()
Definition: Events.cpp:108
Party::CreateDefaultParty
void CreateDefaultParty(bool bDebugGiveItems=false)
Definition: Party.cpp:311
pPaletteManager
PaletteManager * pPaletteManager
Definition: PaletteManager.cpp:7
GetTerrainHeightsAroundParty2
int GetTerrainHeightsAroundParty2(int a1, int a2, bool *pIsOnWater, int bFloatAboveWater)
Definition: Outdoor.cpp:4044
Localization::GetAmPm
const char * GetAmPm(unsigned int index) const
Definition: Localization.h:79
Book_PageBtn3_flag
int Book_PageBtn3_flag
Definition: mm7_data.cpp:527
CycleCharacter
int CycleCharacter(bool backwards)
Definition: Player.cpp:6825
UIMSG_ClickInstallRemoveQuickSpellBtn
@ UIMSG_ClickInstallRemoveQuickSpellBtn
Definition: GUIWindow.h:73
UIMSG_DebugShowFPS
@ UIMSG_DebugShowFPS
Definition: GUIWindow.h:222
MENU_5
@ MENU_5
Definition: GUIWindow.h:256
UIMSG_DebugPickedFace
@ UIMSG_DebugPickedFace
Definition: GUIWindow.h:223
GAME_STATE_PLAYING
@ GAME_STATE_PLAYING
Definition: Engine.h:32
pBtn_Down
GUIButton * pBtn_Down
Definition: GUIButton.cpp:71
pMiscTimer
Timer * pMiscTimer
Definition: Time.cpp:7
GUIButton::uX
unsigned int uX
Definition: GUIButton.h:21
pBtn_GameSettings
GUIButton * pBtn_GameSettings
Definition: GUIButton.cpp:52
pSpellStats
struct SpellStats * pSpellStats
Definition: Spells.cpp:32
txt_file_frametable_parser
FrameTableTxtLine * txt_file_frametable_parser(const char *str_to_parse, FrameTableTxtLine *tokens_table)
Definition: FrameTableInc.cpp:8
Party::pTurnBasedPlayerRecoveryTimes
std::array< int, 4 > pTurnBasedPlayerRecoveryTimes
Definition: Party.h:322
CURRENT_SCREEN::SCREEN_INPUT_BLV
@ SCREEN_INPUT_BLV
Outdoor.h
CURRENT_SCREEN::SCREEN_BOOKS
@ SCREEN_BOOKS
Party::cNonHireFollowers
char cNonHireFollowers
Definition: Party.h:269
UIMSG_RentRoom
@ UIMSG_RentRoom
Definition: GUIWindow.h:196
VAR_Award
@ VAR_Award
Definition: Events.h:140
LEVEL_Indoor
@ LEVEL_Indoor
Definition: Indoor.h:286
town_portal_caster_id
char town_portal_caster_id
Definition: mm7_data.cpp:568
Party::GivePartyExp
void GivePartyExp(unsigned int pEXPNum)
Definition: Party.cpp:938
OutdoorLocation::SetFog
void SetFog()
Definition: Outdoor.cpp:483
dword_576E28
int dword_576E28
Definition: mm7_data.cpp:599
Player::skillBody
unsigned __int16 skillBody
Definition: Player.h:690
pButton_RestUI_Wait5Minutes
GUIButton * pButton_RestUI_Wait5Minutes
Definition: GUIButton.cpp:36
Party::pHirelings
std::array< NPCData, 2 > pHirelings
Definition: Party.h:311
Player::skillMind
unsigned __int16 skillMind
Definition: Player.h:689
Party::uNumGoldInBank
unsigned int uNumGoldInBank
Definition: Party.h:282
AudioPlayer.h
OBJECT_Player
@ OBJECT_Player
Definition: Actor.h:68
game_ui_status_bar_event_string_time_left
unsigned int game_ui_status_bar_event_string_time_left
Definition: mm7_data.cpp:639
Party::bTurnBasedModeOn
bool bTurnBasedModeOn
Definition: Party.h:305
s_SavedMapName
std::string s_SavedMapName
Definition: mm7_data.cpp:719
RestAndHeal
void RestAndHeal(int minutes)
Definition: Party.cpp:872
Party::CountHirelings
void CountHirelings()
Definition: Party.cpp:57
ClickNPCTopic
void ClickNPCTopic(int uMessageParam)
Definition: GUIWindow.cpp:1412
Rest
void Rest(unsigned int uMinsToRest)
Definition: Party.cpp:857
MENU_LoadingProcInMainMenu
@ MENU_LoadingProcInMainMenu
Definition: GUIWindow.h:260
UICharacter.h
PaletteManager::ResetNonLocked
int ResetNonLocked()
Definition: PaletteManager.cpp:588
CURRENT_SCREEN::SCREEN_CHANGE_LOCATION
@ SCREEN_CHANGE_LOCATION
CURRENT_SCREEN::SCREEN_GAME
@ SCREEN_GAME
Party::field_6E4
int field_6E4
Definition: Party.h:258
OnMapLeave
void OnMapLeave()
Definition: Engine.cpp:2312
Party::uCurrentDayOfMonth
unsigned int uCurrentDayOfMonth
Definition: Party.h:274
FrameTableInc.h
GAME_STATE_CHANGE_LOCATION
@ GAME_STATE_CHANGE_LOCATION
Definition: Engine.h:34
UIMSG_HiredNPC_CastSpell
@ UIMSG_HiredNPC_CastSpell
Definition: GUIWindow.h:123
Game_StartHirelingDialogue
void Game_StartHirelingDialogue(unsigned int hireling_id)
Definition: Game.cpp:255
pODMRenderParams
ODMRenderParams * pODMRenderParams
Definition: Outdoor.cpp:49
Player::skillDark
unsigned __int16 skillDark
Definition: Player.h:692
OS_IfCtrlPressed
bool OS_IfCtrlPressed()
Definition: Lin.cpp:23
pBooksButtonOverlay
GUIWindow * pBooksButtonOverlay
Definition: GUIWindow.cpp:59
UIShops.h
MapStats::sub_410D99_get_map_index
int sub_410D99_get_map_index(int a1)
Definition: MapInfo.cpp:213
UIMSG_DebugFullHeal
@ UIMSG_DebugFullHeal
Definition: GUIWindow.h:228
uDialogueType
unsigned int uDialogueType
Definition: mm7_data.cpp:604
UIMSG_CloseAfterInstallBeacon
@ UIMSG_CloseAfterInstallBeacon
Definition: GUIWindow.h:148
Player::classType
PLAYER_CLASS_TYPE classType
Definition: Player.h:639
ActionQueue::uNumActions
unsigned int uNumActions
Definition: Party.h:128
Point::y
unsigned int y
Definition: Point.h:8
pBtn_Book_3
GUIButton * pBtn_Book_3
Definition: GUIButton.cpp:21
GUIProgressBar::Release
void Release()
Definition: GUIProgressBar.cpp:88
CURRENT_SCREEN::SCREEN_NPC_DIALOGUE
@ SCREEN_NPC_DIALOGUE
CURRENT_SCREEN::SCREEN_MENU
@ SCREEN_MENU
OnCancel
Definition: GUIWindow.h:568
DIALOGUE_TYPE
DIALOGUE_TYPE
Definition: GUIWindow.h:266
CastSpellInfo::spell_target_pid
int spell_target_pid
Definition: CastSpellInfo.h:30
pOtherOverlayList
struct OtherOverlayList * pOtherOverlayList
Definition: Overlays.cpp:19
GetTravelTime
int GetTravelTime()
Definition: Party.cpp:1171
Party_Teleport_Z_Speed
int Party_Teleport_Z_Speed
Definition: mm7_data.cpp:627
HouseDialogPressCloseBtn
int HouseDialogPressCloseBtn()
Definition: UIHouses.cpp:3911
UIMSG_80
@ UIMSG_80
Definition: GUIWindow.h:111
UIMSG_Wait5Minutes
@ UIMSG_Wait5Minutes
Definition: GUIWindow.h:80
UIMSG_BF
@ UIMSG_BF
Definition: GUIWindow.h:158
Player::skillEarth
unsigned __int16 skillEarth
Definition: Player.h:687
uRequiredMana
unsigned int uRequiredMana
Definition: mm7_data.cpp:516
Game_StartDialogue
void Game_StartDialogue(unsigned int actor_id)
Definition: Game.cpp:244
SPEECH_108
@ SPEECH_108
Definition: Player.h:154
UIMSG_Rest8Hour
@ UIMSG_Rest8Hour
Definition: GUIWindow.h:82
Localization::GetMonthName
const char * GetMonthName(unsigned int index) const
Definition: Localization.h:19
UIStatusBar.h
UIMSG_OnCastTownPortal
@ UIMSG_OnCastTownPortal
Definition: GUIWindow.h:163
pKeyActionMap
struct KeyboardActionMapping * pKeyActionMap
Definition: Keyboard.cpp:35
UIMSG_OpenAutonotes
@ UIMSG_OpenAutonotes
Definition: GUIWindow.h:169
GUIWindow_MapBook
Definition: MapBook.h:6
pBtn_Autonotes_Misc
GUIButton * pBtn_Autonotes_Misc
Definition: GUIButton.cpp:17
Player::GetMajorConditionIdx
unsigned int GetMajorConditionIdx()
Definition: Player.cpp:2614
game_ui_statusbar
Image * game_ui_statusbar
Definition: UIGame.cpp:55
Player::vBeacons
std::vector< LloydBeacon > vBeacons
Definition: Player.h:794
v2
GLfloat GLfloat GLfloat v2
Definition: SDL_opengl_glext.h:695
flt_6BE3A4_debug_recmod1
float flt_6BE3A4_debug_recmod1
Definition: mm7_data.cpp:716
MENU_CREDITS
@ MENU_CREDITS
Definition: GUIWindow.h:253
MapInfo::Encounter_percent
char Encounter_percent
Definition: MapInfo.h:53
UIMSG_TransitionUI_Confirm
@ UIMSG_TransitionUI_Confirm
Definition: GUIWindow.h:198
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
pBtn_QuickReference
GUIButton * pBtn_QuickReference
Definition: GUIButton.cpp:53
uint
unsigned int uint
Definition: MM7.h:4
bGameoverLoop
int bGameoverLoop
Definition: mm7_data.cpp:785
UIMSG_ScrollNPCPanel
@ UIMSG_ScrollNPCPanel
Definition: GUIWindow.h:155
UIMSG_ChangeGameState
@ UIMSG_ChangeGameState
Definition: GUIWindow.h:16
uActiveCharacter
unsigned int uActiveCharacter
Definition: mm7_data.cpp:555
UIMSG_Wait1Hour
@ UIMSG_Wait1Hour
Definition: GUIWindow.h:81
Localization::FormatString
String FormatString(unsigned int index,...) const
Definition: Localization.cpp:17
Player::skillUnarmed
unsigned __int16 skillUnarmed
Definition: Player.h:703
GUIButton::uY
unsigned int uY
Definition: GUIButton.h:22
_449B7E_toggle_bit
void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle)
Definition: Party.cpp:1190
Player::SetBeacon
bool SetBeacon(size_t index, size_t power)
Definition: Player.cpp:8186
__debugbreak
void __cdecl __debugbreak(void)
CURRENT_SCREEN::SCREEN_REST
@ SCREEN_REST
ODMFace::Clickable
bool Clickable() const
Definition: BSPModel.h:108
pBtn_Autonotes_Instructors
GUIButton * pBtn_Autonotes_Instructors
Definition: GUIButton.cpp:16
SOUND_heal
@ SOUND_heal
Definition: AudioPlayer.h:73
pNPCStats
struct NPCStats * pNPCStats
Definition: NPC.cpp:29
books_page_number
int books_page_number
Definition: mm7_data.cpp:520
SPEECH_12
@ SPEECH_12
Definition: Player.h:58
UIMSG_ClickInventoryBtn
@ UIMSG_ClickInventoryBtn
Definition: GUIWindow.h:99
GameUI_StatusBar_OnEvent
void GameUI_StatusBar_OnEvent(const String &str, unsigned int num_seconds)
Definition: UIStatusBar.cpp:33
ODMFace
Definition: BSPModel.h:93
UIMSG_DebugFarClip
@ UIMSG_DebugFarClip
Definition: GUIWindow.h:220
LloydBeacon::SaveFileID
uint16_t SaveFileID
Definition: Player.h:278
pCharacterScreen_ExitBtn
GUIButton * pCharacterScreen_ExitBtn
Definition: GUIButton.cpp:41
OutdoorLocation::GetTravelDestination
bool GetTravelDestination(signed int sPartyX, signed int sPartyZ, char *pOut, signed int a5)
Definition: Outdoor.cpp:330
_45063B_spawn_some_monster
int _45063B_spawn_some_monster(MapInfo *a1, int a2)
Definition: Indoor.cpp:5298
Player::PlaySound
void PlaySound(PlayerSpeech speech, int a3)
Definition: Player.cpp:7874
UIMSG_ShowStatus_Food
@ UIMSG_ShowStatus_Food
Definition: GUIWindow.h:84
GameUI_StatusBar_ClearEventString
void GameUI_StatusBar_ClearEventString()
Definition: UIStatusBar.cpp:41
GAME_STATE_NEWGAME_OUT_GAMEMENU
@ GAME_STATE_NEWGAME_OUT_GAMEMENU
Definition: Engine.h:36
Decoration.h
GUIWindow::ptr_1C
void * ptr_1C
Definition: GUIWindow.h:476
Spellbook.h
ViewingParams::bRedrawGameUI
int bRedrawGameUI
Definition: Viewport.h:74
Player::skillAir
unsigned __int16 skillAir
Definition: Player.h:685
UIMSG_Attack
@ UIMSG_Attack
Definition: GUIWindow.h:27
LOD::File::GetSubNodeName
String GetSubNodeName(size_t index) const
Definition: LOD.h:71
OutdoorLocation::level_filename
String level_filename
Definition: Outdoor.h:111
dword_6BE364_game_settings_1
int dword_6BE364_game_settings_1
Definition: mm7_data.cpp:714
SoundID
SoundID
Definition: AudioPlayer.h:10
Application::Game::Run
void Run()
Definition: Game.cpp:100
UIMSG_Game_Action
@ UIMSG_Game_Action
Definition: GUIWindow.h:193
LoadGame
void LoadGame(unsigned int uSlot)
Definition: SaveLoad.cpp:77
Localization::GetDayName
const char * GetDayName(unsigned int index) const
Definition: Localization.h:15
EventProcessor
void EventProcessor(int uEventID, int targetObj, int canShowMessages, int entry_line)
Definition: Events.cpp:260
bRecallingBeacon
bool bRecallingBeacon
Definition: mm7_data.cpp:533
UIMSG_F
@ UIMSG_F
Definition: GUIWindow.h:23
Application::Game
Definition: Game.h:19
Mouse::SetCursorImage
void SetCursorImage(const String &name)
Definition: Mouse.cpp:38
uCurrentlyLoadedLevelType
LEVEL_TYPE uCurrentlyLoadedLevelType
Definition: Indoor.cpp:52
MapInfo::pFilename
String pFilename
Definition: MapInfo.h:39
PARTY_QUEST_FINISHED_EMERALD_ISLE
@ PARTY_QUEST_FINISHED_EMERALD_ISLE
Definition: Party.h:27
UIMSG_DebugSeasonsChange
@ UIMSG_DebugSeasonsChange
Definition: GUIWindow.h:221
Is_out15odm_underwater
char Is_out15odm_underwater()
Definition: Outdoor.cpp:3377
Party::uNumDeaths
unsigned int uNumDeaths
Definition: Party.h:283
UIMSG_ClickBooksBtn
@ UIMSG_ClickBooksBtn
Definition: GUIWindow.h:57
CURRENT_SCREEN::SCREEN_KEYBOARD_OPTIONS
@ SCREEN_KEYBOARD_OPTIONS
_50C9D8_AfterEnchClickEventTimeout
int _50C9D8_AfterEnchClickEventTimeout
Definition: mm7_data.cpp:582
IndoorLocation::GetSector
int GetSector(int sX, int sY, int sZ)
Definition: Indoor.cpp:1279
IndoorLocation::pFaces
struct BLVFace * pFaces
Definition: Indoor.h:630
ODMRenderParams::far_clip
int far_clip
Definition: IRender.h:77
WINDOW_CharacterWindow_Awards
@ WINDOW_CharacterWindow_Awards
Definition: GUIWindow.h:329
uLevel_StartingPointType
MapStartPoint uLevel_StartingPointType
Definition: Outdoor.cpp:46
OnCancel2
Definition: GUIWindow.h:578
ObjectList::pObjects
struct ObjectDesc * pObjects
Definition: ObjectList.h:54
LloydBeacon
Definition: Player.h:254
LODFile_IconsBitmaps::_inlined_sub1
void _inlined_sub1()
Definition: LOD.cpp:42
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
Keyboard::IsKeyBeingHeld
static bool IsKeyBeingHeld(int vKey)
Definition: Keyboard.cpp:322
UIMSG_DebugPortalLines
@ UIMSG_DebugPortalLines
Definition: GUIWindow.h:224
Application::GameFactory::CreateGame
std::shared_ptr< Game > CreateGame(const std::string &command_line)
Definition: GameFactory.cpp:17
Localization::GetClassName
const char * GetClassName(unsigned int index) const
Definition: Localization.h:35
pModalWindow
GUIWindow * pModalWindow
Definition: GUIWindow.cpp:57
Player::CanCastSpell
bool CanCastSpell(unsigned int uRequiredMana)
Definition: Player.cpp:280
ArcomageGame::PrepareArcomage
static void PrepareArcomage()
Definition: Arcomage.cpp:2982
Condition_Eradicated
@ Condition_Eradicated
Definition: Conditions.h:24
pBtn_NPCRight
GUIButton * pBtn_NPCRight
Definition: GUIButton.cpp:50
string
GLsizei const GLchar *const * string
Definition: SDL_opengl_glext.h:691
UISaveLoad.h
SOUND_StartMainChoice02
@ SOUND_StartMainChoice02
Definition: AudioPlayer.h:37
OnTimer
void OnTimer(int)
Definition: Engine.cpp:2479
_50C9D4_AfterEnchClickEventSecondParam
int _50C9D4_AfterEnchClickEventSecondParam
Definition: mm7_data.cpp:581
GUIMessageQueue::Clear
void Clear()
Definition: GUIWindow.cpp:169
GUIWindow.h
Point
Definition: Point.h:3
PrepareToLoadODM
void PrepareToLoadODM(unsigned int bLoading, ODMRenderParams *a2)
Definition: Engine.cpp:1319
dword_6BE138
int dword_6BE138
Definition: mm7_data.cpp:704
pBtn_ZoomIn
GUIButton * pBtn_ZoomIn
Definition: mm7_data.cpp:551
ObjectList.h
pMessageQueue_50CBD0
struct GUIMessageQueue * pMessageQueue_50CBD0
Definition: GUIWindow.cpp:86
GUIWindow_LloydsBook
Definition: LloydsBook.h:4
CastSpellInfoHelpers::Cancel_Spell_Cast_In_Progress
void Cancel_Spell_Cast_In_Progress()
Definition: CastSpellInfo.cpp:4350
PlayerSpeech
PlayerSpeech
Definition: Player.h:46
sRecoveryTime
signed int sRecoveryTime
Definition: mm7_data.cpp:515
pBtn_Up
GUIButton * pBtn_Up
Definition: GUIButton.cpp:70
UIMSG_HintTownPortal
@ UIMSG_HintTownPortal
Definition: GUIWindow.h:149
pOutdoor
OutdoorLocation * pOutdoor
Definition: Outdoor.cpp:48
UpdateUserInput_and_MapSpecificStuff
void UpdateUserInput_and_MapSpecificStuff()
Definition: Engine.cpp:766
GUIProgressBar::Progress
void Progress()
Definition: GUIProgressBar.cpp:83
_50C9A8_item_enchantment_timer
int _50C9A8_item_enchantment_timer
Definition: mm7_data.cpp:579
pBtn_CastSpell
GUIButton * pBtn_CastSpell
Definition: GUIButton.cpp:54
UICredits.h
some_active_character
int some_active_character
Definition: mm7_data.cpp:569
Application::Game::EventLoop
void EventLoop()
Definition: Game.cpp:322
Application::Configuration
Definition: Configuration.h:7
LloydBeacon::uBeaconTime
GameTime uBeaconTime
Definition: Player.h:271
ArcomageGame::bGameInProgress
char bGameInProgress
Definition: Arcomage.h:162
Party::uCurrentYear
unsigned int uCurrentYear
Definition: Party.h:271
CURRENT_SCREEN::SCREEN_VIDEO_OPTIONS
@ SCREEN_VIDEO_OPTIONS
CURRENT_SCREEN::SCREEN_67
@ SCREEN_67
Player::uQuickSpell
unsigned __int8 uQuickSpell
Definition: Player.h:774
Player::skillSpirit
unsigned __int16 skillSpirit
Definition: Player.h:688
pGUIWindow_CastTargetedSpell
GUIWindow * pGUIWindow_CastTargetedSpell
Definition: GUIWindow.cpp:56
StringPrintf
String StringPrintf(const char *fmt,...)
Definition: Strings.cpp:9
GUIProgressBar.h
Player::skillMace
unsigned __int16 skillMace
Definition: Player.h:678
dword_5C341C
int dword_5C341C
Definition: mm7_data.cpp:635
Party::AddGold
static void AddGold(int amount)
Definition: Party.cpp:287
UIMSG_OpenMapBook
@ UIMSG_OpenMapBook
Definition: GUIWindow.h:170
Application::Game::OnEscape
void OnEscape()
Definition: Game.cpp:300
Party_Teleport_Z_Pos
int Party_Teleport_Z_Pos
Definition: mm7_data.cpp:624
GameTime::AddDays
void AddDays(int days)
Definition: Time.h:51
stru262_TurnBased::field_18
int field_18
Definition: TurnEngine.h:80
Party::sRotationY
int sRotationY
Definition: Party.h:251
stru262_TurnBased::turn_stage
int turn_stage
Definition: TurnEngine.h:75
SPEECH_99
@ SPEECH_99
Definition: Player.h:145
DecalBuilder.h
pBtn_Book_6
GUIButton * pBtn_Book_6
Definition: GUIButton.cpp:18
UIMSG_DebugSpecialItem
@ UIMSG_DebugSpecialItem
Definition: GUIWindow.h:218
String
std::string String
Definition: Strings.h:10
byte_4ED970_skill_learn_ability_by_class_table
std::array< std::array< char, 37 >, 36 > byte_4ED970_skill_learn_ability_by_class_table
Definition: mm7_data.cpp:425
Keyboard.h
pChestWindow
GUIWindow * pChestWindow
Definition: GUIWindow.cpp:49
Application::Game::engine
std::shared_ptr< Engine > engine
Definition: Game.h:43
GameUI_InitializeDialogue
void GameUI_InitializeDialogue(Actor *actor, int bPlayerSaysHello)
Definition: UIDialogue.cpp:25
PrepareWorld
void PrepareWorld(unsigned int _0_box_loading_1_fullscreen)
Definition: Engine.cpp:781
UIMSG_StartHireling1Dialogue
@ UIMSG_StartHireling1Dialogue
Definition: GUIWindow.h:116
NPCData::field_24
int field_24
Definition: NPC.h:92
UIMSG_SelectNPCDialogueOption
@ UIMSG_SelectNPCDialogueOption
Definition: GUIWindow.h:118
pEventTimer
Timer * pEventTimer
Definition: Time.cpp:8
Sprites.h
GameTime
Definition: Time.h:14
UIMSG_DebugTurboSpeed
@ UIMSG_DebugTurboSpeed
Definition: GUIWindow.h:232
MapStartPoint_Party
@ MapStartPoint_Party
Definition: MapInfo.h:28
config
EGLConfig config
Definition: SDL_egl.h:1149
Party::GetGold
int GetGold() const
Definition: Party.cpp:264
Player::skillPerception
unsigned __int16 skillPerception
Definition: Player.h:698
UIMSG_ClickStatsBtn
@ UIMSG_ClickStatsBtn
Definition: GUIWindow.h:98
Application::Game::mouse
Mouse * mouse
Definition: Game.h:45
UIMSG_ClickPaperdoll
@ UIMSG_ClickPaperdoll
Definition: GUIWindow.h:115
OS_WaitMessage
void OS_WaitMessage()
Definition: Lin.cpp:32
_2devent::_quest_related
int16_t _quest_related
Definition: Events2D.h:59
Autonotes_Instructors_page_flag
int Autonotes_Instructors_page_flag
Definition: mm7_data.cpp:522
Actor::InitializeActors
static void InitializeActors()
Definition: Actor.cpp:3334
UIMSG_OpenSpellbookPage
@ UIMSG_OpenSpellbookPage
Definition: GUIWindow.h:72
FrameTableTxtLine
Definition: FrameTableInc.h:11
pObjectList
struct ObjectList * pObjectList
Definition: ObjectList.cpp:5
Image::Release
bool Release()
Definition: Image.cpp:335
UIMSG_ClickZoomOutBtn
@ UIMSG_ClickZoomOutBtn
Definition: GUIWindow.h:190
ItemsTable::pItems
NZIArray< ItemDesc, 800 > pItems
Definition: Items.h:460
Party::SetGold
static void SetGold(int amount)
Definition: Party.cpp:281
Mouse.h
SaveGame
void SaveGame(bool IsAutoSAve, bool NotSaveWorld)
Definition: SaveLoad.cpp:238
Player::_42ECB5_PlayerAttacksActor
static void _42ECB5_PlayerAttacksActor()
Definition: Player.cpp:7643
CastSpellInfo.h
CURRENT_SCREEN::SCREEN_VIDEO
@ SCREEN_VIDEO
OtherOverlayList::Reset
void Reset()
Definition: Overlays.cpp:24
CURRENT_SCREEN::SCREEN_63
@ SCREEN_63
UIQuickReference.h
TE_HAVE_PENDING_ACTIONS
@ TE_HAVE_PENDING_ACTIONS
Definition: TurnEngine.h:5
Application::Game::config
std::shared_ptr< const Configuration > config
Definition: Game.h:42
UIMSG_DebugNoDamage
@ UIMSG_DebugNoDamage
Definition: GUIWindow.h:227
Party::alignment
PartyAlignment alignment
Definition: Party.h:308
Player::skillFire
unsigned __int16 skillFire
Definition: Player.h:684
BLVFace::uFaceExtraID
uint16_t uFaceExtraID
Definition: Indoor.h:482
Party::GiveFood
static void GiveFood(int amount)
Definition: Party.cpp:255
CastSpellInfoHelpers::_427E01_cast_spell
void _427E01_cast_spell()
Definition: CastSpellInfo.cpp:46
Vis.h
Time.h
Condition_Sleep
@ Condition_Sleep
Definition: Conditions.h:10
CURRENT_SCREEN::SCREEN_CHEST_INVENTORY
@ SCREEN_CHEST_INVENTORY
Player::spellbook
PlayerSpells spellbook
Definition: Player.h:716
CURRENT_SCREEN::SCREEN_64
@ SCREEN_64
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52