World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
UIGame.cpp
См. документацию.
1 #include "GUI/UI/UIGame.h"
2 
3 #include "src/Application/Game.h"
4 
5 #include "Engine/AssetsManager.h"
6 #include "Engine/Engine.h"
7 #include "Engine/Events.h"
8 #include "Engine/LOD.h"
9 #include "Engine/Localization.h"
10 #include "Engine/MapInfo.h"
11 #include "Engine/OurMath.h"
12 #include "Engine/Party.h"
13 #include "Engine/Time.h"
14 #include "Engine/stru123.h"
15 
18 
20 
23 #include "Engine/Graphics/Image.h"
30 #include "Engine/Graphics/Vis.h"
31 
32 #include "Engine/Objects/Actor.h"
33 #include "Engine/Objects/Chest.h"
36 
37 #include "IO/Keyboard.h"
38 #include "IO/Mouse.h"
39 
40 #include "GUI/GUIButton.h"
41 #include "GUI/GUIFont.h"
42 #include "GUI/GUIWindow.h"
43 #include "GUI/UI/UICharacter.h"
44 #include "GUI/UI/UIDialogue.h"
45 #include "GUI/UI/UIHouses.h"
46 #include "GUI/UI/UIStatusBar.h"
47 
49 
50 
52 
54 
60 
67 
68 Image *game_ui_minimap_frame = nullptr; // 5079D8
69 Image *game_ui_minimap_compass = nullptr; // 5079B4
70 std::array<Image *, 8> game_ui_minimap_dirs;
71 
79 
85 
92 
94 
100 std::array<Image *, 5> game_ui_options_controls;
101 
102 Image *game_ui_evtnpc = nullptr; // 50795C
103 
104 std::array<std::array<Image *, 56>, 4> game_ui_player_faces;
107 
109 Image *game_ui_player_alert_yellow = nullptr; // 5079C8
110 Image *game_ui_player_alert_red = nullptr; // 5079CC
111 Image *game_ui_player_alert_green = nullptr; // 5079D0
112 
117 
122 
124  : GUIWindow(WINDOW_GameMenu, 0, 0, window->GetWidth(), window->GetHeight(), 0) {
125  game_ui_menu_options = assets->GetImage_ColorKey("options", 0x7FF);
126  game_ui_menu_new = assets->GetImage_ColorKey("new1", 0x7FF);
127  game_ui_menu_load = assets->GetImage_ColorKey("load1", 0x7FF);
128  game_ui_menu_save = assets->GetImage_ColorKey("save1", 0x7FF);
129  game_ui_menu_controls = assets->GetImage_ColorKey("controls1", 0x7FF);
130  game_ui_menu_resume = assets->GetImage_ColorKey("resume1", 0x7FF);
131  game_ui_menu_quit = assets->GetImage_ColorKey("quit1", 0x7FF);
132 
133  pBtn_NewGame = CreateButton(0x13u, 0x9Bu, 0xD6u, 0x28u, 1, 0,
134  UIMSG_StartNewGame, 0, 0x4Eu,
135  localization->GetString(614), // "New Game"
136  {{game_ui_menu_new}});
137  pBtn_SaveGame = CreateButton(0x13u, 0xD1u, 0xD6u, 0x28u, 1, 0,
139  localization->GetString(615), // "Save Game"
140  {{game_ui_menu_save}});
141  pBtn_LoadGame = CreateButton(19, 263, 0xD6u, 0x28u, 1, 0,
143  localization->GetString(616), // "Load Game"
144  {{game_ui_menu_load}});
145  pBtn_GameControls = CreateButton(
146  241, 155, 214, 40, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0x43u,
147  localization->GetString(617), // ""Sound, Keyboard, Game Options:""
148  {{game_ui_menu_controls}});
149  pBtn_QuitGame = CreateButton(241, 209, 214, 40, 1, 0, UIMSG_Quit, 0, 0x51u,
150  localization->GetString(618), // "Quit"
151  {{game_ui_menu_quit}});
152  pBtn_Resume = CreateButton(
153  241, 263, 214, 40, 1, 0, UIMSG_GameMenu_ReturnToGame, 0, 0x52u,
154  localization->GetString(619), // "Return to Game"
155  {{game_ui_menu_resume}});
156  _41D08F_set_keyboard_control_group(6, 1, 0, 0);
157 }
158 
160  // -----------------------------------
161  // 004156F0 GUI_UpdateWindows --- part
162  render->DrawTextureAlphaNew(pViewport->uViewportTL_X / 640.0f,
163  pViewport->uViewportTL_Y / 480.0f,
165 
166  viewparams->bRedrawGameUI = true;
167 }
168 
169 //----- (00491CB5) --------------------------------------------------------
171  for (uint i = 0; i < 4; ++i) {
172  for (uint j = 0; j < 56; ++j) {
174  StringPrintf(
175  "%s%02d",
176  pPlayerPortraitsNames[pParty->pPlayers[i].uCurrentFace],
177  j + 1),
178  0x7FF);
179  }
180  }
181 
183  assets->GetImage_ColorKey("ERADCATE", 0x7FF);
185  /*
186  if (SoundSetAction[24][0])
187  {
188  for (uint i = 0; i < 4; ++i)
189  {
190  pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 *
191  pParty->pPlayers[i].uVoiceID) + 4998, 0); pSoundList->LoadSound(2 *
192  (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4999, 0);
193  }
194  }
195  */
196 }
197 
198 //----- (00491DE7) --------------------------------------------------------
200  int player_id,
201  int face_id) { // the transition from the zombies to the normal state
202  for (uint i = 0; i <= 55; ++i) {
203  auto filename =
204  StringPrintf("%s%02d", pPlayerPortraitsNames[face_id], i + 1);
205  game_ui_player_faces[player_id][i] =
206  assets->GetImage_ColorKey(filename, 0x7FF);
207  }
208 }
209 
210 std::array<bool, 28> GameMenuUI_InvaligKeyBindingsFlags; // 506E6C
211 //----- (00414D24) --------------------------------------------------------
212 static unsigned int GameMenuUI_GetKeyBindingColor(int key_index) {
213  if (uGameMenuUI_CurentlySelectedKeyIdx == key_index) {
214  if (OS_GetTime() % 1000 < 500)
216  else
218  } else if (GameMenuUI_InvaligKeyBindingsFlags[key_index]) {
219  int intensity;
220 
221  int time = OS_GetTime() % 800;
222  if (time < 400)
223  intensity = -70 + 70 * time / 400;
224  else
225  intensity = +70 - 70 * time / 800;
226 
227  return Color16(185 + intensity, 40 + intensity / 4, 40 + intensity / 4);
228  }
229 
231 }
232 
234  : GUIWindow(WINDOW_KeyMappingOptions, 0, 0, window->GetWidth(), window->GetHeight(), 0) {
235  game_ui_options_controls[0] = assets->GetImage_ColorKey("optkb", 0x7FF);
236  game_ui_options_controls[1] = assets->GetImage_ColorKey("optkb_h", 0x7FF);
237  game_ui_options_controls[2] = assets->GetImage_ColorKey("resume1", 0x7FF);
238  game_ui_options_controls[3] = assets->GetImage_ColorKey("optkb_1", 0x7FF);
239  game_ui_options_controls[4] = assets->GetImage_ColorKey("optkb_2", 0x7FF);
240 
241  CreateButton(241, 302, 214, 40, 1, 0, UIMSG_Escape, 0, 0, "");
242 
243  CreateButton(19, 302, 108, 20, 1, 0, UIMSG_SelectKeyPage1, 0, 0, "");
244  CreateButton(127, 302, 108, 20, 1, 0, UIMSG_SelectKeyPage2, 0, 0, "");
245  CreateButton(127, 324, 108, 20, 1, 0, UIMSG_ResetKeyMapping, 0, 0, "");
246  CreateButton(19, 324, 108, 20, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0,
247  "");
248 
249  CreateButton(129, 148, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 0, 0, "");
250  CreateButton(129, 167, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 1, 0, "");
251  CreateButton(129, 186, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 2, 0, "");
252  CreateButton(129, 205, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 3, 0, "");
253  CreateButton(129, 224, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 4, 0, "");
254  CreateButton(129, 243, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 5, 0, "");
255  CreateButton(129, 262, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 6, 0, "");
256 
257  CreateButton(350, 148, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 7, 0, "");
258  CreateButton(350, 167, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 8, 0, "");
259  CreateButton(350, 186, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 9, 0, "");
260  CreateButton(350, 205, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 10, 0, "");
261  CreateButton(350, 224, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 11, 0, "");
262  CreateButton(350, 243, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 12, 0, "");
263  CreateButton(350, 262, 70, 19, 1, 0, UIMSG_ChangeKeyButton, 13, 0, "");
264 
266  KeyboardPageNum = 1;
267  memset(GameMenuUI_InvaligKeyBindingsFlags.data(), 0,
269  memcpy(pPrevVirtualCidesMapping.data(),
271 }
272 
273 //----- (004142D3) --------------------------------------------------------
275  int v4; // ecx@7
276  int v5; // eax@8
277 
278  if (pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) {
279  // turn key press to caps
280  int keypr = pKeyActionMap->pPressedKeysBuffer[0];
281  if (keypr >= 97 && keypr <= 122) keypr -= 32;
282 
284  // pKeyActionMap->pPressedKeysBuffer[0];
285  memset(GameMenuUI_InvaligKeyBindingsFlags.data(), 0,
287  v4 = 0;
288  do {
289  v5 = 0;
290  do {
291  if (v4 != v5 && pPrevVirtualCidesMapping[v4] ==
295  }
296  ++v5;
297  } while (v5 < 28);
298  ++v4;
299  } while (v4 < 28);
302  }
303 
304  render->DrawTextureAlphaNew(
305  8 / 640.0f, 8 / 480.0f,
306  game_ui_options_controls[0]); // draw base texture
307  if (KeyboardPageNum == 1) {
308  render->DrawTextureAlphaNew(19 / 640.0f, 302 / 480.0f,
310 
313  "FORWARD", 0, 0, 0);
317  0, 0);
320  "BACKWARD", 0, 0, 0);
324  0, 0);
327  "LEFT", 0, 0, 0);
331  0, 0);
334  "RIGHT", 0, 0, 0);
338  0, 0);
341  "YELL", 0, 0, 0);
345  0, 0);
348  "JUMP", 0, 0, 0);
352  0, 0);
355  "COMBAT", 0, 0, 0);
359  0, 0);
362  "CAST READY", 0, 0, 0);
366  0, 0);
369  "ATTACK", 0, 0, 0);
373  0, 0);
376  "TRIGGER", 0, 0, 0);
380  0, 0);
383  "CAST", 0, 0, 0);
387  0, 0);
390  "PASS", 0, 0, 0);
394  0, 0);
397  "CHAR CYCLE", 0, 0, 0);
401  0, 0);
404  "QUEST", 0, 0, 0);
408  0, 0);
409  } else {
410  render->DrawTextureAlphaNew(127 / 640.0f, 302 / 480.0f,
412 
415  "QUICK REF", 0, 0, 0);
419  0, 0);
422  "REST", 0, 0, 0);
426  0, 0);
429  "TIME/CAL", 0, 0, 0);
433  0, 0);
436  "AUTONOTES", 0, 0, 0);
440  0, 0);
443  "MAP BOOK", 0, 0, 0);
447  0, 0);
450  "ALWAYS RUN", 0, 0, 0);
454  0, 0);
457  "LOOK UP", 0, 0, 0);
461  0, 0);
464  "LOOK DOWN", 0, 0, 0);
468  0, 0);
471  "CTR VIEW", 0, 0, 0);
475  0, 0);
478  "ZOOM IN", 0, 0, 0);
482  0, 0);
485  "ZOOM OUT", 0, 0, 0);
489  0, 0);
492  "FLY UP", 0, 0, 0);
496  0, 0);
499  "FLY DOWN", 0, 0, 0);
503  0, 0);
506  "LAND", 0, 0, 0);
510  0, 0);
511  }
512 }
513 
515  : GUIWindow(WINDOW_VideoOptions, 0, 0, window->GetWidth(), window->GetHeight(), 0) {
516  // -------------------------------------
517  // GameMenuUI_OptionsVideo_Load --- part
519  assets->GetImage_ColorKey("optvid", 0x7FF);
521  assets->GetImage_ColorKey("opvdH-bs", 0x7FF);
523  assets->GetImage_ColorKey("opvdH-cl", 0x7FF);
525  assets->GetImage_ColorKey("opvdH-tn", 0x7FF);
526 
528  assets->GetImage_ColorKey("convol10", 0x7FF);
530  assets->GetImage_ColorKey("convol20", 0x7FF);
532  assets->GetImage_ColorKey("convol30", 0x7FF);
534  assets->GetImage_ColorKey("convol40", 0x7FF);
536  assets->GetImage_ColorKey("convol50", 0x7FF);
538  assets->GetImage_ColorKey("convol60", 0x7FF);
540  assets->GetImage_ColorKey("convol70", 0x7FF);
542  assets->GetImage_ColorKey("convol80", 0x7FF);
544  assets->GetImage_ColorKey("convol90", 0x7FF);
546  assets->GetImage_ColorKey("convol00", 0x7FF);
547  // not_available_bloodsplats_texture_id =
548  // pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE);
549  // not_available_us_colored_lights_texture_id =
550  // pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE);
551  // not_available_tinting_texture_id = pIcons_LOD->LoadTexture("opvdG-tn",
552  // TEXTURE_16BIT_PALETTE);
553 
554  CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "");
555  // if ( render->pRenderD3D )
556  {
557  CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleBloodsplats,
558  0, 0, "");
559  CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, 1, 0,
560  UIMSG_ToggleColoredLights, 0, 0, "");
561  CreateButton(0x13u, 0x144u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleTint, 0, 0,
562  "");
563  }
564 }
565 
566 //----- (00414D9A) --------------------------------------------------------
568  // -----------------------------------
569  // 004156F0 GUI_UpdateWindows --- part
570  GUIWindow msg_window; // [sp+8h] [bp-54h]@3
571 
572  render->DrawTextureAlphaNew(
573  8 / 640.0f, 8 / 480.0f,
574  game_ui_menu_options_video_background); // draw base texture
575  // if ( !render->bWindowMode && render->IsGammaSupported() )
576  {
577  render->DrawTextureAlphaNew(
578  (17 * uGammaPos + 42) / 640.0f, 162 / 480.0f,
580 
581  render->DrawTextureNew(274 / 640.0f, 169 / 480.0f, gamma_preview_image);
582  msg_window.uFrameX = 22;
583  msg_window.uFrameY = 190;
584  msg_window.uFrameWidth = 211;
585  msg_window.uFrameHeight = 79;
586  msg_window.uFrameZ = 232;
587  msg_window.uFrameW = 268;
588  msg_window.DrawTitleText(
590  localization->GetString(226),
591  3); // "Gamma controls the relative ""brightness"" of the game. May
592  // vary depending on your monitor."
593  }
594 
595  if (!engine->config->NoBloodsplats())
596  render->DrawTextureAlphaNew(20 / 640.0f, 281 / 480.0f,
598  if (render->config->is_using_colored_lights)
599  render->DrawTextureAlphaNew(20 / 640.0f, 303 / 480.0f,
601  if (render->config->is_tinting)
602  render->DrawTextureAlphaNew(20 / 640.0f, 325 / 480.0f,
604 }
605 
608  : uTextureID_Background(0),
609  uTextureID_ArrowLeft(0),
610  uTextureID_ArrowRight(0),
611  uTextureID_unused_0(0),
612  uTextureID_unused_1(0),
613  uTextureID_unused_2(0),
614  uTextureID_FlipOnExit(0),
615  uTextureID_AlwaysRun(0),
616  uTextureID_WalkSound(0),
617  uTextureID_ShowDamage(0) {
618  for (uint i = 0; i < 3; ++i) uTextureID_TurnSpeed[i] = 0;
619  for (uint i = 0; i < 10; ++i) uTextureID_SoundLevels[i] = 0;
620 }
621 
623 #define RELEASE(img) \
624  { \
625  if (img) { \
626  img->Release(); \
627  img = nullptr; \
628  } \
629  }
630 
631  RELEASE(uTextureID_Background);
632  for (uint i = 0; i < 3; ++i) RELEASE(uTextureID_TurnSpeed[i]);
633  RELEASE(uTextureID_ArrowLeft);
634  RELEASE(uTextureID_ArrowRight);
635  RELEASE(uTextureID_FlipOnExit);
636  for (uint i = 0; i < 10; ++i) RELEASE(uTextureID_SoundLevels[i]);
637  RELEASE(uTextureID_AlwaysRun);
638  RELEASE(uTextureID_WalkSound);
639  RELEASE(uTextureID_ShowDamage);
640 
641 #undef RELEASE
642 }
643 
645  : GUIWindow(WINDOW_GameOptions, 0, 0, window->GetWidth(), window->GetHeight(), 0) {
647  assets->GetImage_ColorKey("ControlBG", 0x7FF);
649  assets->GetImage_ColorKey("con_16x", 0x7FF);
651  assets->GetImage_ColorKey("con_32x", 0x7FF);
653  assets->GetImage_ColorKey("con_Smoo", 0x7FF);
656  assets->GetImage_Alpha("con_ArrR");
658  assets->GetImage_ColorKey("convol10", 0x7FF);
660  assets->GetImage_ColorKey("convol20", 0x7FF);
662  assets->GetImage_ColorKey("convol30", 0x7FF);
664  assets->GetImage_ColorKey("convol40", 0x7FF);
666  assets->GetImage_ColorKey("convol50", 0x7FF);
668  assets->GetImage_ColorKey("convol60", 0x7FF);
670  assets->GetImage_ColorKey("convol70", 0x7FF);
672  assets->GetImage_ColorKey("convol80", 0x7FF);
674  assets->GetImage_ColorKey("convol90", 0x7FF);
676  assets->GetImage_ColorKey("convol00", 0x7FF);
678  assets->GetImage_ColorKey("option04", 0x7FF);
680  assets->GetImage_ColorKey("option03", 0x7FF);
682  assets->GetImage_ColorKey("option02", 0x7FF);
684  assets->GetImage_ColorKey("option01", 0x7FF);
685 
688  UIMSG_SetTurnSpeed, 0x80, 0, "");
691  UIMSG_SetTurnSpeed, 0x40u, 0, "");
692  CreateButton(164, 270,
695  UIMSG_SetTurnSpeed, 0, 0, "");
696 
699  UIMSG_ToggleWalkSound, 0, 0, "");
702  UIMSG_ToggleShowDamage, 0, 0, "");
705  UIMSG_ToggleAlwaysRun, 0, 0, "");
708  UIMSG_ToggleFlipOnExit, 0, 0, "");
709 
711  CreateButton(243, 162, 16, 16, 1, 0, UIMSG_ChangeSoundVolume, 4, 0, "",
714  CreateButton(435, 162, 16, 16, 1, 0, UIMSG_ChangeSoundVolume, 5, 0, "",
716  CreateButton(263, 162, 172, 17, 1, 0, UIMSG_ChangeSoundVolume, 0, 0, "");
717 
719  CreateButton(243, 216, 16, 16, 1, 0, UIMSG_ChangeMusicVolume, 4, 0, "",
722  CreateButton(435, 216, 16, 16, 1, 0, UIMSG_ChangeMusicVolume, 5, 0, "",
724  CreateButton(263, 216, 172, 17, 1, 0, UIMSG_ChangeMusicVolume, 0, 0, "");
725 
727  CreateButton(243, 270, 16, 16, 1, 0, UIMSG_ChangeVoiceVolume, 4, 0, "",
730  CreateButton(435, 270, 16, 16, 1, 0, UIMSG_ChangeVoiceVolume, 5, 0, "",
732  CreateButton(263, 270, 172, 17, 1, 0, UIMSG_ChangeVoiceVolume, 0, 0, "");
733 
734  CreateButton(241, 302, 214, 40, 1, 0, UIMSG_Escape, 0, 0,
735  localization->GetString(619)); // "Return to Game"
736  CreateButton(19, 140, 214, 40, 1, 0, UIMSG_OpenKeyMappingOptions, 0, 0x4Bu,
737  "");
738  CreateButton(19, 194, 214, 40, 1, 0, UIMSG_OpenVideoOptions, 0, 86, "");
739 }
740 
742  render->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f, game_ui_menu_options);
743  render->DrawTextureAlphaNew(8 / 640.0f, 132 / 480.0f,
745 
746  switch (engine->config->turn_speed) {
747  case 64:
748  render->DrawTextureAlphaNew(
749  BtnTurnCoord[1] / 640.0f, 270 / 480.0f,
751  break;
752  case 128:
753  render->DrawTextureAlphaNew(
754  BtnTurnCoord[2] / 640.0f, 270 / 480.0f,
756  break;
757  default:
758  render->DrawTextureAlphaNew(
759  BtnTurnCoord[0] / 640.0f, 270 / 480.0f,
761  break;
762  }
763 
764  if (!engine->config->no_walk_sound) {
765  render->DrawTextureAlphaNew(
766  20 / 640.0f, 303 / 480.0f,
768  }
769  if (engine->config->show_damage) {
770  render->DrawTextureAlphaNew(
771  128 / 640.0f, 303 / 480.0f,
773  }
774  if (engine->config->flip_on_exit) {
775  render->DrawTextureAlphaNew(
776  128 / 640.0f, 325 / 480.0f,
778  }
779  if (engine->config->always_run) {
780  render->DrawTextureAlphaNew(
781  20 / 640.0f, 325 / 480.0f,
783  }
784 
785  render->DrawTextureAlphaNew(
786  (265 + 17 * engine->config->sound_level) / 640.0f, 162 / 480.0f,
787  options_menu_skin.uTextureID_SoundLevels[engine->config->sound_level]);
788  render->DrawTextureAlphaNew(
789  (265 + 17 * engine->config->music_level) / 640.0f, 216 / 480.0f,
790  options_menu_skin.uTextureID_SoundLevels[engine->config->music_level]);
791  render->DrawTextureAlphaNew(
792  (265 + 17 * engine->config->voice_level) / 640.0f, 270 / 480.0f,
793  options_menu_skin.uTextureID_SoundLevels[engine->config->voice_level]);
794 }
795 
796 void GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID) {
797  Player *player = &pParty->pPlayers[uPlayerID - 1];
798  if (pParty->pPickedItem.uItemID) {
799  if (int slot = player->AddItem(-1, pParty->pPickedItem.uItemID)) {
800  memcpy(&player->pInventoryItemList[slot - 1], &pParty->pPickedItem,
801  0x24u);
802  viewparams->bRedrawGameUI = true;
804  return;
805  }
806 
807  if (!player->CanAct()) {
808  player = pPlayers[uActiveCharacter];
809  }
810  if (player->CanAct() || !pPlayers[uActiveCharacter]->CanAct()) {
811  player->PlaySound(SPEECH_NoRoom, 0);
812  }
813  }
814 
816  viewparams->bRedrawGameUI = true;
817  if (uActiveCharacter != uPlayerID) {
818  if (pPlayers[uPlayerID]->uTimeToRecovery || !pPlayers[uPlayerID]->CanAct()) {
819  return;
820  }
821 
822  uActiveCharacter = uPlayerID;
823  return;
824  }
827  CURRENT_SCREEN::SCREEN_CHARACTERS); // CharacterUI_Initialize(SCREEN_CHARACTERS);
828  return;
829  }
832  viewparams->bRedrawGameUI = true;
833  if (uActiveCharacter == uPlayerID) {
836  uActiveCharacter = uPlayerID;
837  return;
838  }
839  if (pPlayers[uPlayerID]->uTimeToRecovery) {
840  return;
841  }
842  uActiveCharacter = uPlayerID;
843  return;
844  }
847  uActiveCharacter = uPlayerID;
848  return;
849  }
851  viewparams->bRedrawGameUI = true;
852  uActiveCharacter = uPlayerID;
855  FillAwardsData();
856  }
857  return;
858  }
859  viewparams->bRedrawGameUI = true;
860  if (uActiveCharacter == uPlayerID) {
863  uActiveCharacter = uPlayerID;
864  return;
865  }
866  if (pPlayers[uPlayerID]->uTimeToRecovery) {
867  return;
868  }
869  uActiveCharacter = uPlayerID;
870  return;
871  }
873  WINDOW_INPUT_IN_PROGRESS) {
874  return;
875  }
876  viewparams->bRedrawGameUI = true;
877  if (uActiveCharacter != uPlayerID) {
878  uActiveCharacter = uPlayerID;
879  return;
880  }
883  __debugbreak(); // fix indexing
886  uActiveCharacter, CURRENT_SCREEN::SCREEN_E); // CharacterUI_Initialize(SCREEN_E);
887  return;
888  }
889 }
890 
891 void GameUI_DrawNPCPopup(void *_this) { // PopupWindowForBenefitAndJoinText
892  int v1; // edi@2
893  NPCData *pNPC; // eax@16
894  const char *pText; // eax@18
895  GUIWindow popup_window; // [sp+Ch] [bp-60h]@23
896  int a2; // [sp+60h] [bp-Ch]@16
897  const char *lpsz; // [sp+68h] [bp-4h]@6
898 
899  char buf[4096];
900  if (bNoNPCHiring != 1) {
901  v1 = 0;
902  /*do
903  {
904  if ( v3->pName )
905  tmp_str[v1++] = v2;
906  ++v3;
907  ++v2;
908  }
909  while ( (signed int)v3 < (signed int)&pParty->pPickedItem );*/
910  for (int i = 0; i < 2; ++i) {
911  if (pParty->pHirelings[i].pName) buf[v1++] = i;
912  }
913  lpsz = 0;
914  if ((signed int)pNPCStats->uNumNewNPCs > 0) {
915  /*v4 = pNPCStats->pNewNPCData;
916  do
917  {
918  if ( v4->uFlags & 0x80
919  && (!pParty->pHirelings[0].pName || strcmp(v4->pName,
920  pParty->pHirelings[0].pName))
921  && (!pParty->pHirelings[1].pName || strcmp(v4->pName,
922  pParty->pHirelings[1].pName)) ) tmp_str[v1++] = (char)lpsz + 2;
923  ++lpsz;
924  ++v4;
925  }
926  while ( (signed int)lpsz < (signed int)pNPCStats->uNumNewNPCs );*/
927  for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i) {
928  if (pNPCStats->pNewNPCData[i].Hired()) {
929  if (!pParty->pHirelings[0].pName ||
930  strcmp((char *)pNPCStats->pNewNPCData[i].pName,
931  (char *)pParty->pHirelings[0].pName)) {
932  if (!pParty->pHirelings[1].pName ||
933  strcmp((char *)pNPCStats->pNewNPCData[i].pName,
934  (char *)pParty->pHirelings[1].pName))
935  buf[v1++] = i + 2;
936  }
937  }
938  }
939  }
940  if ((signed int)((char *)_this + pParty->hirelingScrollPosition) < v1) {
942  -1 - pParty->hirelingScrollPosition - (int)_this;
944  if (pNPC) {
945  if (a2 == 57)
946  pText = pNPCTopics[512].pText; // Baby dragon
947  else
948  pText =
949  (const char *)pNPCStats->pProfessions[pNPC->uProfession]
950  .pBenefits;
951  lpsz = pText;
952  if (!pText) {
953  lpsz =
954  (const char *)pNPCStats->pProfessions[pNPC->uProfession]
955  .pJoinText;
956  if (!lpsz) lpsz = "";
957  }
958  popup_window.sHint.clear();
959  popup_window.uFrameX = 38;
960  popup_window.uFrameY = 60;
961  popup_window.uFrameWidth = 276;
962  popup_window.uFrameZ = 313;
963  popup_window.uFrameHeight =
964  pFontArrus->CalcTextHeight(lpsz, popup_window.uFrameWidth,
965  0) +
966  2 * pFontArrus->GetHeight() + 24;
967  if ((signed int)popup_window.uFrameHeight < 130)
968  popup_window.uFrameHeight = 130;
969  popup_window.uFrameWidth = 400;
970  popup_window.uFrameZ = popup_window.uFrameX + 399;
971  popup_window.DrawMessageBox(0);
972 
973  auto tex_name = StringPrintf("NPC%03d", pNPC->uPortraitID);
974  render->DrawTextureAlphaNew(
975  (popup_window.uFrameX + 22) / 640.0f,
976  (popup_window.uFrameY + 36) / 480.0f,
977  assets->GetImage_ColorKey(tex_name, 0x7FF));
978 
979  String title;
980  if (pNPC->uProfession) {
981  title = localization->FormatString(
982  429, pNPC->pName,
984  } else {
985  title = pNPC->pName;
986  }
987  popup_window.DrawTitleText(
988  pFontArrus, 0, 12, Color16(0xFFu, 0xFFu, 0x9Bu), title, 3);
989  popup_window.uFrameWidth -= 24;
990  popup_window.uFrameZ =
991  popup_window.uFrameX + popup_window.uFrameWidth - 1;
992  popup_window.DrawText(
993  pFontArrus, 100, 36, 0,
994  BuildDialogueString((char *)lpsz, uActiveCharacter - 1, 0,
995  0, 0));
996  }
997  }
998  }
999 }
1000 
1002  double v3; // st7@1
1003  int v7; // eax@4
1004  const char *v14; // eax@8
1005  unsigned int pMapID; // eax@14
1006  int global_coord_X; // [sp+10h] [bp-1Ch]@1
1007  int global_coord_Y; // [sp+14h] [bp-18h]@1
1008  unsigned int pY; // [sp+1Ch] [bp-10h]@1
1009  unsigned int pX; // [sp+28h] [bp-4h]@1
1010 
1011  String result;
1012  pMouse->GetClickPos(&pX, &pY);
1013  v3 = 1.0 / (float)((signed int)viewparams->uMinimapZoom * 0.000015258789);
1014  global_coord_X =
1015  (__int64)((double)(pX - 557) * v3 + (double)pParty->vPosition.x);
1016  global_coord_Y =
1017  (__int64)((double)pParty->vPosition.y - (double)(pY - 74) * v3);
1019  pOutdoor->pBModels.empty()) {
1021  if (pMapID == 0)
1022  result = "No Maze Info for this maze on file!";
1023  else
1024  result = pMapStats->pInfos[pMapID].pName;
1025  } else {
1026  for (BSPModel &model : pOutdoor->pBModels) {
1027  v7 = int_get_vector_length(
1028  abs((int)model.vBoundingCenter.x - global_coord_X),
1029  abs((int)model.vBoundingCenter.y - global_coord_Y), 0);
1030  if (v7 < 2 * model.sBoundingRadius) {
1031  for (ODMFace &face : model.pFaces) {
1032  if (face.sCogTriggeredID) {
1033  if (!(face.uAttributes & FACE_HAS_EVENT)) {
1034  v14 = GetEventHintString(face.sCogTriggeredID);
1035  if (v14) {
1036  if (_stricmp(v14, "")) {
1037  result = v14;
1038  }
1039  }
1040  }
1041  }
1042  }
1043  return result;
1044  }
1045  }
1047  if (pMapID == 0)
1048  result = "No Maze Info for this maze on file!";
1049  else
1050  result = pMapStats->pInfos[pMapID].pName;
1051  return result;
1052  }
1053  return result;
1054 }
1055 
1056 //----- (0041D3B7) --------------------------------------------------------
1058  Image *v13; // eax@6
1059  PlayerFrame *v15; // eax@12
1060  const char *v29; // eax@16
1061  int v36; // esi@22
1062  signed int uFramesetID; // [sp+20h] [bp-8h]@9
1063  int uFramesetIDa; // [sp+20h] [bp-8h]@18
1064 
1065  uint numActivePlayerBuffs = 0;
1066  for (uint i = 0; i < 24; ++i) {
1067  if (player->pPlayerBuffs[i].Active()) ++numActivePlayerBuffs;
1068  }
1069 
1070  window->uFrameHeight =
1071  ((pFontArrus->GetHeight() + 162) +
1072  ((numActivePlayerBuffs - 1) * pFontArrus->GetHeight()));
1073  window->uFrameZ = window->uFrameWidth + window->uFrameX - 1;
1074  window->uFrameW = ((pFontArrus->GetHeight() + 162) +
1075  ((numActivePlayerBuffs - 1) * pFontArrus->GetHeight())) +
1076  window->uFrameY - 1;
1077  window->DrawMessageBox(0);
1078 
1079  if (player->IsEradicated()) {
1081  } else if (player->IsDead()) {
1083  } else {
1084  uFramesetID =
1086  if (!uFramesetID) uFramesetID = 1;
1087  if (player->expression == CHARACTER_EXPRESSION_21)
1089  &player->_expression21_frameset,
1091  else
1092  v15 = pPlayerFrameTable->GetFrameBy_x(uFramesetID,
1093  pMiscTimer->Time());
1094  player->field_1AA2 = v15->uTextureID - 1;
1095  v13 = game_ui_player_faces[window->par1C][v15->uTextureID - 1];
1096  }
1097 
1098  render->DrawTextureAlphaNew((window->uFrameX + 24) / 640.0f,
1099  (window->uFrameY + 24) / 480.0f, v13);
1100 
1101  auto str =
1104  429, player->pName,
1105  localization->GetClassName(player->classType)) // "%s the %s"
1106  + "\f00000\n" +
1107  StringPrintf("%s : \f%05u%d\f00000 / %d\n",
1108  localization->GetString(108), // "Hit Points"
1110  player->sHealth, player->GetMaxHealth()),
1111  player->sHealth, player->GetMaxHealth()) +
1112  StringPrintf("%s : \f%05u%d\f00000 / %d\n",
1113  localization->GetString(212), // "Spell Points"
1115  player->sMana, player->GetMaxMana()),
1116  player->sMana, player->GetMaxMana()) +
1117  StringPrintf("%s: \f%05d%s\f00000\n",
1118  localization->GetString(47), // Condition
1121  player->GetMajorConditionIdx()));
1122 
1123  if (player->uQuickSpell)
1124  v29 = pSpellStats->pInfos[player->uQuickSpell].pShortName;
1125  else
1126  v29 = localization->GetString(153);
1127 
1128  str += StringPrintf("%s: %s", localization->GetString(172),
1129  v29); // "Quick Spell"
1130 
1131  window->DrawText(pFontArrus, 120, 22, 0, str, 0, 0, 0);
1132 
1133  uFramesetIDa = 0;
1134  for (uint i = 0; i < 24; ++i) {
1135  SpellBuff *buff = &player->pPlayerBuffs[i];
1136  if (buff->Active()) {
1137  v36 = uFramesetIDa++ * pFontComic->GetHeight() + 134;
1138  window->DrawText(pFontComic, 52, v36,
1140  localization->GetSpellName(20 + i), 0, 0, 0);
1142  v36, window, buff->expire_time - pParty->GetPlayingTime(),
1143  pFontComic);
1144  }
1145  }
1146 
1147  auto active_spells = localization->FormatString(
1148  450, // Active Spells: %s
1149  uFramesetIDa == 0 ? localization->GetString(153) : ""); // "None"
1150  window->DrawText(pFontArrus, 14, 114, 0, active_spells, 0, 0, 0);
1151 }
1152 
1153 //----- (0041AD6E) --------------------------------------------------------
1157 
1158  static bool _50697C_book_flasher;
1159 
1162  _50697C_book_flasher = !_50697C_book_flasher;
1163  }
1164 
1165  if (_50697C_book_flasher && current_screen_type != CURRENT_SCREEN::SCREEN_REST) {
1166  if (bFlashQuestBook)
1167  render->DrawTextureAlphaNew(493 / 640.0f, 355 / 480.0f,
1169  if (bFlashAutonotesBook)
1170  render->DrawTextureAlphaNew(527 / 640.0f, 353 / 480.0f,
1172  if (bFlashHistoryBook)
1173  render->DrawTextureAlphaNew(600 / 640.0f, 361 / 480.0f,
1175  }
1176 }
1177 
1178 //----- (0041AEBB) --------------------------------------------------------
1180  int text_y; // esi@2
1181 
1183  text_y = _44100D_should_alter_right_panel() != 0 ? 381 : 322;
1184 
1186  pFontSmallnum, 0, text_y, uGameUIFontMain,
1187  StringPrintf("\r087%d", pParty->GetFood()), 0, 0,
1190  pFontSmallnum, 0, text_y, uGameUIFontMain,
1191  StringPrintf("\r028%d", pParty->GetGold()), 0, 0,
1193  }
1194 }
1195 
1196 //----- (0041B0C9) --------------------------------------------------------
1198  double v3; // st7@3
1199  double v7; // st7@25
1200 
1201  for (uint i = 0; i < 4; ++i) {
1202  if (pParty->pPlayers[i].sHealth > 0) {
1203  int v17 = 0;
1204  if (i == 2 || i == 3) v17 = 2;
1205  v3 = (double)pParty->pPlayers[i].sHealth /
1206  (double)pParty->pPlayers[i].GetMaxHealth();
1207 
1208  auto pTextureHealth = game_ui_bar_green;
1209  if (v3 > 0.5) {
1210  if (v3 > 1.0) v3 = 1.0;
1211  } else if (v3 > 0.25) {
1212  pTextureHealth = game_ui_bar_yellow;
1213  } else if (v3 > 0.0) {
1214  pTextureHealth = game_ui_bar_red;
1215  }
1216  if (v3 > 0.0) {
1217  render->SetUIClipRect(
1218  v17 + pHealthBarPos[i],
1219  (signed __int64)((1.0 - v3) * pTextureHealth->GetHeight()) +
1220  402,
1221  v17 + pHealthBarPos[i] + pTextureHealth->GetWidth(),
1222  pTextureHealth->GetHeight() + 402);
1223  render->DrawTextureAlphaNew((v17 + pHealthBarPos[i]) / 640.0f,
1224  402 / 480.0f, pTextureHealth);
1225  render->ResetUIClipRect();
1226  }
1227  }
1228  if (pParty->pPlayers[i].sMana > 0) {
1229  v7 = pParty->pPlayers[i].sMana /
1230  (double)pParty->pPlayers[i].GetMaxMana();
1231  if (v7 > 1.0) v7 = 1.0;
1232  int v17 = 0;
1233  if (i == 2) v17 = 1;
1234  render->SetUIClipRect(
1235  v17 + pManaBarPos[i],
1236  (signed __int64)((1.0 - v7) * game_ui_bar_blue->GetHeight()) +
1237  402,
1238  v17 + pManaBarPos[i] + game_ui_bar_blue->GetWidth(),
1239  game_ui_bar_blue->GetHeight() + 402);
1240  render->DrawTextureAlphaNew((v17 + pManaBarPos[i]) / 640.0f,
1241  402 / 480.0f, game_ui_bar_blue);
1242  render->ResetUIClipRect();
1243  }
1244  }
1245 }
1246 
1247 //----- (0041B3B6) --------------------------------------------------------
1249  render->DrawTextureAlphaNew(pViewport->uViewportBR_X / 640.0f, 0,
1251 }
1252 
1253 //----- (0041B3E2) --------------------------------------------------------
1255  render->DrawTextureNew(0, 0, game_ui_topframe);
1256  render->DrawTextureNew(0, 8 / 480.0f, game_ui_leftframe);
1257  render->DrawTextureNew(468 / 640.0f, 0, game_ui_rightframe);
1258  render->DrawTextureNew(0, 352 / 480.0f, game_ui_bottomframe);
1261 
1262  // render->EndScene();
1263  // render->Present();
1264 }
1265 
1267  // GUIWindow *pWindow; // edi@7
1268  // GUIButton *pButton; // ecx@11
1269  int requiredSkillpoints; // ecx@19
1270  enum UIMessageType pMessageType1; // esi@24
1271  int invmatrixindex; // eax@41
1272  ItemGen *pItemGen; // ecx@44
1273  int v16; // ecx@46
1274  signed int pickedObjectPID; // eax@55
1275  signed int v18b;
1276  signed int pickedObjectID = 0; // ecx@63
1277  BLVFace *pFace; // eax@69
1278  const char *pText; // ecx@79
1279  enum UIMessageType pMessageType2; // esi@110
1280  enum UIMessageType pMessageType3; // edx@117
1281  unsigned int pX; // [sp+D4h] [bp-Ch]@1
1282  unsigned int pY; // [sp+D8h] [bp-8h]@1
1283 
1284  // int testing;
1285 
1287  pMouse->GetClickPos(&pX, &pY);
1288  if (pX < 0 || pX > window->GetWidth() - 1 || pY < 0 ||
1289  pY > window->GetHeight() - 1)
1290  return;
1291 
1293  if (pX <= (window->GetWidth() - 1) * 0.73125 &&
1294  pY <= (window->GetHeight() - 1) * 0.73125) {
1295  if (!pViewport->Contains(pX, pY)) {
1296  if (uLastPointedObjectID != 0) {
1297  game_ui_status_bar_string.clear();
1298  bForceDrawFooter = 1;
1299  }
1301  return;
1302  }
1303 
1304  auto vis = EngineIoc::ResolveVis();
1305  pickedObjectPID = vis->get_picked_object_zbuf_val();
1306  pMouse->uPointingObjectID = (unsigned __int16)pickedObjectPID;
1307  pickedObjectID = (signed)PID_ID(pickedObjectPID);
1308  if (PID_TYPE(pickedObjectPID) == OBJECT_Item) {
1309  if (pObjectList
1310  ->pObjects[pSpriteObjects[pickedObjectID].uObjectDescID]
1311  .uFlags &
1312  0x10) {
1314  game_ui_status_bar_string.clear();
1315  bForceDrawFooter = 1;
1317  return;
1318  }
1319  if (pickedObjectPID >= 0x2000000u ||
1321  GameUI_StatusBar_Set(pSpriteObjects[pickedObjectID]
1322  .containing_item.GetDisplayName());
1323  } else {
1325  470, pSpriteObjects[pickedObjectID]
1326  .containing_item.GetDisplayName()
1327  .c_str())); // Get %s
1328  } // intentional fallthrough
1329  } else if (PID_TYPE(pickedObjectPID) == OBJECT_Decoration) {
1330  if (!pLevelDecorations[pickedObjectID].uEventID) {
1331  if (pLevelDecorations[pickedObjectID].IsInteractive())
1333  [pLevelDecorations[pickedObjectID]._idx_in_stru123 -
1334  75] + 380].pTopic; // неверно для костра
1335  else
1336  pText = pDecorationList->GetDecoration(pLevelDecorations[pickedObjectID].uDecorationDescID)->field_20;
1337  GameUI_StatusBar_Set(pText);
1338  } else {
1339  char *hintString = GetEventHintString(pLevelDecorations[pickedObjectID].uEventID);
1340  if (hintString[0] != '\0') {
1341  GameUI_StatusBar_Set(hintString);
1342  }
1343  } // intentional fallthrough
1344  } else if (PID_TYPE(pickedObjectPID) == OBJECT_BModel) {
1345  if (pickedObjectPID < 0x2000000u) {
1346  char *newString = nullptr;
1348  v18b = PID_ID(pickedObjectPID) >> 6;
1349  short triggeredId = pOutdoor->pBModels[v18b].pFaces[pickedObjectID & 0x3F].sCogTriggeredID;
1350  if (triggeredId != 0) {
1351  newString = GetEventHintString(
1352  pOutdoor->pBModels[v18b]
1353  .pFaces[pickedObjectID & 0x3F]
1354  .sCogTriggeredID);
1355  }
1356  } else {
1357  pFace = &pIndoor->pFaces[pickedObjectID];
1358  if (pFace->uAttributes & FACE_INDICATE) {
1359  unsigned short eventId =
1361  .uEventID;
1362  if (eventId != 0) {
1363  newString = GetEventHintString(
1365  .uEventID);
1366  }
1367  }
1368  }
1369  if (newString) {
1370  GameUI_StatusBar_Set(newString);
1371  if (pMouse->uPointingObjectID == 0 &&
1372  uLastPointedObjectID != 0) {
1373  game_ui_status_bar_string.clear();
1374  bForceDrawFooter = 1;
1375  }
1377  return;
1378  }
1379  }
1381  game_ui_status_bar_string.clear();
1382  bForceDrawFooter = 1;
1384  return;
1385  } else if (PID_TYPE(pickedObjectPID) == OBJECT_Actor) {
1386  if (pickedObjectPID >= 0x2000000) {
1388  if (uLastPointedObjectID != 0) {
1389  game_ui_status_bar_string.clear();
1390  bForceDrawFooter = 1;
1391  }
1393  return;
1394  }
1395  if (pActors[pickedObjectID].dword_000334_unique_name)
1396  pText = pMonsterStats
1397  ->pPlaceStrings[pActors[pickedObjectID]
1398  .dword_000334_unique_name];
1399  else
1400  pText =
1402  ->pInfos[pActors[pickedObjectID].pMonsterInfo.uID]
1403  .pName;
1404  GameUI_StatusBar_Set(pText); // intentional fallthrough
1405  }
1406  if (pMouse->uPointingObjectID == 0 && uLastPointedObjectID != 0) {
1407  game_ui_status_bar_string.clear();
1408  bForceDrawFooter = 1;
1409  }
1411  return;
1412  }
1414  if (pX <= (window->GetWidth() - 1) * 0.73125 &&
1415  pY <= (window->GetHeight() - 1) * 0.73125) { // if in chest area
1417  return;
1418  } else if (uLastPointedObjectID != 0) { // not found so reset
1419  game_ui_status_bar_string.clear();
1420  bForceDrawFooter = 1;
1421  }
1423  return;
1424  }
1425  } else {
1426  // if (pX <= (window->GetWidth() - 1) * 0.73125 && pY <=
1427  // (window->GetHeight() - 1) * 0.73125) {
1431  if (pY > 0 && pY < 350 && pX >= 13 &&
1432  pX <= 462) { // inventory poitned
1433  // inventoryYCoord = (pY - 17) / 32;
1434  // inventoryXCoord = (pX - 14) / 32;
1435  // invMatrixIndex = inventoryXCoord + (INVETORYSLOTSWIDTH *
1436  // inventoryYCoord);
1437  invmatrixindex = ((pX - 14) / 32) + 14 * ((pY - 17) / 32);
1438  // if (mouse.x <= 13 || mouse.x >= 462)
1439  // return;
1440  // testing =
1441  // pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex(invmatrixindex);
1442  pItemGen =
1443  pPlayers[uActiveCharacter]->GetItemAtInventoryIndex(
1444  invmatrixindex); // (ItemGen
1445  // *)&pPlayers[uActiveCharacter]->pInventoryItemList[testing
1446  // - 1];
1447 
1448  if (!pItemGen == NULL) pickedObjectID = pItemGen->uItemID;
1449  // if (!pItemID)
1450  // return;
1451  // item =
1452  // &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID -
1453  // 1];
1454 
1455  // v14 = render->pActiveZBuffer[pX +
1456  // pSRZBufferLineOffsets[pY]];
1457  if (pickedObjectID == 0 || pickedObjectID == -65536 ||
1458  pickedObjectID >= 5000) {
1459  // if (pMouse->uPointingObjectID == 0) {
1460  if (uLastPointedObjectID != 0) {
1461  game_ui_status_bar_string.clear();
1462  bForceDrawFooter = 1;
1463  }
1464  //}
1466  // return;
1467  } else {
1468  GameUI_StatusBar_Set(pItemGen->GetDisplayName());
1470  return;
1471  }
1472  }
1473  }
1474  }
1475 
1476  // else if inventory
1477 
1478  for (GUIWindow *pWindow : lWindowList) {
1479  if (pWindow->Contains(pX, pY)) {
1480  for (GUIButton *pButton : pWindow->vButtons) {
1481  switch (pButton->uButtonType) {
1482  case 1: // for dialogue window
1483  if (pButton->Contains(pX, pY)) {
1484  pMessageType1 =
1485  (UIMessageType)pButton->field_1C;
1486  if (pMessageType1)
1487  pMessageQueue_50CBD0->AddGUIMessage(
1488  pMessageType1, pButton->msg_param, 0);
1489  GameUI_StatusBar_Set(pButton->sLabel);
1491  return;
1492  }
1493  break;
1494  case 2: // hovering over portraits
1495  if (pButton->uWidth != 0 && pButton->uHeight != 0) {
1496  uint distW = pX - pButton->uX;
1497  uint distY = pY - pButton->uY;
1498 
1499  double ratioX =
1500  1.0 * (distW * distW) /
1501  (pButton->uWidth * pButton->uWidth);
1502  double ratioY =
1503  1.0 * (distY * distY) /
1504  (pButton->uHeight * pButton->uHeight);
1505 
1506  if (ratioX + ratioY < 1.0) {
1507  pMessageType2 =
1508  (UIMessageType)pButton->field_1C;
1509  if (pMessageType2 != 0)
1510  pMessageQueue_50CBD0->AddGUIMessage(
1511  pMessageType2, pButton->msg_param,
1512  0);
1514  pButton->sLabel); // for character name
1516  return;
1517  }
1518  }
1519  break;
1520  case 3: // click on skill
1521  if (pButton->Contains(pX, pY)) {
1522  requiredSkillpoints =
1524  ->pActiveSkills[pButton->msg_param] &
1525  0x3F) +
1526  1;
1527 
1528  String str;
1529  if (pPlayers[uActiveCharacter]->uSkillPoints <
1530  requiredSkillpoints)
1531  str = localization->FormatString(
1532  469,
1533  requiredSkillpoints -
1535  ->uSkillPoints); // "You need
1536  // %d more
1537  // Skill
1538  // Points to
1539  // advance
1540  // here"
1541  else
1542  str = localization->FormatString(
1543  468,
1544  requiredSkillpoints); // "Clicking here
1545  // will spend %d
1546  // Skill Points"
1547 
1548  GameUI_StatusBar_Set(str);
1550  return;
1551  }
1552  break;
1553  }
1554  }
1555  }
1556 
1557  // ?? if we get here nothing is curos over??
1558  if (uLastPointedObjectID != 0) { // not found so reset
1559  game_ui_status_bar_string.clear();
1560  bForceDrawFooter = 1;
1561  }
1563 
1564  if (pWindow->uFrameHeight == 480) {
1565  // DebugBreak(); //Why is this condition here (in the original
1566  // too)? Might check fullscreen windows. Let Silvo know if you
1567  // find out
1568  // this is to stop the no windows active code below runnning
1569  return;
1570  }
1571  }
1572  // The game never gets to this point even in the original. It's also
1573  // bugged(neither branch displays anything).
1574  // TODO(_) fix these and move them up before the window check loop.
1575 
1576  // gets here when glitched
1577 
1578  /* if (current_screen_type == SCREEN_HOUSE) // this is required
1579  when displaying inventory in a house/shop??
1580  {
1581  if (dialog_menu_id != HOUSE_DIALOGUE_SHOP_BUY_STANDARD
1582  || (v16 = render->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]], v16 ==
1583  0)
1584  || v16 == -65536)
1585  {
1586  if (uLastPointedObjectID != 0)
1587  {
1588  game_ui_status_bar_string.clear();
1589  bForceDrawFooter = 1;
1590  }
1591  uLastPointedObjectID = 0;
1592  return;
1593  }
1594  pItemGen = (ItemGen *)((char *)&pParty->pPickedItem + 36 * (v16 + 12 *
1595  (unsigned int)window_SpeakInHouse->ptr_1C) + 4);
1596  GameUI_StatusBar_Set(pItemGen->GetDisplayName());
1597  game_ui_status_bar_string.clear();
1598  bForceDrawFooter = 1;
1599  uLastPointedObjectID = 0;
1600  return;
1601  }
1602  */
1603 
1604  //}
1605  }
1606 
1607  // no windows active -outside of game screen area only
1608  if (!lWindowList.empty()) {
1609  GUIWindow *win = lWindowList.back();
1610  if (win->Contains(pX, pY)) {
1611  for (GUIButton *pButton : win->vButtons) {
1612  switch (pButton->uButtonType) {
1613  case 1:
1614  if (pX >= pButton->uX && pX <= pButton->uZ &&
1615  pY >= pButton->uY && pY <= pButton->uW) {
1616  pMessageType3 = (UIMessageType)pButton->field_1C;
1617  if (pMessageType3 == 0) { // For books
1618  GameUI_StatusBar_Set(pButton->sLabel);
1619  } else {
1620  pMessageQueue_50CBD0->AddGUIMessage(
1621  pMessageType3, pButton->msg_param, 0);
1622  }
1624  return;
1625  }
1626  break;
1627  case 2: // hovering over portraits
1628  if (pButton->uWidth != 0 && pButton->uHeight != 0) {
1629  uint distW = pX - pButton->uX;
1630  uint distY = pY - pButton->uY;
1631 
1632  double ratioX = 1.0 * (distW * distW) /
1633  (pButton->uWidth * pButton->uWidth);
1634  double ratioY =
1635  1.0 * (distY * distY) /
1636  (pButton->uHeight * pButton->uHeight);
1637 
1638  if (ratioX + ratioY < 1.0) {
1639  pMessageType2 =
1640  (UIMessageType)pButton->field_1C;
1641  if (pMessageType2 != 0)
1642  pMessageQueue_50CBD0->AddGUIMessage(
1643  pMessageType2, pButton->msg_param, 0);
1645  pButton->sLabel); // for character name
1647  return;
1648  }
1649  }
1650  break;
1651  case 3: // is this one needed?
1652  /* if (pX >= pButton->uX && pX <=
1653  pButton->uZ
1654  && pY >= pButton->uY && pY <= pButton->uW)
1655  {
1656  requiredSkillpoints =
1657  (pPlayers[uActiveCharacter]->pActiveSkills[pButton->msg_param]
1658  & 0x3F) + 1;
1659 
1660  String str;
1661  if (pPlayers[uActiveCharacter]->uSkillPoints <
1662  requiredSkillpoints) str =
1663  localization->FormatString(469, requiredSkillpoints -
1664  pPlayers[uActiveCharacter]->uSkillPoints);// "You need
1665  %d more Skill Points to advance here" else str =
1666  localization->FormatString(468, requiredSkillpoints);//
1667  "Clicking here will spend %d Skill Points"
1668  GameUI_StatusBar_Set(str);
1669  uLastPointedObjectID = 1;
1670  return;
1671  }*/
1672  break;
1673  }
1674  }
1675  }
1676  }
1677 
1678  // pMouse->uPointingObjectID = sub_46A99B(); //for software
1679  if (uLastPointedObjectID != 0) {
1680  game_ui_status_bar_string.clear();
1681  bForceDrawFooter = 1;
1682  }
1684  return;
1685 }
1686 
1687 //----- (0044158F) --------------------------------------------------------
1689  if (uActiveCharacter)
1690  render->DrawTextureAlphaNew(
1692  [uActiveCharacter - 1] -
1693  9) /
1694  640.0f,
1695  380 / 480.0f, game_ui_player_selection_frame);
1696 }
1697 
1698 //----- (0044162D) --------------------------------------------------------
1700  unsigned int v0; // ebp@1
1701  Image *spell_texture; // [sp-4h] [bp-1Ch]@12
1702  // Texture_MM7 *v9; // [sp-4h] [bp-1Ch]@21
1703 
1704  v0 = OS_GetTime() / 20;
1705  for (uint i = 0; i < 14; ++i) {
1706  if (pParty->pPartyBuffs[byte_4E5DD8[i]].Active()) {
1707  render->TexturePixelRotateDraw(pPartySpellbuffsUI_XYs[i][0] / 640.,
1708  pPartySpellbuffsUI_XYs[i][1] / 480., party_buff_icons[i],
1709  v0 + 20 * pPartySpellbuffsUI_smthns[i]);
1710  }
1711  }
1712 
1715  if (pParty->FlyActive()) {
1716  if (pParty->bFlying)
1717  spell_texture =
1719  ->GetTexture();
1720  else
1721  spell_texture = pIconsFrameTable->GetFrame(uIconIdx_FlySpell, 0)
1722  ->GetTexture();
1723  render->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f, spell_texture);
1724  }
1725  if (pParty->WaterWalkActive()) {
1727  spell_texture =
1729  ->GetTexture();
1730  else
1731  spell_texture =
1733  ->GetTexture();
1734  render->DrawTextureAlphaNew(396 / 640.0f, 8 / 480.0f,
1735  spell_texture);
1736  }
1737  }
1738 
1739  for (uint i = 0; i < 4; ++i) {
1740  if (pParty->pPlayers[i].pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].Active())
1741  render->DrawTextureAlphaNew(
1743  640.0f,
1744  427 / 480.0f, game_ui_playerbuff_hammerhands);
1745  if (pParty->pPlayers[i].pPlayerBuffs[PLAYER_BUFF_BLESS].Active())
1746  render->DrawTextureAlphaNew(
1748  640.0f,
1749  393 / 480.0f, game_ui_playerbuff_bless);
1750  if (pParty->pPlayers[i].pPlayerBuffs[PLAYER_BUFF_PRESERVATION].Active())
1751  render->DrawTextureAlphaNew(
1753  640.0f,
1754  410 / 480.0f, game_ui_playerbuff_preservation);
1755  if (pParty->pPlayers[i]
1756  .pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION]
1757  .Active())
1758  render->DrawTextureAlphaNew(
1760  640.0f,
1762  }
1763 }
1764 
1765 //----- (004921C1) --------------------------------------------------------
1766 void GameUI_DrawPortraits(unsigned int _this) {
1767  unsigned int face_expression_ID; // eax@17
1768  PlayerFrame *pFrame; // eax@21
1769  Image *pPortrait; // [sp-4h] [bp-1Ch]@27
1770 
1773  if (_A750D8_player_speech_timer <= 0) {
1774  if (pPlayers[uSpeakingCharacter]->CanAct())
1775  pPlayers[uSpeakingCharacter]->PlaySound(PlayerSpeechID, 0);
1777  }
1778  }
1779 
1780  for (uint i = 0; i < 4; ++i) {
1781  Player *pPlayer = &pParty->pPlayers[i];
1782  if (pPlayer->IsEradicated()) {
1783  pPortrait = game_ui_player_face_eradicated;
1785  render->DrawTextureGrayShade(
1787  640.0f,
1788  388 / 480.0f, pPortrait);
1789  else
1790  render->DrawTextureAlphaNew(
1792  1) /
1793  640.0f,
1794  388 / 480.0f, pPortrait);
1795  if (pPlayer->pPlayerBuffs[PLAYER_BUFF_BLESS].Active() ||
1796  pPlayer->pPlayerBuffs[PLAYER_BUFF_HASTE].Active() ||
1797  pPlayer->pPlayerBuffs[PLAYER_BUFF_HEROISM].Active() ||
1798  pPlayer->pPlayerBuffs[PLAYER_BUFF_SHIELD].Active() ||
1799  pPlayer->pPlayerBuffs[PLAYER_BUFF_STONESKIN].Active()) {
1801  }
1802  continue;
1803  }
1804  if (pPlayer->IsDead()) {
1805  pPortrait = game_ui_player_face_dead;
1807  render->DrawTextureGrayShade(
1809  640.0f,
1810  388 / 480.0f, pPortrait);
1811  else
1812  render->DrawTextureAlphaNew(
1814  1) /
1815  640.0f,
1816  388 / 480.0f, pPortrait);
1817  if (pPlayer->pPlayerBuffs[PLAYER_BUFF_BLESS].Active() ||
1818  pPlayer->pPlayerBuffs[PLAYER_BUFF_HASTE].Active() ||
1819  pPlayer->pPlayerBuffs[PLAYER_BUFF_HEROISM].Active() ||
1820  pPlayer->pPlayerBuffs[PLAYER_BUFF_SHIELD].Active() ||
1821  pPlayer->pPlayerBuffs[PLAYER_BUFF_STONESKIN].Active()) {
1823  }
1824  continue;
1825  }
1826  face_expression_ID = 0;
1827  for (uint j = 0; j < pPlayerFrameTable->uNumFrames; ++j)
1829  pPlayer->expression) {
1830  face_expression_ID = j;
1831  break;
1832  }
1833  if (face_expression_ID == 0) face_expression_ID = 1;
1834  if (pPlayer->expression == CHARACTER_EXPRESSION_21)
1835  pFrame = pPlayerFrameTable->GetFrameBy_y(
1836  &pPlayer->_expression21_frameset,
1838  else
1839  pFrame = pPlayerFrameTable->GetFrameBy_x(
1840  face_expression_ID, pPlayer->uExpressionTimePassed);
1841  if (pPlayer->field_1AA2 != pFrame->uTextureID - 1 || _this) {
1842  pPlayer->field_1AA2 = pFrame->uTextureID - 1;
1843  pPortrait = game_ui_player_faces
1844  [i]
1845  [pPlayer
1846  ->field_1AA2]; // pFace = (Texture_MM7
1847  // *)game_ui_player_faces[i][pFrame->uTextureID];
1849  render->DrawTextureGrayShade(
1851  640.0f,
1852  388 / 480.0f, pPortrait);
1853  else
1854  render->DrawTextureAlphaNew(
1856  1) /
1857  640.0f,
1858  388 / 480.0f, pPortrait);
1859  if (pPlayer->pPlayerBuffs[PLAYER_BUFF_BLESS].Active() |
1860  pPlayer->pPlayerBuffs[PLAYER_BUFF_HASTE].Active() |
1861  pPlayer->pPlayerBuffs[PLAYER_BUFF_HEROISM].Active() |
1862  pPlayer->pPlayerBuffs[PLAYER_BUFF_SHIELD].Active() |
1863  pPlayer->pPlayerBuffs[PLAYER_BUFF_STONESKIN].Active()) {
1865  }
1866  continue;
1867  }
1868  }
1869  if (pParty->bTurnBasedModeOn) {
1870  if (pTurnEngine->turn_stage != TE_WAIT) {
1871  if (PID_TYPE(pTurnEngine->pQueue[0].uPackedID) == OBJECT_Player) {
1872  if (pTurnEngine->uActorQueueSize > 0) {
1873  for (uint i = 0; i < (uint)pTurnEngine->uActorQueueSize;
1874  ++i) {
1875  if (PID_TYPE(pTurnEngine->pQueue[i].uPackedID) !=
1876  OBJECT_Player)
1877  break;
1878 
1879  auto alert_texture = game_ui_player_alert_green;
1880  if (pParty->GetRedAlert())
1881  alert_texture = game_ui_player_alert_red;
1882  else if (pParty->GetYellowAlert())
1883  alert_texture = game_ui_player_alert_yellow;
1884 
1885  render->DrawTextureAlphaNew(
1887  [PID_ID(pTurnEngine->pQueue[i].uPackedID)] -
1888  4) /
1889  640.0f,
1890  385 / 480.0f, alert_texture);
1891  }
1892  }
1893  }
1894  }
1895  } else {
1896  for (uint i = 0; i < 4; ++i) {
1897  if (pParty->pPlayers[i].CanAct() &&
1898  !pParty->pPlayers[i].uTimeToRecovery) {
1899  auto alert_texture = game_ui_player_alert_green;
1900  if (pParty->GetRedAlert())
1901  alert_texture = game_ui_player_alert_red;
1902  else if (pParty->GetYellowAlert())
1903  alert_texture = game_ui_player_alert_yellow;
1904 
1905  render->DrawTextureAlphaNew(
1907  4) /
1908  640.0f,
1909  385 / 480.0f, alert_texture);
1910  }
1911  }
1912  }
1913 }
1914 
1915 //----- (00441D38) --------------------------------------------------------
1916 void GameUI_DrawMinimap(unsigned int uX, unsigned int uY, unsigned int uZ,
1917  unsigned int uW, unsigned int uZoom,
1918  unsigned int bRedrawOdmMinimap) {
1919  signed int pW; // ebx@23
1920  int LineGreyDim; // eax@23
1921  double startx; // st7@30
1922  signed int ypix; // eax@37
1923  // unsigned __int16 *v28; // ecx@37
1924  signed int xpix; // edi@40
1925  int pPoint_X; // edi@72
1926  int pPoint_Y; // ebx@72
1927  // unsigned int lPitch; // [sp+20h] [bp-34h]@1
1928  signed int pY; // [sp+20h] [bp-34h]@23
1929  signed int pX; // [sp+24h] [bp-30h]@23
1930  signed int xpixoffset16; // [sp+24h] [bp-30h]@37
1931  signed int ypixoffset16; // [sp+28h] [bp-2Ch]@37
1932  int map_scale; // [sp+2Ch] [bp-28h]@30
1933  signed int pZ; // [sp+60h] [bp+Ch]@23
1934  double starty; // [sp+60h] [bp+Ch]@30
1935  unsigned int pColor;
1936 
1937  signed int uCenterX = (uX + uZ) / 2;
1938  signed int uCenterY = (uY + uW) / 2;
1939  render->SetUIClipRect(uX, uY, uZ, uW);
1940  int uHeight = uW - uY;
1941  signed int uWidth = uZ - uX;
1942 
1943  bool bWizardEyeActive = pParty->WizardEyeActive();
1944  int uWizardEyeSkillLevel = pParty->WizardEyeSkillLevel();
1946  bWizardEyeActive = true;
1947  uWizardEyeSkillLevel = 2;
1948  }
1949 
1950  if (engine->config->debug_wizard_eye) {
1951  bWizardEyeActive = true;
1952  uWizardEyeSkillLevel = 3;
1953  }
1954 
1957  map_scale = (1 << (loc_power + 16)) / (signed int)uZoom;
1958  startx = (double)(pParty->vPosition.x + 32768) /
1959  (double)(1 << (16 - loc_power));
1960  starty = (double)(32768 - pParty->vPosition.y) /
1961  (double)(1 << (16 - loc_power));
1962  switch (uZoom) {
1963  case 512: {
1964  startx = startx - (double)(uWidth / 2);
1965  starty = starty - (double)(uHeight / 2);
1966  } break;
1967  case 1024: {
1968  startx = startx - (double)(uWidth / 4);
1969  starty = starty - (double)(uHeight / 4);
1970  } break;
1971  case 2048: {
1972  startx = startx - (double)(uWidth / 8);
1973  starty = starty - (double)(uHeight / 8);
1974  } break;
1975  default:
1976  assert(false);
1977  }
1978 
1979  static unsigned __int16 pOdmMinimap[117][137];
1980  assert(sizeof(pOdmMinimap) == 137 * 117 * sizeof(short));
1981 
1982  static Texture *minimaptemp;
1983  if (!minimaptemp) {
1984  minimaptemp = render->CreateTexture_Blank(uWidth, uHeight, IMAGE_FORMAT_A8R8G8B8);
1985  }
1986 
1987  xpixoffset16 = floorf(startx * 65536.0 + 0.5f); // LODWORD(v24);
1988  ypixoffset16 = floorf(starty * 65536.0 + 0.5f); // LODWORD(v25);
1989  ypix = ypixoffset16 >> 16;
1990  xpix = xpixoffset16 >> 16;
1991  // v28 = &render->pTargetSurface[uX + uY * lPitch];
1992 
1993  if (/*pMapLod0 && */ bRedrawOdmMinimap) {
1994  assert(uWidth == 137 && uHeight == 117);
1995 
1996  ushort MapImgWidth = viewparams->location_minimap->GetWidth();
1997  auto pMapLod0Line =
1998  (unsigned __int32 *)viewparams->location_minimap->GetPixels(
2000  // Image *minimaptemp = Image::Create(uWidth, uHeight, IMAGE_FORMAT_A8R8G8B8);
2001  auto minitempix = (unsigned __int32 *)minimaptemp->GetPixels(IMAGE_FORMAT_A8R8G8B8);
2002 
2003  for (int y = 0; y < uHeight; ++y) {
2004  for (int x = 0; x < uWidth; ++x) {
2005  minitempix[x + y*uWidth] = pMapLod0Line[xpix + ypix * MapImgWidth];
2006  xpix = (xpixoffset16 + x * map_scale) >> 16;
2007  }
2008  ypixoffset16 += map_scale;
2009  ypix = ypixoffset16 >> 16;
2010  }
2011  // draw image
2012  render->Update_Texture(minimaptemp);
2013  render->DrawTextureAlphaNew(uX / 640., uY / 480., minimaptemp);
2014  // minimaptemp->Release();
2015  }
2016  } else { // uCurrentlyLoadedLevelType == LEVEL_Indoor
2017  render->FillRectFast(uX, uY, uZ - uX, uHeight, 0xF);
2018 
2019  for (uint i = 0; i < (uint)pIndoor->pMapOutlines->uNumOutlines; ++i) {
2020  BLVMapOutline *pOutline = &pIndoor->pMapOutlines->pOutlines[i];
2021 
2022  if (pIndoor->pFaces[pOutline->uFace1ID].Visible() &&
2023  pIndoor->pFaces[pOutline->uFace2ID].Visible()) {
2024  if (pIndoor->pFaces[pOutline->uFace1ID].uAttributes & FACE_RENDERED ||
2025  pIndoor->pFaces[pOutline->uFace2ID].uAttributes & FACE_RENDERED) {
2026  pOutline->uFlags = pOutline->uFlags | 1;
2027  pIndoor->_visible_outlines[i >> 3] |= 1 << (7 - i % 8);
2028 
2033 
2034  int linex = uCenterX + fixpoint_mul(uZoom, Vert1X);
2035  int liney = uCenterY - fixpoint_mul(uZoom, Vert1Y);
2036  int linez = uCenterX + fixpoint_mul(uZoom, Vert2X);
2037  int linew = uCenterY - fixpoint_mul(uZoom, Vert2Y);
2038 
2039  if (bWizardEyeActive && uWizardEyeSkillLevel >= 3 &&
2040  (pIndoor->pFaces[pOutline->uFace1ID].Clickable() ||
2041  pIndoor->pFaces[pOutline->uFace2ID].Clickable()) &&
2044  render->RasterLine2D(linex, liney, linez, linew, ui_game_minimap_outline_color);
2045  } else {
2046  LineGreyDim = abs(pOutline->sZ - pParty->vPosition.z) / 8;
2047  if (LineGreyDim > 100) LineGreyDim = 100;
2048  render->RasterLine2D(linex, liney, linez, linew, viewparams->pPalette[-LineGreyDim + 200]);
2049  }
2050  }
2051  }
2052  }
2053  }
2054 
2055  // draw arrow on the minimap(include. Ritor1)
2056  uint arrow_idx;
2057  unsigned int rotate = pParty->sRotationY & stru_5C6E00->uDoublePiMask;
2058  if ((signed int)rotate <= 1920) arrow_idx = 6;
2059  if ((signed int)rotate < 1664) arrow_idx = 5;
2060  if ((signed int)rotate <= 1408) arrow_idx = 4;
2061  if ((signed int)rotate < 1152) arrow_idx = 3;
2062  if ((signed int)rotate <= 896) arrow_idx = 2;
2063  if ((signed int)rotate < 640) arrow_idx = 1;
2064  if ((signed int)rotate <= 384) arrow_idx = 0;
2065  if ((signed int)rotate < 128 || (signed int)rotate > 1920) arrow_idx = 7;
2066  render->DrawTextureAlphaNew((uCenterX - 3) / 640.0f, (uCenterY - 3) / 480.0f, game_ui_minimap_dirs[arrow_idx]);
2067 
2068  // draw objects on the minimap
2069  if (bWizardEyeActive) {
2070  if (uWizardEyeSkillLevel >= 2) {
2071  for (uint i = 0; i < uNumSpriteObjects; ++i) {
2072  if (!pSpriteObjects[i].uType ||
2073  !pSpriteObjects[i].uObjectDescID)
2074  continue;
2075  // if (uWizardEyeSkillLevel == 1
2076  pPoint_X =
2077  uCenterX + fixpoint_mul((pSpriteObjects[i].vPosition.x -
2078  pParty->vPosition.x),
2079  uZoom);
2080  pPoint_Y =
2081  uCenterY - fixpoint_mul((pSpriteObjects[i].vPosition.y -
2082  pParty->vPosition.y),
2083  uZoom);
2084  // if ( pPoint_X >= render->raster_clip_x && pPoint_X <=
2085  // render->raster_clip_z &&
2086  // pPoint_Y >= render->raster_clip_y && pPoint_Y <=
2087  // render->raster_clip_w)
2088  {
2089  if (pObjectList->pObjects[pSpriteObjects[i].uObjectDescID]
2090  .uFlags &
2092  render->RasterLine2D(pPoint_X, pPoint_Y, pPoint_X,
2093  pPoint_Y,
2095  } else if (uZoom > 512) {
2096  render->RasterLine2D(pPoint_X - 2, pPoint_Y,
2097  pPoint_X - 2, pPoint_Y + 1,
2099  render->RasterLine2D(pPoint_X - 1, pPoint_Y - 1,
2100  pPoint_X - 1, pPoint_Y + 1,
2102  render->RasterLine2D(pPoint_X, pPoint_Y - 2, pPoint_X,
2103  pPoint_Y + 1,
2105  render->RasterLine2D(pPoint_X + 1, pPoint_Y - 1,
2106  pPoint_X + 1, pPoint_Y + 1,
2108  render->RasterLine2D(pPoint_X + 2, pPoint_Y,
2109  pPoint_X + 2, pPoint_Y + 1,
2111  } else {
2112  render->RasterLine2D(pPoint_X - 1, pPoint_Y - 1,
2113  pPoint_X - 1, pPoint_Y,
2115  render->RasterLine2D(pPoint_X, pPoint_Y - 1, pPoint_X,
2116  pPoint_Y,
2118  }
2119  }
2120  }
2121  }
2122  for (uint i = 0; i < uNumActors;
2123  ++i) { // draw actors(отрисовка монстров и нпс)
2124  if (pActors[i].uAIState != Removed &&
2125  pActors[i].uAIState != Disabled &&
2126  (pActors[i].uAIState == Dead || pActors[i].ActorNearby())) {
2127  pPoint_X =
2128  uCenterX +
2129  (fixpoint_mul(
2130  (pActors[i].vPosition.x - pParty->vPosition.x), uZoom));
2131  pPoint_Y =
2132  uCenterY -
2133  (fixpoint_mul(
2134  (pActors[i].vPosition.y - pParty->vPosition.y), uZoom));
2135  // if ( pPoint_X >= render->raster_clip_x && pPoint_X <=
2136  // render->raster_clip_z
2137  // && pPoint_Y >= render->raster_clip_y && pPoint_Y <=
2138  // render->raster_clip_w )
2139  {
2141  if (pActors[i].uAttributes & ACTOR_HOSTILE)
2143  if (pActors[i].uAIState == Dead)
2145  if (uZoom > 1024) {
2146  render->RasterLine2D(pPoint_X - 2, pPoint_Y - 1,
2147  pPoint_X - 2, pPoint_Y + 1,
2148  pColor);
2149  render->RasterLine2D(pPoint_X - 1, pPoint_Y - 2,
2150  pPoint_X - 1, pPoint_Y + 2,
2151  pColor);
2152  render->RasterLine2D(pPoint_X, pPoint_Y - 2, pPoint_X,
2153  pPoint_Y + 2, pColor);
2154  render->RasterLine2D(pPoint_X + 1, pPoint_Y - 2,
2155  pPoint_X + 1, pPoint_Y + 2,
2156  pColor);
2157  render->RasterLine2D(pPoint_X + 2, pPoint_Y - 1,
2158  pPoint_X + 2, pPoint_Y + 1,
2159  pColor);
2160  } else {
2161  render->RasterLine2D(pPoint_X - 1, pPoint_Y - 1,
2162  pPoint_X - 1, pPoint_Y, pColor);
2163  render->RasterLine2D(pPoint_X, pPoint_Y - 1, pPoint_X,
2164  pPoint_Y, pColor);
2165  }
2166  }
2167  }
2168  }
2169  for (uint i = 0; i < (signed int)uNumLevelDecorations;
2170  ++i) { // draw items(отрисовка предметов)
2171  if (pLevelDecorations[i].uFlags & 8) {
2172  pPoint_X =
2173  uCenterX + (fixpoint_mul((pLevelDecorations[i].vPosition.x -
2174  pParty->vPosition.x),
2175  uZoom));
2176  pPoint_Y =
2177  uCenterY - (fixpoint_mul((pLevelDecorations[i].vPosition.y -
2178  pParty->vPosition.y),
2179  uZoom));
2180  // if ( pPoint_X >= render->raster_clip_x && pPoint_X <=
2181  // render->raster_clip_z
2182  // && pPoint_Y >= render->raster_clip_y && pPoint_Y <=
2183  // render->raster_clip_w )
2184  {
2185  if ((signed int)uZoom > 512) {
2186  render->RasterLine2D(pPoint_X - 1, pPoint_Y - 1, pPoint_X - 1, pPoint_Y + 1, ui_game_minimap_decoration_color_1);
2187  render->RasterLine2D(pPoint_X, pPoint_Y - 1, pPoint_X, pPoint_Y + 1, ui_game_minimap_decoration_color_1);
2188  render->RasterLine2D(pPoint_X + 1, pPoint_Y - 1, pPoint_X + 1, pPoint_Y + 1, ui_game_minimap_decoration_color_1);
2189  } else {
2190  render->RasterLine2D(pPoint_X, pPoint_Y, pPoint_X, pPoint_Y, ui_game_minimap_decoration_color_1);
2191  }
2192  }
2193  }
2194  }
2195  }
2196 
2197  render->DrawTextureAlphaNew(468 / 640.0f, 0, game_ui_minimap_frame);
2198  render->SetUIClipRect(541, 0, 567, 480);
2199  render->DrawTextureAlphaNew((floorf(((double)pParty->sRotationY * 0.1171875) + 0.5f) + 285) / 640.0f,
2200  136 / 480.0f, game_ui_minimap_compass);
2201  render->ResetUIClipRect();
2202 }
2203 
2204 //----- (00441498) --------------------------------------------------------
2217  if (pParty->TorchlightActive()) {
2218  render->DrawTextureAlphaNew(
2219  pUIAnum_Torchlight->x / 640.0f, pUIAnum_Torchlight->y / 480.0f,
2222  pEventTimer->Time())
2223  ->GetTexture());
2224  }
2225  if (pParty->WizardEyeActive()) {
2226  render->DrawTextureAlphaNew(
2227  pUIAnim_WizardEye->x / 640.0f, pUIAnim_WizardEye->y / 480.0f,
2230  ->GetTexture());
2231  }
2232  }
2233 }
2234 
2235 //----- (00491F87) --------------------------------------------------------
2237  unsigned int v13; // eax@23
2238  char pContainer[20]; // [sp+Ch] [bp-30h]@18
2239  signed int uFrameID; // [sp+24h] [bp-18h]@19
2240  int v22; // [sp+34h] [bp-8h]@2
2241  unsigned __int8 pNPC_limit_ID; // [sp+3Bh] [bp-1h]@2
2242 
2243  char buf[4096];
2244  if (bNoNPCHiring != 1) {
2245  pNPC_limit_ID = 0;
2246  v22 = 0;
2247  if (pParty->pHirelings[0].pName) buf[v22++] = 0;
2248  if (pParty->pHirelings[1].pName) buf[v22++] = 1;
2249 
2250  for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i) {
2251  if (pNPCStats->pNewNPCData[i].uFlags & 128) {
2252  if (!pParty->pHirelings[0].pName ||
2253  strcmp(pNPCStats->pNewNPCData[i].pName,
2254  pParty->pHirelings[0].pName)) {
2255  if (!pParty->pHirelings[1].pName ||
2256  strcmp(pNPCStats->pNewNPCData[i].pName,
2257  pParty->pHirelings[1].pName))
2258  buf[v22++] = i + 2;
2259  }
2260  }
2261  }
2262 
2263  for (int i = pParty->hirelingScrollPosition;
2264  i < v22 && pNPC_limit_ID < 2; i++) {
2265  if ((unsigned __int8)buf[i] >= 2) {
2266  sprintf(pContainer, "NPC%03d",
2267  pNPCStats->pNPCData[(unsigned __int8)buf[i] + 499]
2268  .uPortraitID);
2269  render->DrawTextureAlphaNew(
2270  pHiredNPCsIconsOffsetsX[pNPC_limit_ID] / 640.0f,
2271  pHiredNPCsIconsOffsetsY[pNPC_limit_ID] / 480.0f,
2272  assets->GetImage_ColorKey(pContainer, 0x7FF));
2273  } else {
2274  sprintf(
2275  pContainer, "NPC%03d",
2276  pParty->pHirelings[(unsigned __int8)buf[i]].uPortraitID);
2277  render->DrawTextureAlphaNew(
2278  pHiredNPCsIconsOffsetsX[pNPC_limit_ID] / 640.0f,
2279  pHiredNPCsIconsOffsetsY[pNPC_limit_ID] / 480.0f,
2280  assets->GetImage_ColorKey(pContainer, 0x7FF));
2281  if (pParty->pHirelings[(unsigned __int8)buf[i]].evt_A == 1) {
2282  uFrameID =
2283  pParty->pHirelings[(unsigned __int8)buf[i]].evt_B;
2284  v13 = 0;
2285  if (pIconsFrameTable->uNumIcons) {
2286  for (v13 = 0; v13 < pIconsFrameTable->uNumIcons;
2287  ++v13) {
2288  if (!_stricmp("spell96",
2289  pIconsFrameTable->pIcons[v13]
2290  .GetAnimationName()))
2291  break;
2292  }
2293  }
2294  render->DrawTextureAlphaNew(
2295  pHiredNPCsIconsOffsetsX[pNPC_limit_ID] / 640.0f,
2296  pHiredNPCsIconsOffsetsY[pNPC_limit_ID] / 480.0f,
2297  pIconsFrameTable->GetFrame(v13, uFrameID)
2298  ->GetTexture());
2299  }
2300  }
2301  ++pNPC_limit_ID;
2302  }
2303  }
2304 }
2305 
2306 //----- (004178FE) --------------------------------------------------------
2307 unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(int actual_value,
2308  int base_value) {
2309  unsigned __int16 R, G, B;
2310 
2311  if (actual_value == base_value) {
2312  R = 0, G = 0, B = 0; // White
2313  } else if (actual_value < base_value) {
2314  if (100 * actual_value / base_value >=
2315  25) // Yellow( current_pos > 1/4 )
2316  R = 255, G = 255, B = 100;
2317  else // Red( current_pos < 1/4 )
2318  R = 255, G = 0, B = 0;
2319  } else { // Green
2320  R = 0, G = 255, B = 0;
2321  }
2322 
2323  return Color16(R, G, B);
2324 }
2325 
2326 //----- (00417939) --------------------------------------------------------
2327 int GetConditionDrawColor(unsigned int uConditionIdx) {
2328  switch (uConditionIdx) {
2329  case Condition_Zombie:
2330  case Condition_Good:
2332 
2333  case Condition_Cursed:
2334  case Condition_Weak:
2335  case Condition_Fear:
2336  case Condition_Drunk:
2337  case Condition_Insane:
2338  case Condition_Poison_Weak:
2341 
2342  case Condition_Sleep:
2345  case Condition_Paralyzed:
2346  case Condition_Unconcious:
2348 
2351  case Condition_Dead:
2352  case Condition_Pertified:
2353  case Condition_Eradicated:
2355  }
2356  Error("Invalid condition (%u)", uConditionIdx);
2357 }
2358 
2359 //----- (00495430) --------------------------------------------------------
2360 String GetReputationString(int reputation) {
2361  if (reputation >= 25)
2362  return localization->GetString(379); // Hated
2363  else if (reputation >= 6)
2364  return localization->GetString(392); // Unfriendly
2365  else if (reputation >= -5)
2366  return localization->GetString(399); // Neutral
2367  else if (reputation >= -24)
2368  return localization->GetString(402); // Friendly
2369  else
2370  return localization->GetString(434); // Respected
2371 }
2372 
2373 __int16 _441A4E_overlay_on_portrait(int a1) { // for blessing
2374  __int16 result; // ax@1
2375  int v2; // ebx@1
2376  bool v5; // ecx@4
2377  SpriteFrame *pFrame; // eax@6
2378  int v8; // eax@6
2379  SoftwareBillboard v10; // [sp+Ch] [bp-5Ch]@1
2380  int v11; // [sp+5Ch] [bp-Ch]@6
2381  int v12; // [sp+60h] [bp-8h]@1
2382 
2383  v10.sParentBillboardID = -1;
2384  v10.pTargetZ = render->pActiveZBuffer;
2385  v10.uTargetPitch = render->GetRenderWidth();
2386  result = 0;
2387  v2 = a1;
2388  v10.uViewportX = 0;
2389  v10.uViewportY = 0;
2390  v10.uViewportZ = window->GetWidth() - 1;
2391  v10.uViewportW = window->GetHeight() - 1;
2392  v12 = 0;
2393  // v3 = (char *)&pOtherOverlayList->pOverlays[0].field_C;
2394  // do
2395  for (uint i = 0; i < 50; ++i) {
2396  if (pOtherOverlayList->pOverlays[i].field_6 > 0) {
2398  if (pOtherOverlayList->pOverlays[i].field_0 >= 300) {
2399  // v4 = result;
2400  v5 = pOtherOverlayList->pOverlays[i].field_0 == v2 + 320 ||
2401  pOtherOverlayList->pOverlays[i].field_0 == v2 + 330 ||
2402  pOtherOverlayList->pOverlays[i].field_0 == v2 + 340 ||
2403  pOtherOverlayList->pOverlays[i].field_0 == v2 + 350;
2404  pOtherOverlayList->pOverlays[i].field_0 = v2 + 310;
2405  if (pOtherOverlayList->pOverlays[i].field_0 == v2 + 310 || v5) {
2406  if (!pOtherOverlayList->pOverlays[i].field_0) {
2407  pFrame = pSpriteFrameTable->GetFrame(
2408  pOverlayList
2409  ->pOverlays[pOtherOverlayList->pOverlays[i]
2410  .field_2]
2411  .uSpriteFramesetID,
2413  // v7 = v6;
2415  // v13 = pFrame->scale;
2416  // v13 = fixpoint_mul(v11, pFrame->scale);
2417  v10.screen_space_x =
2419  v10.screen_space_y =
2421  v10.screenspace_projection_factor_x = v11 * pFrame->scale.GetFloat();
2422  v10.screenspace_projection_factor_y = v11 * pFrame->scale.GetFloat();
2424  pFrame->uPaletteIndex, 0, 1);
2426  v10.screen_space_z = 0;
2427  v10.object_pid = 0;
2428  v10.uFlags = 0;
2429  // v9 = pOverlayList->pOverlays[v8].uOverlayType;
2430  if (!pOverlayList->pOverlays[v8].uOverlayType ||
2432  v10.screen_space_y +=
2433  pFrame->hw_sprites[0]->sprite_header->uHeight /
2434  2;
2435  result = pFrame->hw_sprites[0]->sprite_header->_4AD2D1_overlays(&v10, 0);
2436  ++v12;
2437  if (v12 == 5) break;
2438  }
2439  }
2440  }
2441  }
2442  // v3 += 20;
2443  }
2444  // while ( (signed int)v3 < (signed int)&pOverlayList->pOverlays );
2445  return result;
2446 }
2447 
2448 
2450  : GUIWindow(WINDOW_DebugMenu, 0, 0, window->GetWidth(), window->GetHeight(), 0) {
2451 
2452  pEventTimer->Pause();
2453  int width = 108;
2454  int height = 20;
2455 
2456  game_ui_menu_options = assets->GetImage_ColorKey("options", 0x7FF);
2457 
2458  GUIButton *pBtn_DebugTownPortal = CreateButton(13, 140, width, height, 1, 0, UIMSG_DebugTownPortal, 0, 0, "DEBUG TOWN PORTAL");
2459  GUIButton *pBtn_DebugGiveGold = CreateButton(127, 140, width, height, 1, 0, UIMSG_DebugGiveGold, 0, 0, "DEBUG GIVE GOLD (10000)");
2460  GUIButton *pBtn_DebugGiveEXP = CreateButton(241, 140, width, height, 1, 0, UIMSG_DebugGiveEXP, 0, 0, "DEBUG GIVE EXP (20000)");
2461  GUIButton *pBtn_DebugGiveSkillP = CreateButton(354, 140, width, height, 1, 0, UIMSG_DebugGiveSkillP, 0, 0, "DEBUG GIVE SKILL POINT (50)");
2462 
2463  GUIButton *pBtn_DebugLearnSkill = CreateButton(13, 167, width, height, 1, 0, UIMSG_DebugLearnSkills, 0, 0, "DEBUG LEARN CLASS SKILLS");
2464  GUIButton *pBtn_DebugRemoveGold = CreateButton(127, 167, width, height, 1, 0, UIMSG_DebugTakeGold, 0, 0, "DEBUG REMOVE GOLD");
2465  GUIButton *pBtn_DebugAddFood = CreateButton(241, 167, width, height, 1, 0, UIMSG_DebugGiveFood, 0, 0, "DEBUG GIVE FOOD (20)");
2466  GUIButton *pBtn_DebugTakeFood = CreateButton(354, 167, width, height, 1, 0, UIMSG_DebugTakeFood, 0, 0, "DEBUG REMOVE FOOD");
2467 
2468  GUIButton *pBtn_DebugCycleAlign = CreateButton(13, 194, width, height, 1, 0, UIMSG_DebugCycleAlign, 0, 0, "DEBUG CYCLE ALIGNMENT");
2469  GUIButton *pBtn_DebugWizardEye = CreateButton(127, 194, width, height, 1, 0, UIMSG_DebugWizardEye, 0, 0, "DEBUG TOGGLE WIZARD EYE");
2470  GUIButton *pBtn_DebugAllMagic = CreateButton(241, 194, width, height, 1, 0, UIMSG_DebugAllMagic, 0, 0, "DEBUG TOGGLE All MAGIC");
2471  GUIButton *pBtn_DebugTerrain = CreateButton(354, 194, width, height, 1, 0, UIMSG_DebugTerrain, 0, 0, "DEBUG TOGGLE TERRAIN");
2472 
2473  GUIButton *pBtn_DebugLightMap = CreateButton(13, 221, width, height, 1, 0, UIMSG_DebugLightmap, 0, 0, "DEBUG TOGGLE LIGHTMAP DECAL");
2474  GUIButton *pBtn_DebugTurbo = CreateButton(127, 221, width, height, 1, 0, UIMSG_DebugTurboSpeed, 0, 0, "DEBUG TOGGLE TURBO SPEED");
2475  GUIButton *pBtn_DebugNoActors = CreateButton(241, 221, width, height, 1, 0, UIMSG_DebugNoActors, 0, 0, "DEBUG TOGGLE ACTORS");
2476  GUIButton *pBtn_DebugDrawDist = CreateButton(354, 221, width, height, 1, 0, UIMSG_DebugDrawDist, 0, 0, "DEBUG TOGGLE EXTENDED DRAW DISTANCE");
2477 
2478  GUIButton *pBtn_DebugSnow = CreateButton(13, 248, width, height, 1, 0, UIMSG_DebugSnow, 0, 0, "DEBUG TOGGLE SNOW");
2479  GUIButton *pBtn_DebugPortalLines = CreateButton(127, 248, width, height, 1, 0, UIMSG_DebugPortalLines, 0, 0, "DEBUG TOGGLE PORTAL OUTLINES");
2480  GUIButton *pBtn_DebugPickedFace = CreateButton(241, 248, width, height, 1, 0, UIMSG_DebugPickedFace, 0, 0, "DEBUG TOGGLE SHOW PICKED FACE");
2481  GUIButton *pBtn_DebugShowFPS = CreateButton(354, 248, width, height, 1, 0, UIMSG_DebugShowFPS, 0, 0, "DEBUG TOGGLE SHOW FPS");
2482 
2483  GUIButton *pBtn_DebugSeasonsChange = CreateButton(13, 275, width, height, 1, 0, UIMSG_DebugSeasonsChange, 0, 0, "DEBUG TOGGLE SEASONS CHANGE");
2484  GUIButton *pBtn_DebugFarClipToggle = CreateButton(127, 275, width, height, 1, 0, UIMSG_DebugFarClip, 0, 0, "DEBUG TOGGLE FAR CLIP DISTANCE");
2485  GUIButton *pBtn_DebugGenItem = CreateButton(241, 275, width, height, 1, 0, UIMSG_DebugGenItem, 0, 0, "DEBUG GENERATE RANDOM ITEM");
2486  GUIButton *pBtn_DebugSpecialItem = CreateButton(354, 275, width, height, 1, 0, UIMSG_DebugSpecialItem, 0, 0, "DEBUG GENERATE RANDOM SPECIAL ITEM");
2487 
2488  //
2489 
2490  GUIButton *pBtn_DebugKillChar = CreateButton(13, 329, width, height, 1, 0, UIMSG_DebugKillChar, 0, 0, "DEBUG KILL SELECTED CHARACTER");
2491  GUIButton *pBtn_DebugEradicate = CreateButton(127, 329, width, height, 1, 0, UIMSG_DebugEradicate, 0, 0, "DEBUG ERADICATE SELECTED CHARACTER");
2492  GUIButton *pBtn_DebugNoDamage = CreateButton(241, 329, width, height, 1, 0, UIMSG_DebugNoDamage, 0, 0, "DEBUG TOGGLE NO DAMAGE");
2493  GUIButton *pBtn_DebugFullHeal = CreateButton(354, 329, width, height, 1, 0, UIMSG_DebugFullHeal, 0, 0, "DEBUG FULLY HEAL SELECTED CHARACTER");
2494 }
2495 
2497  render->DrawTextureAlphaNew(pViewport->uViewportTL_X / 640.0f,
2498  pViewport->uViewportTL_Y / 480.0f,
2500 
2501  buttonbox(13, 140, "Town Portal", engine->config->debug_town_portal);
2502  buttonbox(127, 140, "Give Gold", 2);
2503  buttonbox(241, 140, "Give EXP", 2);
2504  buttonbox(354, 140, "Give Skill", 2);
2505 
2506  buttonbox(13, 167, "Learn Skills", 2);
2507  buttonbox(127, 167, "Take Gold", 2);
2508  buttonbox(241, 167, "Give Food", 2);
2509  buttonbox(354, 167, "Take Food", 2);
2510 
2511  int col = 0;
2514  buttonbox(13, 194, "Alignment", col);
2515  buttonbox(127, 194, "WizardEye", engine->config->debug_wizard_eye);
2516  buttonbox(241, 194, "All Magic", engine->config->debug_all_magic);
2517  buttonbox(354, 194, "Terrain", engine->config->debug_terrain);
2518 
2519  buttonbox(13, 221, "Lightmap", engine->config->debug_lightmaps_decals);
2520  buttonbox(127, 221, "Turbo", engine->config->debug_turbo_speed);
2521  buttonbox(241, 221, "Actors", engine->config->no_actors);
2522  buttonbox(354, 221, "Draw Dist", engine->config->extended_draw_distance);
2523 
2524  buttonbox(13, 248, "Snow", engine->config->allow_snow);
2525  buttonbox(127, 248, "Portal Lines", engine->config->debug_portal_outlines);
2526  buttonbox(241, 248, "Picked Face", engine->config->show_picked_face);
2527  buttonbox(354, 248, "Show FPS", engine->config->show_fps);
2528 
2529  buttonbox(13, 275, "Seasons", engine->config->seasons_change);
2530  buttonbox(127, 275, "Far Clip", pODMRenderParams->far_clip == 0x6000);
2531  buttonbox(241, 275, "Gen Item", 2);
2532  buttonbox(354, 275, "Special Item", 2);
2533 
2534  // times ??
2535  // conditions ??
2536 
2537  buttonbox(13, 329, "Dead", 2);
2538  buttonbox(127, 329, "Eradicate", 2);
2539  buttonbox(241, 329, "No Damage", engine->config->no_damage);
2540  buttonbox(354, 329, "Full Heal", 2);
2541 
2542  viewparams->bRedrawGameUI = true;
2543 }
2544 
2545 void buttonbox(int x, int y, char* text, int col) {
2546  int width = 108;
2547  int height = 20;
2548  render->FillRectFast(x, y, width+1, height+1, Color16(50, 50, 50));
2549 
2550  render->RasterLine2D(x-1, y-1, x+width+1, y-1, Color16(0xE1u, 255, 0x9Bu));
2551  render->RasterLine2D(x-1, y-1, x-1, y+height+1, Color16(0xE1u, 255, 0x9Bu));
2552  render->RasterLine2D(x-1, y+height+1, x+width+1, y+height+1, Color16(0xE1u, 255, 0x9Bu));
2553  render->RasterLine2D(x+width+1, y-1, x+width+1, y+height+1, Color16(0xE1u, 255, 0x9Bu));
2554 
2556  if (col == 2) {
2557  colour = 0;
2558  }
2559  if (col == 1) {
2561  }
2562  pGUIWindow_CurrentMenu->DrawText(pFontArrus, x+1, y+2, colour, text, 0, 0, 0);
2563 }
UIGame.h
Party::pPickedItem
ItemGen pPickedItem
Definition: Party.h:312
OptionsMenuSkin
Definition: Image.h:149
UIMSG_DebugGiveSkillP
@ UIMSG_DebugGiveSkillP
Definition: GUIWindow.h:242
game_ui_btn_zoomout
Image * game_ui_btn_zoomout
Definition: UIGame.cpp:89
game_ui_btn_settings
Image * game_ui_btn_settings
Definition: UIGame.cpp:91
IconFrameTable.h
CURRENT_SCREEN::SCREEN_OPTIONS
@ SCREEN_OPTIONS
SoftwareBillboard::pPalette
uint16_t * pPalette
Definition: IRender.h:179
Player
Definition: Player.h:401
GameUI_DrawNPCPopup
void GameUI_DrawNPCPopup(void *_this)
Definition: UIGame.cpp:891
game_ui_btn_cast
Image * game_ui_btn_cast
Definition: UIGame.cpp:87
GUIWindow::DrawText
void DrawText(GUIFont *font, int x, int y, unsigned short uFontColor, const char *str, bool present_time_transparency=false, int max_text_height=0, int uFontShadowColor=0)
Definition: GUIWindow.cpp:694
uNumActors
size_t uNumActors
Definition: Actor.cpp:39
ui_gamemenu_keys_key_default_color
unsigned int ui_gamemenu_keys_key_default_color
Definition: UICharacter.cpp:75
Party::vPosition
Vec3_int_ vPosition
Definition: Party.h:250
Engine_::IocContainer
Definition: IocContainer.h:15
ui_game_minimap_treasure_color
unsigned int ui_game_minimap_treasure_color
Definition: UICharacter.cpp:68
pBtn_NewGame
GUIButton * pBtn_NewGame
Definition: GUIButton.cpp:79
face
GLenum GLuint GLint GLenum face
Definition: SDL_opengl_glext.h:3022
GUIWindow::uFrameW
unsigned int uFrameW
Definition: GUIWindow.h:473
int_get_vector_length
uint32_t int_get_vector_length(int32_t x, int32_t y, int32_t z)
Definition: VectorTypes.cpp:8
UIMessageType
UIMessageType
Definition: GUIWindow.h:13
PLAYER_BUFF_PAIN_REFLECTION
@ PLAYER_BUFF_PAIN_REFLECTION
Definition: Player.h:24
game_ui_tome_maps
Image * game_ui_tome_maps
Definition: UIGame.cpp:82
Condition_Poison_Medium
@ Condition_Poison_Medium
Definition: Conditions.h:16
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
NPCData::uProfession
unsigned int uProfession
Definition: NPC.h:89
Localization::GetCharacterConditionName
const char * GetCharacterConditionName(unsigned int index) const
Definition: Localization.h:75
SpriteFrame::hw_sprites
Sprite * hw_sprites[8]
Definition: Sprites.h:46
UIDialogue.h
UIMSG_SetTurnSpeed
@ UIMSG_SetTurnSpeed
Definition: GUIWindow.h:151
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
Player::_expression21_animtime
int _expression21_animtime
Definition: Player.h:792
PlayerFrame
Definition: PlayerFrameTable.h:7
GUIWindow_CharacterRecord
Definition: UICharacter.h:4
uSpeakingCharacter
int uSpeakingCharacter
Definition: mm7_data.cpp:764
UIMSG_Escape
@ UIMSG_Escape
Definition: GUIWindow.h:96
PartyAlignment::PartyAlignment_Neutral
@ PartyAlignment_Neutral
Viewport.h
DrawBuff_remaining_time_string
void DrawBuff_remaining_time_string(int uY, GUIWindow *window, GameTime remaining_time, GUIFont *Font)
Definition: GUIWindow.cpp:1343
Timer::Time
uint64_t Time()
Definition: Time.cpp:11
Timer::uTimeElapsed
unsigned int uTimeElapsed
Definition: Time.h:133
game_ui_btn_zoomin
Image * game_ui_btn_zoomin
Definition: UIGame.cpp:88
OptionsMenuSkin::uTextureID_SoundLevels
Image * uTextureID_SoundLevels[10]
Definition: Image.h:161
MapStats::pInfos
MapInfo pInfos[77]
Definition: MapInfo.h:79
LOD.h
Image::GetHeight
unsigned int GetHeight()
Definition: Image.cpp:230
DecorationList::GetDecoration
DecorationDesc * GetDecoration(unsigned int index)
Definition: DecorationList.h:65
Party::GetPlayingTime
GameTime & GetPlayingTime()
Definition: Party.h:230
stru193_math::uDoublePiMask
static const unsigned int uDoublePiMask
Definition: OurMath.h:91
UIMSG_Quit
@ UIMSG_Quit
Definition: GUIWindow.h:114
Game.h
UIMSG_DebugWizardEye
@ UIMSG_DebugWizardEye
Definition: GUIWindow.h:236
game_ui_minimap_frame
Image * game_ui_minimap_frame
Definition: UIGame.cpp:68
GUIWindow
Definition: GUIWindow.h:433
PlayerFrameTable::GetFrameBy_x
PlayerFrame * GetFrameBy_x(unsigned int uFramesetID, unsigned int uFrameID)
Definition: PlayerFrameTable.cpp:17
DecorationList.h
UIMSG_ToggleAlwaysRun
@ UIMSG_ToggleAlwaysRun
Definition: GUIWindow.h:187
GameMenuUI_InvaligKeyBindingsFlags
std::array< bool, 28 > GameMenuUI_InvaligKeyBindingsFlags
Definition: UIGame.cpp:210
Mouse
Definition: Mouse.h:279
Icon::GetAnimationName
const char * GetAnimationName() const
Definition: IconFrameTable.h:15
pSpriteFrameTable
struct SpriteFrameTable * pSpriteFrameTable
Definition: Sprites.cpp:22
OutdoorLocation::pBModels
BSPModelList pBModels
Definition: Outdoor.h:119
OptionsMenuSkin::Relaease
void Relaease()
Definition: UIGame.cpp:622
ui_game_minimap_actor_friendly_color
unsigned int ui_game_minimap_actor_friendly_color
Definition: UICharacter.cpp:63
pSpriteObjects
std::array< SpriteObject, MAX_SPRITE_OBJECTS > pSpriteObjects
Definition: SpriteObject.cpp:34
Viewport::uViewportTL_Y
int uViewportTL_Y
Definition: Viewport.h:23
uGammaPos
unsigned int uGammaPos
Definition: mm7_data.cpp:214
NPCData::uFlags
unsigned int uFlags
Definition: NPC.h:84
OBJECT_Item
@ OBJECT_Item
Definition: Actor.h:66
OptionsMenuSkin::OptionsMenuSkin
OptionsMenuSkin()
Definition: UIGame.cpp:607
pMonsterStats
struct MonsterStats * pMonsterStats
Definition: Monsters.cpp:8
UIMSG_DebugLearnSkills
@ UIMSG_DebugLearnSkills
Definition: GUIWindow.h:241
OptionsMenuSkin::uTextureID_ArrowLeft
Image * uTextureID_ArrowLeft
Definition: Image.h:155
GUIWindow_GameVideoOptions::GUIWindow_GameVideoOptions
GUIWindow_GameVideoOptions()
Definition: UIGame.cpp:514
uGameState
unsigned int uGameState
Definition: mm7_data.cpp:695
UIMSG_DebugGiveFood
@ UIMSG_DebugGiveFood
Definition: GUIWindow.h:239
NPCData::Hired
bool Hired()
Definition: NPC.h:80
PLAYER_BUFF_SHIELD
@ PLAYER_BUFF_SHIELD
Definition: Player.h:27
ViewingParams::location_minimap
class Image * location_minimap
Definition: Viewport.h:73
pGUIWindow_CurrentMenu
GUIWindow * pGUIWindow_CurrentMenu
Definition: GUIWindow.cpp:54
_44100D_should_alter_right_panel
bool _44100D_should_alter_right_panel()
Definition: Engine.cpp:2454
GAME_STATE_FINAL_WINDOW
@ GAME_STATE_FINAL_WINDOW
Definition: Engine.h:41
game_ui_menu_controls
Image * game_ui_menu_controls
Definition: UIGame.cpp:74
PlayerFrameTable::pFrames
struct PlayerFrame * pFrames
Definition: PlayerFrameTable.h:29
SpellStats::pInfos
SpellInfo pInfos[100]
Definition: Spells.h:192
SpellBuff
Definition: Spells.h:147
GUIWindow::CreateButton
GUIButton * CreateButton(int x, int y, int width, int height, int a6, int a7, UIMessageType msg, unsigned int msg_param, uint8_t hotkey, const String &label, const std::vector< Image * > &textures=std::vector< Image * >())
Definition: GUIWindow.cpp:717
dialog_menu_id
HOUSE_DIALOGUE_MENU dialog_menu_id
Definition: UIHouses.cpp:50
PlayerSpeechID
enum PlayerSpeech PlayerSpeechID
Definition: Player.cpp:48
pIconsFrameTable
struct IconFrameTable * pIconsFrameTable
Definition: mm7_data.cpp:168
height
EGLSurface EGLint EGLint EGLint EGLint height
Definition: SDL_egl.h:1596
ui_game_minimap_actor_corpse_color
unsigned int ui_game_minimap_actor_corpse_color
Definition: UICharacter.cpp:65
pHiredNPCsIconsOffsetsY
std::array< unsigned int, 2 > pHiredNPCsIconsOffsetsY
Definition: mm7_data.cpp:472
KeyboardPageNum
int KeyboardPageNum
Definition: mm7_data.cpp:542
CURRENT_SCREEN::SCREEN_CHEST
@ SCREEN_CHEST
MapStats::GetMapInfo
MAP_TYPE GetMapInfo(const String &Str2)
Definition: MapInfo.cpp:225
PartyAlignment::PartyAlignment_Evil
@ PartyAlignment_Evil
Party::hirelingScrollPosition
unsigned __int8 hirelingScrollPosition
Definition: Party.h:268
CURRENT_SCREEN::SCREEN_SPELL_BOOK
@ SCREEN_SPELL_BOOK
GameUI_CharacterQuickRecord_Draw
void GameUI_CharacterQuickRecord_Draw(GUIWindow *window, Player *player)
Definition: UIGame.cpp:1057
pNPCTopics
std::array< NPCTopic, 789 > pNPCTopics
Definition: mm7_data.cpp:740
BLVMapOutlines::uNumOutlines
int uNumOutlines
Definition: Indoor.h:569
SpriteObject.h
game_ui_bottomframe
Image * game_ui_bottomframe
Definition: UIGame.cpp:59
OtherOverlay::sprite_frame_time
int16_t sprite_frame_time
Definition: Overlays.h:13
PlayerFrame::uTextureID
unsigned __int16 uTextureID
Definition: PlayerFrameTable.h:9
GameUI_WritePointedObjectStatusString
void GameUI_WritePointedObjectStatusString()
Definition: UIGame.cpp:1266
PaletteManager::Get_Dark_or_Red_LUT
static uint16_t * Get_Dark_or_Red_LUT(int paletteIdx, int a2, char a3)
Definition: PaletteManager.cpp:809
Player::CanAct
bool CanAct()
Definition: Player.cpp:549
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
GetConditionDrawColor
int GetConditionDrawColor(unsigned int uConditionIdx)
Definition: UIGame.cpp:2327
SpriteFrame::scale
fixed scale
Definition: Sprites.h:47
PlayerFrameTable::GetFrameBy_y
PlayerFrame * GetFrameBy_y(int *a2, int *a3, int a4)
Definition: PlayerFrameTable.cpp:45
Texture
Definition: Texture.h:4
Party::GetRedAlert
bool GetRedAlert()
Definition: Party.h:221
Viewport::Contains
bool Contains(unsigned int x, unsigned int y)
Definition: Viewport.cpp:67
UIMSG_DebugGiveEXP
@ UIMSG_DebugGiveEXP
Definition: GUIWindow.h:243
game_ui_leftframe
Image * game_ui_leftframe
Definition: UIGame.cpp:58
UIMSG_ChangeMusicVolume
@ UIMSG_ChangeMusicVolume
Definition: GUIWindow.h:95
game_ui_tome_autonotes
Image * game_ui_tome_autonotes
Definition: UIGame.cpp:83
options_menu_skin
OptionsMenuSkin options_menu_skin
Definition: UIGame.cpp:606
SoftwareBillboard::screenspace_projection_factor_y
float screenspace_projection_factor_y
Definition: IRender.h:177
BLVFaceExtra::uEventID
uint16_t uEventID
Definition: Indoor.h:512
GameUI_DrawRightPanel
void GameUI_DrawRightPanel()
Definition: UIGame.cpp:1248
BSPModel::sBoundingRadius
int32_t sBoundingRadius
Definition: BSPModel.h:187
bNoNPCHiring
char bNoNPCHiring
Definition: mm7_data.cpp:720
localization
Localization * localization
Definition: Localization.cpp:11
GameUI_LoadPlayerPortraintsAndVoices
void GameUI_LoadPlayerPortraintsAndVoices()
Definition: UIGame.cpp:170
Party::FlyActive
bool FlyActive()
Definition: Party.h:202
buttonbox
void buttonbox(int x, int y, char *text, int col)
Definition: UIGame.cpp:2545
Overlays.h
game_ui_bar_red
Image * game_ui_bar_red
Definition: UIGame.cpp:113
Icon::id
int id
Definition: IconFrameTable.h:35
UIMSG_DebugGiveGold
@ UIMSG_DebugGiveGold
Definition: GUIWindow.h:244
game_ui_menu_options_video_gamma_positions
std::array< Image *, 10 > game_ui_menu_options_video_gamma_positions
Definition: UIGame.cpp:99
PaletteManager.h
GameUI_StatusBar_Set
void GameUI_StatusBar_Set(const String &str)
Definition: UIStatusBar.cpp:15
OptionsMenuSkin::uTextureID_ArrowRight
Image * uTextureID_ArrowRight
Definition: Image.h:156
PlayerFrameTable.h
PlayerFrame::expression
CHARACTER_EXPRESSION_ID expression
Definition: PlayerFrameTable.h:8
SoftwareBillboard::screenspace_projection_factor_x
float screenspace_projection_factor_x
Definition: IRender.h:176
Party::pPlayers
std::array< Player, 4 > pPlayers
Definition: Party.h:310
GameUI_OnPlayerPortraitLeftClick
void GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID)
Definition: UIGame.cpp:796
bFlashAutonotesBook
char bFlashAutonotesBook
Definition: mm7_data.cpp:548
GUIWindow::DrawTitleText
void DrawTitleText(GUIFont *font, int horizontal_margin, int vertical_margin, unsigned __int16 uDefaultColor, const char *pInString, int line_spacing)
Definition: GUIWindow.cpp:665
BLVFace::Clickable
bool Clickable() const
Definition: Indoor.h:453
DecorationDesc_mm6::field_20
char field_20[32]
Definition: DecorationList.h:38
UIMSG_DebugTakeGold
@ UIMSG_DebugTakeGold
Definition: GUIWindow.h:240
GUIFont.h
SpriteFrame::uPaletteIndex
int uPaletteIndex
Definition: Sprites.h:51
OtherOverlay::field_0
int16_t field_0
Definition: Overlays.h:11
Icon::GetTexture
Texture * GetTexture()
Definition: IconFrameTable.cpp:9
OptionsMenuSkin::uTextureID_TurnSpeed
Image * uTextureID_TurnSpeed[3]
Definition: Image.h:154
Localization::GetSpellName
const char * GetSpellName(unsigned int index) const
Definition: Localization.h:31
GUIFont::GetHeight
unsigned int GetHeight() const
Definition: GUIFont.cpp:84
game_ui_monster_hp_yellow
Image * game_ui_monster_hp_yellow
Definition: UIGame.cpp:62
OBJECT_Decoration
@ OBJECT_Decoration
Definition: Actor.h:69
game_ui_monster_hp_green
Image * game_ui_monster_hp_green
Definition: UIGame.cpp:61
BLVMapOutline::sZ
int16_t sZ
Definition: Indoor.h:417
AssetsManager.h
ui_character_bonus_text_color
unsigned int ui_character_bonus_text_color
Definition: UICharacter.cpp:46
Condition_Paralyzed
@ Condition_Paralyzed
Definition: Conditions.h:20
pPlayers
NZIArray< struct Player *, 5 > pPlayers
Definition: Player.cpp:46
UIMSG_DebugEradicate
@ UIMSG_DebugEradicate
Definition: GUIWindow.h:226
BLVMapOutline
Definition: Indoor.h:412
GUIWindow::uFrameWidth
unsigned int uFrameWidth
Definition: GUIWindow.h:470
TurnEngine.h
GameUI_DrawTorchlightAndWizardEye
void GameUI_DrawTorchlightAndWizardEye()
Definition: UIGame.cpp:2205
BtnTurnCoord
std::array< int, 8 > BtnTurnCoord
Definition: mm7_data.cpp:215
GUIButton
Definition: GUIButton.h:11
game_ui_bar_blue
Image * game_ui_bar_blue
Definition: UIGame.cpp:116
GUIWindow::receives_keyboard_input_2
int receives_keyboard_input_2
Definition: GUIWindow.h:486
pIndoor
IndoorLocation * pIndoor
Definition: Indoor.cpp:49
GUIWindow::uFrameZ
unsigned int uFrameZ
Definition: GUIWindow.h:472
Condition_Insane
@ Condition_Insane
Definition: Conditions.h:13
Chest.h
pManaBarPos
std::array< unsigned int, 4 > pManaBarPos
Definition: mm7_data.cpp:229
Engine.h
UIMSG_ChangeVoiceVolume
@ UIMSG_ChangeVoiceVolume
Definition: GUIWindow.h:153
current_screen_type
enum CURRENT_SCREEN current_screen_type
Definition: GUIWindow.cpp:83
Image.h
IconFrameTable::uNumIcons
unsigned int uNumIcons
Definition: IconFrameTable.h:64
pTurnEngine
struct stru262_TurnBased * pTurnEngine
Definition: TurnEngine.cpp:21
Dead
@ Dead
Definition: Actor.h:80
Player::IsEradicated
bool IsEradicated() const
Definition: Player.cpp:7420
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9435
pMapStats
struct MapStats * pMapStats
Definition: mm7_data.cpp:20
Party::pPartyBuffs
std::array< SpellBuff, 20 > pPartyBuffs
Definition: Party.h:309
GUIWindow::vButtons
std::vector< GUIButton * > vButtons
Definition: GUIWindow.h:489
ui_gamemenu_video_gamma_title_color
unsigned int ui_gamemenu_video_gamma_title_color
Definition: UICharacter.cpp:71
PlayerFrameTable::uNumFrames
unsigned int uNumFrames
Definition: PlayerFrameTable.h:28
OBJECT_Actor
@ OBJECT_Actor
Definition: Actor.h:67
game_ui_player_alert_green
Image * game_ui_player_alert_green
Definition: UIGame.cpp:111
ImageHelper::GetWidthLn2
static int GetWidthLn2(Image *img)
Definition: Image.h:59
GameUI_DrawHiredNPCs
void GameUI_DrawHiredNPCs()
Definition: UIGame.cpp:2236
UIMSG_DebugKillChar
@ UIMSG_DebugKillChar
Definition: GUIWindow.h:225
WINDOW_GameMenu
@ WINDOW_GameMenu
Definition: GUIWindow.h:293
Events.h
uGameUIFontShadow
unsigned int uGameUIFontShadow
Definition: mm7_data.cpp:552
game_ui_btn_quickref
Image * game_ui_btn_quickref
Definition: UIGame.cpp:90
Actor.h
GameUI_DrawCharacterSelectionFrame
void GameUI_DrawCharacterSelectionFrame()
Definition: UIGame.cpp:1688
party_buff_icons
std::array< class Image *, 14 > party_buff_icons
Definition: mm7_data.cpp:596
UIHouses.h
IMAGE_FORMAT_A8R8G8B8
@ IMAGE_FORMAT_A8R8G8B8
Definition: Image.h:7
ui_character_condition_light_color
unsigned int ui_character_condition_light_color
Definition: UICharacter.cpp:57
PARTY_FLAGS_1_STANDING_ON_WATER
@ PARTY_FLAGS_1_STANDING_ON_WATER
Definition: Party.h:61
CURRENT_SCREEN::SCREEN_E
@ SCREEN_E
game_ui_playerbuff_bless
Image * game_ui_playerbuff_bless
Definition: UIGame.cpp:121
current_character_screen_window
enum WindowType current_character_screen_window
Definition: GUIWindow.cpp:78
pUIAnum_Torchlight
UIAnimation * pUIAnum_Torchlight
Definition: Party.cpp:48
WINDOW_DebugMenu
@ WINDOW_DebugMenu
Definition: GUIWindow.h:350
GUIButton::Contains
bool Contains(unsigned int x, unsigned int y)
Definition: GUIButton.cpp:113
FillAwardsData
void FillAwardsData()
Definition: UICharacter.cpp:2598
Localization.h
OtherOverlayList::pOverlays
OtherOverlay pOverlays[50]
Definition: Overlays.h:36
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
Image::GetWidth
unsigned int GetWidth()
Definition: Image.cpp:217
game_ui_player_face_eradicated
Image * game_ui_player_face_eradicated
Definition: UIGame.cpp:105
NPCStats::uNumNewNPCs
unsigned int uNumNewNPCs
Definition: NPC.h:179
game_ui_bar_green
Image * game_ui_bar_green
Definition: UIGame.cpp:115
Party::GetYellowAlert
bool GetYellowAlert()
Definition: Party.h:225
TurnBased_QueueElem::uPackedID
int uPackedID
Definition: TurnEngine.h:34
CURRENT_SCREEN::SCREEN_BRANCHLESS_NPC_DIALOG
@ SCREEN_BRANCHLESS_NPC_DIALOG
Condition_Fear
@ Condition_Fear
Definition: Conditions.h:11
window_SpeakInHouse
GUIWindow * window_SpeakInHouse
Definition: GUIWindow.cpp:51
game_ui_minimap_dirs
std::array< Image *, 8 > game_ui_minimap_dirs
Definition: UIGame.cpp:70
GUIButton.h
OptionsMenuSkin::uTextureID_ShowDamage
Image * uTextureID_ShowDamage
Definition: Image.h:164
game_ui_playerbuff_pain_reflection
Image * game_ui_playerbuff_pain_reflection
Definition: UIGame.cpp:118
pParty
Party * pParty
Definition: Party.cpp:30
Engine_::IocContainer::ResolveVis
static Vis * ResolveVis()
Definition: IocContainer.cpp:110
Image
Definition: Image.h:19
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: SDL_opengl_glext.h:2483
GameUI_DrawRightPanelItems
void GameUI_DrawRightPanelItems()
Definition: UIGame.cpp:1154
ViewingParams::uMinimapZoom
unsigned int uMinimapZoom
Definition: Viewport.h:65
UIMSG_DebugSnow
@ UIMSG_DebugSnow
Definition: GUIWindow.h:229
pFontArrus
GUIFont * pFontArrus
Definition: GUIFont.cpp:18
game_ui_player_selection_frame
Image * game_ui_player_selection_frame
Definition: UIGame.cpp:108
SoftwareBillboard
Definition: IRender.h:170
bFlashHistoryBook
char bFlashHistoryBook
Definition: mm7_data.cpp:547
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
Party::bFlying
unsigned int bFlying
Definition: Party.h:266
UIMSG_StartNewGame
@ UIMSG_StartNewGame
Definition: GUIWindow.h:107
WINDOW_GameOptions
@ WINDOW_GameOptions
Definition: GUIWindow.h:331
UIMSG_ResetKeyMapping
@ UIMSG_ResetKeyMapping
Definition: GUIWindow.h:204
UIMSG_DebugAllMagic
@ UIMSG_DebugAllMagic
Definition: GUIWindow.h:235
gamma_preview_image
Image * gamma_preview_image
Definition: Game.cpp:242
game_ui_playerbuff_hammerhands
Image * game_ui_playerbuff_hammerhands
Definition: UIGame.cpp:119
UIMSG_DebugTakeFood
@ UIMSG_DebugTakeFood
Definition: GUIWindow.h:238
ItemGen::GetDisplayName
String GetDisplayName()
Definition: Items.cpp:610
OBJECT_BModel
@ OBJECT_BModel
Definition: Actor.h:70
UIMSG_ToggleColoredLights
@ UIMSG_ToggleColoredLights
Definition: GUIWindow.h:209
game_ui_menu_options_video_bloodsplats
Image * game_ui_menu_options_video_bloodsplats
Definition: UIGame.cpp:96
Player::uExpressionTimePassed
unsigned __int16 uExpressionTimePassed
Definition: Player.h:789
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
WINDOW_CharacterWindow_Inventory
@ WINDOW_CharacterWindow_Inventory
Definition: GUIWindow.h:330
ui_gamemenu_keys_key_selection_blink_color_2
unsigned int ui_gamemenu_keys_key_selection_blink_color_2
Definition: UICharacter.cpp:74
Party::WizardEyeActive
bool WizardEyeActive()
Definition: Party.h:193
NPCStats::pProfessions
NPCProfession pProfessions[59]
Definition: NPC.h:167
CURRENT_SCREEN::SCREEN_LOADGAME
@ SCREEN_LOADGAME
SpriteFrameTable::GetFrame
SpriteFrame * GetFrame(unsigned int uSpriteID, unsigned int uTime)
Definition: Sprites.cpp:277
GUIWindow_GameOptions::Update
virtual void Update()
Definition: UIGame.cpp:741
UI_GetHealthManaAndOtherQualitiesStringColor
unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(int actual_value, int base_value)
Definition: UIGame.cpp:2307
NPCStats::pNPCData
NPCData pNPCData[501]
Definition: NPC.h:164
viewparams
struct ViewingParams * viewparams
Definition: mm7_data.cpp:22
Player::expression
CHARACTER_EXPRESSION_ID expression
Definition: Player.h:788
uIconIdx_WaterWalk
unsigned int uIconIdx_WaterWalk
Definition: mm7_data.cpp:598
game_ui_menu_options_video_coloredlights
Image * game_ui_menu_options_video_coloredlights
Definition: UIGame.cpp:97
OS_GetTime
unsigned int OS_GetTime()
Definition: Lin.cpp:12
Disabled
@ Disabled
Definition: Actor.h:94
OverlayDesc::uOverlayType
uint16_t uOverlayType
Definition: Overlays.h:46
OBJECT_DESC_UNPICKABLE
@ OBJECT_DESC_UNPICKABLE
Definition: ObjectList.h:10
GameUI_RightPanel_BookFlashTimer
GameTime GameUI_RightPanel_BookFlashTimer
Definition: mm7_data.cpp:559
BLVMapOutline::uFace2ID
uint16_t uFace2ID
Definition: Indoor.h:416
UIMSG_Game_OpenSaveGameDialog
@ UIMSG_Game_OpenSaveGameDialog
Definition: GUIWindow.h:109
ui_character_condition_normal_color
unsigned int ui_character_condition_normal_color
Definition: UICharacter.cpp:56
pMouse
static Mouse * pMouse
Definition: UIGame.cpp:53
Condition_Dead
@ Condition_Dead
Definition: Conditions.h:22
SoftwareBillboard::screen_space_z
short screen_space_z
Definition: IRender.h:175
BLVMapOutline::uFace1ID
uint16_t uFace1ID
Definition: Indoor.h:415
Condition_Disease_Weak
@ Condition_Disease_Weak
Definition: Conditions.h:15
GUIWindow::DrawMessageBox
void DrawMessageBox(bool inside_game_viewport)
Definition: GUIWindow.cpp:319
CURRENT_SCREEN::SCREEN_HOUSE
@ SCREEN_HOUSE
stru123.h
GUIWindow_GameMenu::Update
virtual void Update()
Definition: UIGame.cpp:159
GetEventHintString
char * GetEventHintString(unsigned int uEventID)
Definition: Events.cpp:1159
MonsterStats::pPlaceStrings
char * pPlaceStrings[31]
Definition: Monsters.h:195
OtherOverlay::screen_space_y
int16_t screen_space_y
Definition: Overlays.h:16
BLVFace
Definition: Indoor.h:424
ItemGen::uItemID
int uItemID
Definition: Items.h:326
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
GUIWindow::uFrameHeight
unsigned int uFrameHeight
Definition: GUIWindow.h:471
UIMSG_DebugDrawDist
@ UIMSG_DebugDrawDist
Definition: GUIWindow.h:230
stru123::_decor_events
std::array< unsigned char, 125 > _decor_events
Definition: stru123.h:8
PLAYER_BUFF_BLESS
@ PLAYER_BUFF_BLESS
Definition: Player.h:15
UIMSG_Game_OpenOptionsDialog
@ UIMSG_Game_OpenOptionsDialog
Definition: GUIWindow.h:110
BLVMapOutline::uFlags
uint16_t uFlags
Definition: Indoor.h:418
v1
GLfloat GLfloat v1
Definition: SDL_opengl_glext.h:694
KeyboardActionMapping::pPressedKeysBuffer
char pPressedKeysBuffer[257]
Definition: Keyboard.h:66
stru262_TurnBased::pQueue
TurnBased_QueueElem pQueue[530]
Definition: TurnEngine.h:82
game_ui_right_panel_frame
Image * game_ui_right_panel_frame
Definition: GUIWindow.cpp:90
ObjectDesc::uFlags
int16_t uFlags
Definition: ObjectList.h:27
PlayerFrameTable::GetFrameIdByExpression
unsigned int GetFrameIdByExpression(CHARACTER_EXPRESSION_ID expression)
Definition: PlayerFrameTable.cpp:8
UIMSG_DebugLightmap
@ UIMSG_DebugLightmap
Definition: GUIWindow.h:233
width
EGLSurface EGLint EGLint EGLint width
Definition: SDL_egl.h:1596
Engine_::IocContainer::ResolveMouse
static Mouse * ResolveMouse()
Definition: IocContainer.cpp:88
Cartographer
@ Cartographer
Definition: NPC.h:43
Player::field_1AA2
__int16 field_1AA2
Definition: Player.h:791
UIAnimation::icon
class Icon * icon
Definition: IconFrameTable.h:71
uGameUIFontMain
unsigned int uGameUIFontMain
Definition: mm7_data.cpp:553
CURRENT_SCREEN::SCREEN_CHARACTERS
@ SCREEN_CHARACTERS
CURRENT_SCREEN::SCREEN_SAVEGAME
@ SCREEN_SAVEGAME
IndoorLocation::pMapOutlines
BLVMapOutlines * pMapOutlines
Definition: Indoor.h:641
pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing
std::array< int16_t, 4 > pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing
Definition: mm7_data.cpp:424
IconFrameTable::pIcons
Icon * pIcons
Definition: IconFrameTable.h:65
WINDOW_KeyMappingOptions
@ WINDOW_KeyMappingOptions
Definition: GUIWindow.h:332
game_ui_evtnpc
Image * game_ui_evtnpc
Definition: UIGame.cpp:102
ui_character_condition_moderate_color
unsigned int ui_character_condition_moderate_color
Definition: UICharacter.cpp:58
fixpoint_mul
__int64 fixpoint_mul(int a1, int a2)
Definition: OurMath.cpp:138
ui_game_minimap_outline_color
unsigned int ui_game_minimap_outline_color
Definition: UICharacter.cpp:62
GUIFont::CalcTextHeight
unsigned int CalcTextHeight(const String &str, unsigned int width, int x_offset, bool return_on_carriage=false)
Definition: GUIFont.cpp:246
pActors
std::array< Actor, 500 > pActors
Definition: Actor.cpp:38
Mouse::uPointingObjectID
unsigned int uPointingObjectID
Definition: Mouse.h:315
Condition_Zombie
@ Condition_Zombie
Definition: Conditions.h:25
Party.h
HOUSE_DIALOGUE_SHOP_6
@ HOUSE_DIALOGUE_SHOP_6
Definition: UIHouses.h:13
GUIWindow_GameKeyBindings::GUIWindow_GameKeyBindings
GUIWindow_GameKeyBindings()
Definition: UIGame.cpp:233
pPlayerFrameTable
struct PlayerFrameTable * pPlayerFrameTable
Definition: mm7_data.cpp:171
Player::GetMaxMana
int GetMaxMana()
Definition: Player.cpp:2369
Viewport::uViewportBR_X
int uViewportBR_X
Definition: Viewport.h:24
uNumLevelDecorations
size_t uNumLevelDecorations
Definition: Decoration.cpp:9
ui_character_condition_severe_color
unsigned int ui_character_condition_severe_color
Definition: UICharacter.cpp:59
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
Player::pName
char pName[16]
Definition: Player.h:637
GameUI_ReloadPlayerPortraits
void GameUI_ReloadPlayerPortraits(int player_id, int face_id)
Definition: UIGame.cpp:199
Party::uFlags
unsigned int uFlags
Definition: Party.h:313
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
pHiredNPCsIconsOffsetsX
std::array< unsigned int, 2 > pHiredNPCsIconsOffsetsX
Definition: mm7_data.cpp:471
UIMSG_SelectKeyPage1
@ UIMSG_SelectKeyPage1
Definition: GUIWindow.h:202
MonsterStats::pInfos
MonsterInfo pInfos[265]
Definition: Monsters.h:194
GUIWindow::Contains
bool Contains(unsigned int x, unsigned int y)
Definition: GUIWindow.cpp:750
MapInfo::pName
String pName
Definition: MapInfo.h:38
Mouse::GetClickPos
void GetClickPos(unsigned int *pX, unsigned int *pY)
Definition: Mouse.cpp:20
Player::sMana
int sMana
Definition: Player.h:767
uIconIdx_FlySpell
unsigned int uIconIdx_FlySpell
Definition: mm7_data.cpp:597
GetNewNPCData
struct NPCData * GetNewNPCData(signed int npcid, int *npc_indx)
Definition: NPC.cpp:99
game_ui_tome_quests
Image * game_ui_tome_quests
Definition: UIGame.cpp:84
GameUI_GetMinimapHintText
String GameUI_GetMinimapHintText()
Definition: UIGame.cpp:1001
UIMSG_OpenKeyMappingOptions
@ UIMSG_OpenKeyMappingOptions
Definition: GUIWindow.h:201
LODSprite::_4AD2D1_overlays
int _4AD2D1_overlays(struct SoftwareBillboard *a2, int a3)
Definition: LOD.cpp:206
LODSpriteHeader::uHeight
uint16_t uHeight
Definition: LOD.h:187
LEVEL_Outdoor
@ LEVEL_Outdoor
Definition: Indoor.h:287
Timer::Pause
void Pause()
Definition: Time.cpp:19
game_ui_status_bar_string
String game_ui_status_bar_string
Definition: mm7_data.cpp:638
Player::_expression21_frameset
int _expression21_frameset
Definition: Player.h:793
ui_game_minimap_decoration_color_1
unsigned int ui_game_minimap_decoration_color_1
Definition: UICharacter.cpp:66
game_ui_player_face_dead
Image * game_ui_player_face_dead
Definition: UIGame.cpp:106
OtherOverlay::field_6
int16_t field_6
Definition: Overlays.h:14
NPCData
Definition: NPC.h:79
GUIButton::uWidth
unsigned int uWidth
Definition: GUIButton.h:23
Player::GetMaxHealth
int GetMaxHealth()
Definition: Player.cpp:2354
GUIButton::field_1C
int field_1C
Definition: GUIButton.h:28
IndoorLocation::_visible_outlines
char _visible_outlines[875]
Definition: Indoor.h:650
UIMSG_ToggleFlipOnExit
@ UIMSG_ToggleFlipOnExit
Definition: GUIWindow.h:188
UIMSG_DebugTownPortal
@ UIMSG_DebugTownPortal
Definition: GUIWindow.h:245
KeyboardActionMapping::pVirtualKeyCodesMapping
unsigned int pVirtualKeyCodesMapping[30]
Definition: Keyboard.h:63
bFlashQuestBook
char bFlashQuestBook
Definition: mm7_data.cpp:549
SoftwareBillboard::screen_space_x
int screen_space_x
Definition: IRender.h:173
WINDOW_VideoOptions
@ WINDOW_VideoOptions
Definition: GUIWindow.h:333
ui_game_minimap_actor_hostile_color
unsigned int ui_game_minimap_actor_hostile_color
Definition: UICharacter.cpp:64
SpellBuff::expire_time
GameTime expire_time
Definition: Spells.h:165
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
Removed
@ Removed
Definition: Actor.h:86
Condition_Poison_Severe
@ Condition_Poison_Severe
Definition: Conditions.h:18
game_ui_topframe
Image * game_ui_topframe
Definition: UIGame.cpp:57
UIMSG_DebugShowFPS
@ UIMSG_DebugShowFPS
Definition: GUIWindow.h:222
UIMSG_ToggleShowDamage
@ UIMSG_ToggleShowDamage
Definition: GUIWindow.h:154
BSPModel.h
Player::pInventoryItemList
ItemGen pInventoryItemList[126]
Definition: Player.h:727
UIMSG_ChangeSoundVolume
@ UIMSG_ChangeSoundVolume
Definition: GUIWindow.h:94
UIMSG_Game_OpenLoadGameDialog
@ UIMSG_Game_OpenLoadGameDialog
Definition: GUIWindow.h:108
NPCData::uPortraitID
unsigned int uPortraitID
Definition: NPC.h:83
UIAnimation::x
int16_t x
Definition: IconFrameTable.h:76
game_ui_options_controls
std::array< Image *, 5 > game_ui_options_controls
Definition: UIGame.cpp:100
GUIWindow::uFrameY
unsigned int uFrameY
Definition: GUIWindow.h:469
GameUI_DrawPartySpells
void GameUI_DrawPartySpells()
Definition: UIGame.cpp:1699
game_ui_monster_hp_background
Image * game_ui_monster_hp_background
Definition: UIGame.cpp:64
UIMSG_DebugPickedFace
@ UIMSG_DebugPickedFace
Definition: GUIWindow.h:223
pMiscTimer
Timer * pMiscTimer
Definition: Time.cpp:7
GUIButton::uX
unsigned int uX
Definition: GUIButton.h:21
PLAYER_BUFF_STONESKIN
@ PLAYER_BUFF_STONESKIN
Definition: Player.h:28
pSpellStats
struct SpellStats * pSpellStats
Definition: Spells.cpp:32
SoftwareBillboard::uViewportY
unsigned int uViewportY
Definition: IRender.h:184
pFontComic
GUIFont * pFontComic
Definition: GUIFont.cpp:24
Outdoor.h
CURRENT_SCREEN::SCREEN_BOOKS
@ SCREEN_BOOKS
stru262_TurnBased::uActorQueueSize
int uActorQueueSize
Definition: TurnEngine.h:77
Condition_Cursed
@ Condition_Cursed
Definition: Conditions.h:8
SoftwareBillboard::uViewportX
unsigned int uViewportX
Definition: IRender.h:183
LEVEL_Indoor
@ LEVEL_Indoor
Definition: Indoor.h:286
ui_game_minimap_projectile_color
unsigned int ui_game_minimap_projectile_color
Definition: UICharacter.cpp:67
ui_game_character_record_playerbuff_colors
std::array< unsigned int, 24 > ui_game_character_record_playerbuff_colors
Definition: UICharacter.cpp:69
BuildDialogueString
String BuildDialogueString(const char *lpsz, unsigned __int8 uPlayerID, ItemGen *a3, char *a4, int a5, GameTime *a6)
Definition: GUIWindow.cpp:2189
Party::pHirelings
std::array< NPCData, 2 > pHirelings
Definition: Party.h:311
AudioPlayer.h
OBJECT_Player
@ OBJECT_Player
Definition: Actor.h:68
pBtn_Resume
GUIButton * pBtn_Resume
Definition: GUIButton.cpp:74
Party::bTurnBasedModeOn
bool bTurnBasedModeOn
Definition: Party.h:305
SoftwareBillboard::screen_space_y
int screen_space_y
Definition: IRender.h:174
pViewport
struct Viewport * pViewport
Definition: mm7_data.cpp:21
game_ui_menu_options_video_background
Image * game_ui_menu_options_video_background
Definition: UIGame.cpp:95
game_ui_player_alert_yellow
Image * game_ui_player_alert_yellow
Definition: UIGame.cpp:109
UICharacter.h
CURRENT_SCREEN::SCREEN_GAME
@ SCREEN_GAME
IconFrameTable::GetFrame
Icon * GetFrame(unsigned int uIconID, unsigned int frame_time)
Definition: IconFrameTable.cpp:39
game_ui_minimap_compass
Image * game_ui_minimap_compass
Definition: UIGame.cpp:69
UIMSG_OpenVideoOptions
@ UIMSG_OpenVideoOptions
Definition: GUIWindow.h:207
MapInfo.h
PARTY_BUFF_INVISIBILITY
@ PARTY_BUFF_INVISIBILITY
Definition: Party.h:82
Sprite::sprite_header
struct LODSprite * sprite_header
Definition: Sprites.h:36
OtherOverlay::field_E
int16_t field_E
Definition: Overlays.h:18
pODMRenderParams
ODMRenderParams * pODMRenderParams
Definition: Outdoor.cpp:49
uNumSpriteObjects
size_t uNumSpriteObjects
Definition: SpriteObject.cpp:33
UIMSG_ToggleTint
@ UIMSG_ToggleTint
Definition: GUIWindow.h:210
NPCProfession::pJoinText
char * pJoinText
Definition: NPC.h:118
game_ui_tome_calendar
Image * game_ui_tome_calendar
Definition: UIGame.cpp:81
GameUI_DrawRightPanelFrames
void GameUI_DrawRightPanelFrames()
Definition: UIGame.cpp:1254
uLastPointedObjectID
int uLastPointedObjectID
Definition: mm7_data.cpp:534
UIMSG_DebugFullHeal
@ UIMSG_DebugFullHeal
Definition: GUIWindow.h:228
Player::classType
PLAYER_CLASS_TYPE classType
Definition: Player.h:639
CURRENT_SCREEN::SCREEN_NPC_DIALOGUE
@ SCREEN_NPC_DIALOGUE
CURRENT_SCREEN::SCREEN_MENU
@ SCREEN_MENU
KeyboardActionMapping::GetVKeyDisplayName
const char * GetVKeyDisplayName(unsigned char a1)
Definition: Keyboard.cpp:295
ViewingParams::pPalette
uint16_t pPalette[256]
Definition: Viewport.h:84
BLVMapOutlines::pOutlines
BLVMapOutline pOutlines[7000]
Definition: Indoor.h:570
pOtherOverlayList
struct OtherOverlayList * pOtherOverlayList
Definition: Overlays.cpp:19
PLAYER_BUFF_HEROISM
@ PLAYER_BUFF_HEROISM
Definition: Player.h:22
OtherOverlay::screen_space_x
int16_t screen_space_x
Definition: Overlays.h:15
Player::AddItem
bool AddItem(struct ItemGen *pItem)
GUIButton::msg_param
unsigned int msg_param
Definition: GUIButton.h:30
game_ui_monster_hp_border_right
Image * game_ui_monster_hp_border_right
Definition: UIGame.cpp:66
Condition_Weak
@ Condition_Weak
Definition: Conditions.h:9
SoftwareBillboard::uViewportW
unsigned int uViewportW
Definition: IRender.h:186
game_ui_rightframe
Image * game_ui_rightframe
Definition: UIGame.cpp:56
GameUI_DrawFoodAndGold
void GameUI_DrawFoodAndGold()
Definition: UIGame.cpp:1179
ui_gamemenu_keys_action_name_color
unsigned int ui_gamemenu_keys_action_name_color
Definition: UICharacter.cpp:72
SpellBuff::Active
bool Active() const
Definition: Spells.h:162
UIStatusBar.h
pPrevVirtualCidesMapping
std::array< unsigned int, 28 > pPrevVirtualCidesMapping
Definition: mm7_data.cpp:541
pKeyActionMap
struct KeyboardActionMapping * pKeyActionMap
Definition: Keyboard.cpp:35
Player::GetMajorConditionIdx
unsigned int GetMajorConditionIdx()
Definition: Player.cpp:2614
game_ui_statusbar
Image * game_ui_statusbar
Definition: UIGame.cpp:55
bForceDrawFooter
int bForceDrawFooter
Definition: mm7_data.cpp:640
v2
GLfloat GLfloat GLfloat v2
Definition: SDL_opengl_glext.h:695
game_ui_btn_rest
Image * game_ui_btn_rest
Definition: UIGame.cpp:86
SpriteFrame
Definition: Sprites.h:39
Chest::ChestUI_WritePointedObjectStatusString
static bool ChestUI_WritePointedObjectStatusString()
Definition: Chest.cpp:175
game_ui_menu_options_video_tinting
Image * game_ui_menu_options_video_tinting
Definition: UIGame.cpp:98
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
uint
unsigned int uint
Definition: MM7.h:4
Condition_Poison_Weak
@ Condition_Poison_Weak
Definition: Conditions.h:14
uActiveCharacter
unsigned int uActiveCharacter
Definition: mm7_data.cpp:555
v3
GLfloat GLfloat GLfloat GLfloat v3
Definition: SDL_opengl_glext.h:696
Localization::FormatString
String FormatString(unsigned int index,...) const
Definition: Localization.cpp:17
SoftwareBillboard::uViewportZ
unsigned int uViewportZ
Definition: IRender.h:185
SoftwareBillboard::uFlags
unsigned int uFlags
Definition: IRender.h:181
GUIButton::uY
unsigned int uY
Definition: GUIButton.h:22
SoftwareBillboard::sParentBillboardID
int sParentBillboardID
Definition: IRender.h:188
__debugbreak
void __cdecl __debugbreak(void)
UIMSG_SelectKeyPage2
@ UIMSG_SelectKeyPage2
Definition: GUIWindow.h:203
pBtn_SliderLeft
GUIButton * pBtn_SliderLeft
Definition: GUIButton.cpp:82
GUIButton::uHeight
unsigned int uHeight
Definition: GUIButton.h:24
CURRENT_SCREEN::SCREEN_REST
@ SCREEN_REST
fixed::GetFloat
float GetFloat() const
Definition: OurMath.h:37
BLVFace::Visible
bool Visible() const
Definition: Indoor.h:447
pNPCStats
struct NPCStats * pNPCStats
Definition: NPC.cpp:29
lWindowList
std::list< GUIWindow * > lWindowList
Definition: GUIWindow.cpp:79
BSPModel::pFaces
std::vector< ODMFace > pFaces
Definition: BSPModel.h:190
_441A4E_overlay_on_portrait
__int16 _441A4E_overlay_on_portrait(int a1)
Definition: UIGame.cpp:2373
pBtn_SliderRight
GUIButton * pBtn_SliderRight
Definition: GUIButton.cpp:81
ODMFace
Definition: BSPModel.h:93
Localization::GetNpcProfessionName
const char * GetNpcProfessionName(unsigned int index) const
Definition: Localization.h:83
pOverlayList
struct OverlayList * pOverlayList
Definition: Overlays.cpp:20
ui_character_header_text_color
unsigned int ui_character_header_text_color
Definition: UICharacter.cpp:45
Player::IsDead
bool IsDead() const
Definition: Player.cpp:7416
game_ui_player_faces
std::array< std::array< Image *, 56 >, 4 > game_ui_player_faces
Definition: UIGame.cpp:104
BSPModel::vBoundingCenter
Vec3_int_ vBoundingCenter
Definition: BSPModel.h:186
UIMSG_DebugFarClip
@ UIMSG_DebugFarClip
Definition: GUIWindow.h:220
Player::sHealth
int sHealth
Definition: Player.h:766
Player::PlaySound
void PlaySound(PlayerSpeech speech, int a3)
Definition: Player.cpp:7874
Image::GetPixels
const void * GetPixels(IMAGE_FORMAT format)
Definition: Image.cpp:270
OptionsMenuSkin::uTextureID_AlwaysRun
Image * uTextureID_AlwaysRun
Definition: Image.h:162
Condition_Good
@ Condition_Good
Definition: Conditions.h:26
game_ui_player_alert_red
Image * game_ui_player_alert_red
Definition: UIGame.cpp:110
GUIWindow_DebugMenu::GUIWindow_DebugMenu
GUIWindow_DebugMenu()
Definition: UIGame.cpp:2449
Condition_Unconcious
@ Condition_Unconcious
Definition: Conditions.h:21
Party::TorchlightActive
bool TorchlightActive()
Definition: Party.h:199
GameUI_DrawMinimap
void GameUI_DrawMinimap(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned int uZoom, unsigned int bRedrawOdmMinimap)
Definition: UIGame.cpp:1916
UIAnimation::y
int16_t y
Definition: IconFrameTable.h:77
Decoration.h
stru_5C6E00
struct stru193_math * stru_5C6E00
Definition: mm7_data.cpp:19
SpellInfo::pShortName
char * pShortName
Definition: Spells.h:177
ui_gamemenu_keys_key_selection_blink_color_1
unsigned int ui_gamemenu_keys_key_selection_blink_color_1
Definition: UICharacter.cpp:73
ViewingParams::bRedrawGameUI
int bRedrawGameUI
Definition: Viewport.h:74
IndoorLocation::pVertices
struct Vec3_short_ * pVertices
Definition: Indoor.h:628
AssetsManager::GetImage_Alpha
Texture * GetImage_Alpha(const String &name)
Definition: AssetsManager.cpp:66
OurMath.h
NPCProfession::pBenefits
char * pBenefits
Definition: NPC.h:116
game_ui_dialogue_background
Image * game_ui_dialogue_background
Definition: UIGame.cpp:93
uCurrentlyLoadedLevelType
LEVEL_TYPE uCurrentlyLoadedLevelType
Definition: Indoor.cpp:52
UIMSG_ChangeKeyButton
@ UIMSG_ChangeKeyButton
Definition: GUIWindow.h:205
UIMSG_ToggleBloodsplats
@ UIMSG_ToggleBloodsplats
Definition: GUIWindow.h:208
MonsterInfo::pName
char * pName
Definition: Monsters.h:120
game_ui_tome_storyline
Image * game_ui_tome_storyline
Definition: UIGame.cpp:80
UIMSG_DebugSeasonsChange
@ UIMSG_DebugSeasonsChange
Definition: GUIWindow.h:221
pPrimaryWindow
GUIWindow * pPrimaryWindow
Definition: GUIWindow.cpp:48
IndoorLocation::pFaces
struct BLVFace * pFaces
Definition: Indoor.h:630
GetReputationString
String GetReputationString(int reputation)
Definition: UIGame.cpp:2360
ODMRenderParams::far_clip
int far_clip
Definition: IRender.h:77
pUIAnim_WizardEye
UIAnimation * pUIAnim_WizardEye
Definition: Party.cpp:49
CheckHiredNPCSpeciality
bool CheckHiredNPCSpeciality(unsigned int uProfession)
Definition: NPC.cpp:754
WINDOW_CharacterWindow_Awards
@ WINDOW_CharacterWindow_Awards
Definition: GUIWindow.h:329
GUIWindow::uFrameX
unsigned int uFrameX
Definition: GUIWindow.h:468
ObjectList::pObjects
struct ObjectDesc * pObjects
Definition: ObjectList.h:54
game_ui_menu_save
Image * game_ui_menu_save
Definition: UIGame.cpp:75
GUIWindow::sHint
String sHint
Definition: GUIWindow.h:488
HOUSE_DIALOGUE_SHOP_BUY_STANDARD
@ HOUSE_DIALOGUE_SHOP_BUY_STANDARD
Definition: UIHouses.h:9
Condition_Disease_Severe
@ Condition_Disease_Severe
Definition: Conditions.h:19
UIMSG_DebugPortalLines
@ UIMSG_DebugPortalLines
Definition: GUIWindow.h:224
OverlayList::pOverlays
struct OverlayDesc * pOverlays
Definition: Overlays.h:65
Localization::GetClassName
const char * GetClassName(unsigned int index) const
Definition: Localization.h:35
v0
GLfloat v0
Definition: SDL_opengl_glext.h:693
Condition_Eradicated
@ Condition_Eradicated
Definition: Conditions.h:24
BSPModel
Definition: BSPModel.h:163
UIMSG_ToggleWalkSound
@ UIMSG_ToggleWalkSound
Definition: GUIWindow.h:152
GUIWindow.h
ItemGen
Definition: Items.h:263
ObjectList.h
pMessageQueue_50CBD0
struct GUIMessageQueue * pMessageQueue_50CBD0
Definition: GUIWindow.cpp:86
pPartySpellbuffsUI_smthns
std::array< unsigned __int8, 14 > pPartySpellbuffsUI_smthns
Definition: mm7_data.cpp:279
game_ui_menu_quit
Image * game_ui_menu_quit
Definition: UIGame.cpp:72
stru_5E4C90_MapPersistVars
stru123 stru_5E4C90_MapPersistVars
Definition: mm7_data.cpp:23
PLAYER_BUFF_HAMMERHANDS
@ PLAYER_BUFF_HAMMERHANDS
Definition: Player.h:20
Condition_Pertified
@ Condition_Pertified
Definition: Conditions.h:23
Condition_Drunk
@ Condition_Drunk
Definition: Conditions.h:12
BLVMapOutline::uVertex2ID
uint16_t uVertex2ID
Definition: Indoor.h:414
Color16
uint16_t Color16(uint32_t r, uint32_t g, uint32_t b)
Definition: Engine.cpp:148
game_ui_menu_new
Image * game_ui_menu_new
Definition: UIGame.cpp:77
pOutdoor
OutdoorLocation * pOutdoor
Definition: Outdoor.cpp:48
GUIWindow_GameVideoOptions::Update
virtual void Update()
Definition: UIGame.cpp:567
pFontLucida
GUIFont * pFontLucida
Definition: GUIFont.cpp:19
game_ui_menu_resume
Image * game_ui_menu_resume
Definition: UIGame.cpp:73
CHARACTER_EXPRESSION_21
@ CHARACTER_EXPRESSION_21
Definition: Player.h:363
OtherOverlay::field_2
int16_t field_2
Definition: Overlays.h:12
_A750D8_player_speech_timer
int64_t _A750D8_player_speech_timer
Definition: mm7_data.cpp:763
game_ui_monster_hp_red
Image * game_ui_monster_hp_red
Definition: UIGame.cpp:63
pBtn_LoadGame
GUIButton * pBtn_LoadGame
Definition: GUIButton.cpp:77
pHealthBarPos
std::array< unsigned int, 4 > pHealthBarPos
Definition: mm7_data.cpp:228
GUIWindow_GameKeyBindings::Update
virtual void Update()
Definition: UIGame.cpp:274
SoftwareBillboard::pTargetZ
int * pTargetZ
Definition: IRender.h:172
GameUI_DrawPortraits
void GameUI_DrawPortraits(unsigned int _this)
Definition: UIGame.cpp:1766
byte_4E5DD8
std::array< unsigned char, 14 > byte_4E5DD8
Definition: mm7_data.cpp:273
PLAYER_BUFF_HASTE
@ PLAYER_BUFF_HASTE
Definition: Player.h:21
BLVMapOutline::uVertex1ID
uint16_t uVertex1ID
Definition: Indoor.h:413
SoftwareBillboard::uTargetPitch
unsigned int uTargetPitch
Definition: IRender.h:182
Player::uQuickSpell
unsigned __int8 uQuickSpell
Definition: Player.h:774
game_ui_menu_options
Image * game_ui_menu_options
Definition: UIGame.cpp:78
StringPrintf
String StringPrintf(const char *fmt,...)
Definition: Strings.cpp:9
Viewport::uViewportTL_X
int uViewportTL_X
Definition: Viewport.h:22
game_ui_monster_hp_border_left
Image * game_ui_monster_hp_border_left
Definition: UIGame.cpp:65
GUIWindow_GameOptions::GUIWindow_GameOptions
GUIWindow_GameOptions()
Definition: UIGame.cpp:644
GameMenuUI_GetKeyBindingColor
static unsigned int GameMenuUI_GetKeyBindingColor(int key_index)
Definition: UIGame.cpp:212
OptionsMenuSkin::uTextureID_Background
Image * uTextureID_Background
Definition: Image.h:153
Party::WizardEyeSkillLevel
int WizardEyeSkillLevel()
Definition: Party.h:196
GUIButton::sLabel
String sLabel
Definition: GUIButton.h:36
Party::sRotationY
int sRotationY
Definition: Party.h:251
PLAYER_BUFF_PRESERVATION
@ PLAYER_BUFF_PRESERVATION
Definition: Player.h:25
stru262_TurnBased::turn_stage
int turn_stage
Definition: TurnEngine.h:75
GameUI_DrawLifeManaBars
void GameUI_DrawLifeManaBars()
Definition: UIGame.cpp:1197
UIMSG_GameMenu_ReturnToGame
@ UIMSG_GameMenu_ReturnToGame
Definition: GUIWindow.h:106
UIMSG_DebugSpecialItem
@ UIMSG_DebugSpecialItem
Definition: GUIWindow.h:218
String
std::string String
Definition: Strings.h:10
Keyboard.h
game_ui_menu_load
Image * game_ui_menu_load
Definition: UIGame.cpp:76
GUIWindow_GameMenu::GUIWindow_GameMenu
GUIWindow_GameMenu()
Definition: UIGame.cpp:123
pEventTimer
Timer * pEventTimer
Definition: Time.cpp:8
BLVFace::uAttributes
unsigned int uAttributes
Definition: Indoor.h:475
Sprites.h
pBtn_SaveGame
GUIButton * pBtn_SaveGame
Definition: GUIButton.cpp:78
game_ui_playerbuff_preservation
Image * game_ui_playerbuff_preservation
Definition: UIGame.cpp:120
GameTime
Definition: Time.h:14
UIMSG_DebugTurboSpeed
@ UIMSG_DebugTurboSpeed
Definition: GUIWindow.h:232
pBtn_GameControls
GUIButton * pBtn_GameControls
Definition: GUIButton.cpp:76
Player::pPlayerBuffs
std::array< SpellBuff, 24 > pPlayerBuffs
Definition: Player.h:756
pBtn_QuitGame
GUIButton * pBtn_QuitGame
Definition: GUIButton.cpp:75
ushort
unsigned short ushort
Definition: MM7.h:45
Party::GetGold
int GetGold() const
Definition: Party.cpp:264
Mouse::RemoveHoldingItem
void RemoveHoldingItem()
Definition: Mouse.cpp:25
pObjectList
struct ObjectList * pObjectList
Definition: ObjectList.cpp:5
Party::WaterWalkActive
bool WaterWalkActive()
Definition: Party.h:205
pFontSmallnum
GUIFont * pFontSmallnum
Definition: GUIFont.cpp:25
Mouse.h
OptionsMenuSkin::uTextureID_WalkSound
Image * uTextureID_WalkSound
Definition: Image.h:163
Condition_Disease_Medium
@ Condition_Disease_Medium
Definition: Conditions.h:17
sDialogue_SpeakingActorNPC_ID
int sDialogue_SpeakingActorNPC_ID
Definition: mm7_data.cpp:605
SoftwareBillboard::object_pid
unsigned short object_pid
Definition: IRender.h:190
pDecorationList
struct DecorationList * pDecorationList
Definition: DecorationList.cpp:11
GUIWindow_DebugMenu::Update
virtual void Update()
Definition: UIGame.cpp:2496
uGameMenuUI_CurentlySelectedKeyIdx
int uGameMenuUI_CurentlySelectedKeyIdx
Definition: mm7_data.cpp:540
pPlayerPortraitsNames
std::array< const char *, 25 > pPlayerPortraitsNames
Definition: mm7_data.cpp:310
SPEECH_NoRoom
@ SPEECH_NoRoom
Definition: Player.h:61
pPartySpellbuffsUI_XYs
std::array< std::array< int, 2 >, 14 > pPartySpellbuffsUI_XYs
Definition: mm7_data.cpp:257
GUIButton::uButtonType
int uButtonType
Definition: GUIButton.h:27
UIMSG_DebugNoDamage
@ UIMSG_DebugNoDamage
Definition: GUIWindow.h:227
Party::alignment
PartyAlignment alignment
Definition: Party.h:308
OptionsMenuSkin::uTextureID_FlipOnExit
Image * uTextureID_FlipOnExit
Definition: Image.h:160
BLVFace::uFaceExtraID
uint16_t uFaceExtraID
Definition: Indoor.h:482
Vis.h
Time.h
Condition_Sleep
@ Condition_Sleep
Definition: Conditions.h:10
CURRENT_SCREEN::SCREEN_CHEST_INVENTORY
@ SCREEN_CHEST_INVENTORY
game_ui_bar_yellow
Image * game_ui_bar_yellow
Definition: UIGame.cpp:114
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52