World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
GUIWindow.cpp
См. документацию.
1 #include "GUI/GUIWindow.h"
2 
3 #include <stdlib.h>
4 #include <sstream>
5 #include <utility>
6 
7 #include "Engine/Engine.h"
8 #include "Engine/AssetsManager.h"
9 #include "Engine/Autonotes.h"
10 #include "Engine/Awards.h"
11 #include "Engine/Events.h"
12 #include "Engine/LOD.h"
13 #include "Engine/Localization.h"
14 #include "Engine/OurMath.h"
15 #include "Engine/Party.h"
16 #include "Engine/IocContainer.h"
17 #include "Engine/Time.h"
18 
19 #include "Engine/Objects/Actor.h"
20 #include "Engine/Objects/Chest.h"
21 
26 
29 
30 #include "IO/Keyboard.h"
31 #include "IO/Mouse.h"
32 
33 #include "GUI/GUIButton.h"
34 #include "GUI/GUIFont.h"
35 #include "GUI/UI/UIArena.h"
36 #include "GUI/UI/UIBooks.h"
37 #include "GUI/UI/UICharacter.h"
38 #include "GUI/UI/UIDialogue.h"
39 #include "GUI/UI/UIGame.h"
40 #include "GUI/UI/UIHouses.h"
41 #include "GUI/UI/UIPopup.h"
42 #include "GUI/UI/UIStatusBar.h"
43 
45 
47 
61 
62 typedef struct _RGBColor {
63  unsigned char R;
64  unsigned char B;
65  unsigned char G;
66 } RGBColor;
67 
68 std::array<RGBColor, 20> spell_tooltip_colors = { {
69  { 0x96, 0xD4, 0xFF }, { 0xFF, 0x80, 0x00 }, { 0xFF, 0xFF, 0x9B },
70  { 0xE1, 0xE1, 0xE1 }, { 0x80, 0x80, 0x80 }, { 0x96, 0xD4, 0xFF },
71  { 0xFF, 0x55, 0x00 }, { 0x96, 0xD4, 0xFF }, { 0xFF, 0x55, 0x00 },
72  { 0xE1, 0xE1, 0xE1 }, { 0xFF, 0x55, 0x00 }, { 0x96, 0xD4, 0xFF },
73  { 0xEB, 0x0F, 0xFF }, { 0xFF, 0x80, 0x00 }, { 0x96, 0xD4, 0xFF },
74  { 0x80, 0x80, 0x80 }, { 0xFF, 0x55, 0x00 }, { 0x00, 0x80, 0xFF },
75  { 0x00, 0x80, 0xFF }, { 0x96, 0xD4, 0xFF }
76 } };
77 
79 std::list<GUIWindow*> lWindowList;
80 
82 
85 
88 
93 
94 Image *ui_buttdesc2 = nullptr;
95 Image *ui_buttyes2 = nullptr;
96 
99 
100 Image *ui_ar_dn_dn = nullptr;
101 Image *ui_ar_dn_up = nullptr;
102 Image *ui_ar_up_dn = nullptr;
103 Image *ui_ar_up_up = nullptr;
104 
107 
109  switch (m) {
110  case -1: return L"-1";
111  case MENU_MAIN: return L"MENU_MAIN";
112  case MENU_NEWGAME: return L"MENU_NEWGAME";
113  case MENU_CREDITS: return L"MENU_CREDITS";
114  case MENU_SAVELOAD: return L"MENU_SAVELOAD";
115  case MENU_EXIT_GAME: return L"MENU_EXIT_GAME";
116  case MENU_5: return L"MENU_5";
117  case MENU_CREATEPARTY: return L"MENU_CREATEPARTY";
118  case MENU_NAMEPANELESC: return L"MENU_NAMEPANELESC";
119  case MENU_CREDITSPROC: return L"MENU_CREDITSPROC";
120  case MENU_LoadingProcInMainMenu: return L"MENU_LoadingProcInMainMenu";
121  case MENU_DebugBLVLevel: return L"MENU_DebugBLVLevel";
122  case MENU_CREDITSCLOSE: return L"MENU_CREDITSCLOSE";
123  case MENU_MMT_MAIN_MENU: return L"MENU_MMT_MAIN_MENU";
124  default: return L"invalid";
125  }
126 }
127 
129  sCurrentMenuID = uMenu;
130  logger->Warning(L"CurrentMenu = %s \n", MENU_STATE_to_string(uMenu));
131 }
132 
134  return sCurrentMenuID;
135 }
136 
143  }
144  return false;
145 }
146 
147 OnCastTargetedSpell::OnCastTargetedSpell(unsigned int x, unsigned int y,
148  unsigned int width,
149  unsigned int height, int button,
150  const String &hint
151 )
152  : GUIWindow(WINDOW_CastSpell, x, y, width, height, button, hint) {
153  pEventTimer->Pause();
154  pAudioPlayer->StopChannels(-1, -1);
155  mouse->SetCursorImage("MICON2");
156  GameUI_StatusBar_OnEvent(localization->GetString(39)); // Choose target / Выберите цель
157 }
158 
160  if (qMessages.size()) {
161  GUIMessage message = qMessages.front();
162  Clear();
163  if (message.field_8 != 0) {
164  qMessages.push(message);
165  }
166  }
167 }
168 
170  std::queue<GUIMessage> empty;
171  std::swap(qMessages, empty);
172 }
173 
174 void GUIMessageQueue::PopMessage(enum UIMessageType *pType, int *pParam,
175  int *a4) {
176  *pType = (UIMessageType)-1;
177  *pParam = 0;
178  *a4 = 0;
179 
180  if (qMessages.empty()) {
181  return;
182  }
183 
184  GUIMessage message = qMessages.front();
185  qMessages.pop();
186 
187  *pType = message.eType;
188  *pParam = message.param;
189  *a4 = message.field_8;
190 }
191 
192 void GUI_ReplaceHotkey(uint8_t uOldHotkey, uint8_t uNewHotkey,
193  char bFirstCall) {
194  char old_hot_key = toupper(uOldHotkey);
195  uint8_t v9 = toupper(uNewHotkey);
196  if (bFirstCall) {
197  for (GUIWindow *pWindow : lWindowList) {
198  for (GUIButton *j : pWindow->vButtons) {
199  j->field_28 = 0;
200  }
201  }
202  }
203  for (GUIWindow *pWindow : lWindowList) {
204  for (GUIButton *j : pWindow->vButtons) {
205  if (j->uHotkey == old_hot_key) {
206  if (!j->field_28) {
207  j->field_28 = 1;
208  j->uHotkey = v9;
209  }
210  }
211  }
212  }
213 }
214 
216  char Hot_key_num = toupper(uHotkey);
217  for (GUIWindow *pWindow : lWindowList) {
218  for (GUIButton *result : pWindow->vButtons) {
219  if (result->uHotkey == Hot_key_num) {
220  pMessageQueue_50CBD0->AddGUIMessage(result->msg,
221  result->msg_param, 0);
222  return result;
223  }
224  }
225  if (!pWindow->uFrameX && !pWindow->uFrameY &&
226  (pWindow->uFrameWidth == window->GetWidth() &&
227  pWindow->uFrameHeight == window->GetWidth())) {
228  break;
229  }
230  }
231  return 0;
232 }
233 
234 //----- (0041D73D) --------------------------------------------------------
236  unsigned short text_color;
237  int Y_pos; // esi@11
238  int string_count; // [sp+20h] [bp-4h]@7
239 
240  string_count = 0;
241  for (int i = 0; i < 20; ++i) {
242  if (pParty->pPartyBuffs[i].Active()) ++string_count;
243  }
244 
246  uFrameHeight += (string_count - 1) * pFontArrus->GetHeight();
247  uFrameZ = uFrameWidth + uFrameX - 1;
248  uFrameW = uFrameY + uFrameHeight - 1;
249  DrawMessageBox(0);
250  DrawTitleText(pFontArrus, 0, 12, 0, localization->GetString(451), 3);
251  if (!string_count)
252  DrawTitleText(pFontComic, 0, 40, 0, localization->GetString(153), 3);
253 
254  string_count = 0;
255  for (int i = 0; i < 20; ++i) {
256  if (pParty->pPartyBuffs[i].Active()) {
257  auto remaing_time =
258  pParty->pPartyBuffs[i].expire_time - pParty->GetPlayingTime();
259  Y_pos = string_count * pFontComic->GetHeight() + 40;
260  text_color =
262  spell_tooltip_colors[i].B);
263  DrawText(pFontComic, 52, Y_pos, text_color,
264  localization->GetSpellName(i), 0, 0, 0);
265  DrawBuff_remaining_time_string(Y_pos, this, remaing_time,
266  pFontComic);
267  ++string_count;
268  }
269  }
270 }
271 
272 //----- (0041D08F) --------------------------------------------------------
274  int a4, int a5) {
275  if (num_buttons) {
276  this->pNumPresenceButton = num_buttons;
277  this->field_30 = a3;
278  this->field_34 = a4;
279  this->pCurrentPosActiveItem = a5;
280  this->pStartingPosActiveItem = a5;
281  this->receives_keyboard_input = true;
282  } else {
283  this->pNumPresenceButton = 0;
284  this->field_30 = a3;
285  this->field_34 = a4;
286  this->pCurrentPosActiveItem = 0;
287  this->pStartingPosActiveItem = 0;
288  this->receives_keyboard_input = false;
289  }
290 }
291 
293  if (!this || this->eWindowType == WINDOW_null) {
294  // added the check to avoid releasing
295  // windows already released
296  return;
297  }
298  DeleteButtons();
299 
300  lWindowList.remove(this);
301 
302  log->Info(L"Release window: %S", ToString(eWindowType));
303 }
304 
306  while (vButtons.size()) {
307  vButtons.front()->Release();
308  }
309 }
310 
311 GUIButton *GUIWindow::GetControl(unsigned int uID) {
312  if (uID >= vButtons.size()) {
313  return nullptr;
314  }
315 
316  return vButtons[uID];
317 }
318 
319 void GUIWindow::DrawMessageBox(bool inside_game_viewport) {
320  int x = 0;
321  int y = 0;
322  int z, w;
323  if (inside_game_viewport) {
328  } else {
329  z = window->GetWidth();
330  w = window->GetHeight();
331  }
332 
333  Point cursor = mouse->GetCursorPos();
334  if ((int)this->uFrameX >= x) {
335  if ((int)(this->uFrameWidth + this->uFrameX) > z) {
336  this->uFrameX = z - this->uFrameWidth;
337  this->uFrameY = cursor.y + 30;
338  }
339  } else {
340  this->uFrameX = x;
341  this->uFrameY = cursor.y + 30;
342  }
343 
344  if ((int)this->uFrameY >= y) {
345  if ((int)(this->uFrameY + this->uFrameHeight) > w) {
346  this->uFrameY = cursor.y - this->uFrameHeight - 30;
347  }
348  } else {
349  this->uFrameY = cursor.y + 30;
350  }
351  if ((signed int)this->uFrameY < y) {
352  this->uFrameY = y;
353  }
354  if ((signed int)this->uFrameX < x) {
355  this->uFrameX = x;
356  }
357  this->uFrameZ = this->uFrameWidth + this->uFrameX - 1;
358  this->uFrameW = this->uFrameHeight + this->uFrameY - 1;
359 
360  GUIWindow current_window = *this;
361  current_window.uFrameX += 12;
362  current_window.uFrameWidth -= 24;
363  current_window.uFrameY += 12;
364  current_window.uFrameHeight -= 12;
365  current_window.uFrameZ =
366  current_window.uFrameWidth + current_window.uFrameX - 1;
367  current_window.uFrameW =
368  current_window.uFrameHeight + current_window.uFrameY - 1;
369  unsigned int uBoxHeight;
370  if (!sHint.empty()) {
371  uBoxHeight =
372  pFontLucida->CalcTextHeight(sHint, current_window.uFrameWidth, 0) +
373  24;
374  } else {
375  uBoxHeight = uFrameHeight;
376  }
377  if (uBoxHeight < 64) {
378  uBoxHeight = 64;
379  }
380  if ((int)(uBoxHeight + this->uFrameY) > 479) {
381  uBoxHeight = 479 - this->uFrameY;
382  }
383  DrawPopupWindow(this->uFrameX, this->uFrameY, this->uFrameWidth,
384  uBoxHeight);
385  if (!sHint.empty()) {
386  current_window.DrawTitleText(
387  pFontLucida, 0,
388  (int)(uBoxHeight -
389  pFontLucida->CalcTextHeight(this->sHint,
390  current_window.uFrameWidth, 0)) /
391  2 -
392  14,
393  0, this->sHint, 3);
394  }
395 }
396 
398  if (!window_SpeakInHouse) {
399  return;
400  }
401  GUIWindow pWindow = *this;
402  pWindow.uFrameWidth -= 18;
403  pWindow.uFrameZ -= 18;
404  uint16_t pWhiteColor = Color16(0xFFu, 0xFFu, 0xFFu);
405  uint16_t pColor2 = Color16(0x15u, 0x99u, 0xE9u);
406  render->DrawTextureNew(477 / 640.0f, 0, game_ui_dialogue_background);
407  render->DrawTextureAlphaNew(468 / 640.0f, 0, game_ui_right_panel_frame);
409  const char *pHouseName = p2DEvents[window_SpeakInHouse->par1C - 1].pName;
410  if (pHouseName) {
411  int v3 = 2 * pFontCreate->GetHeight() - 6 -
412  pFontCreate->CalcTextHeight(pHouseName, 130, 0);
413  if (v3 < 0) v3 = 0;
414  pWindow.DrawTitleText(pFontCreate, 0x1EAu, v3 / 2 + 4, pWhiteColor,
416  }
417  }
418  pWindow.uFrameWidth += 8;
419  pWindow.uFrameZ += 8;
420  if (!pDialogueNPCCount) {
422  JailDialog();
424  uHouse_ExitPic) {
425  render->DrawTextureAlphaNew(556 / 640.0f, 451 / 480.0f,
427  render->DrawTextureAlphaNew(476 / 640.0f, 451 / 480.0f,
429  } else {
430  render->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f,
432  }
433  return;
434  }
435  if (!current_npc_text.empty()) {
436  GUIWindow pDialogWindow;
437  pDialogWindow.uFrameWidth = 458;
438  pDialogWindow.uFrameZ = 457;
439  int pTextHeight = pFontArrus->CalcTextHeight(
440  current_npc_text, pDialogWindow.uFrameWidth, 13);
441  int v6 = pTextHeight + 7;
442  render->DrawTextureCustomHeight(8 / 640.0f,
443  (352 - (pTextHeight + 7)) / 480.0f,
444  ui_leather_mm7, pTextHeight + 7);
445  render->DrawTextureAlphaNew(8 / 640.0f, (347 - v6) / 480.0f,
448  pFontArrus, 13, 354 - v6, 0,
450  pDialogWindow.uFrameWidth, 13),
451  0, 0, 0);
452  }
453  if (uNumDialogueNPCPortraits <= 0) {
455  uHouse_ExitPic) {
456  render->DrawTextureAlphaNew(556 / 640.0f, 451 / 480.0f,
458  render->DrawTextureAlphaNew(476 / 640.0f, 451 / 480.0f,
460  } else {
461  render->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f,
463  }
464  return;
465  }
466 
467  unsigned int v10 = 0;
468 
469  for (int v8 = 0; v8 < uNumDialogueNPCPortraits; ++v8) {
470  render->DrawTextureAlphaNew(
472  640.0f,
474  480.0f,
476  render->DrawTextureAlphaNew(
480  if (uNumDialogueNPCPortraits < 4) {
481  String pTitleText;
482  int v9 = 0;
483  if (v8 + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic) {
484  pTitleText = pMapStats->pInfos[uHouse_ExitPic].pName;
485  v9 = 94 * v8 + 113;
486  } else {
487  if (!v8 && dword_591080) {
488  pTitleText = (char*)p2DEvents[window_SpeakInHouse->par1C - 1].pProprieterTitle;
489  pWindow.DrawTitleText(pFontCreate, 0x1E3u, 113, pColor2, pTitleText, 3);
490  continue;
491  }
492  pTitleText = HouseNPCData[v8 + 1 - (dword_591080 != 0)]->pName;
493  v9 = pNPCPortraits_y[uNumDialogueNPCPortraits - 1][v8] + pDialogueNPCPortraits[v8]->GetHeight() + 2;
494  }
495  v10 = v9;
496  pWindow.DrawTitleText(pFontCreate, 483, v10, pColor2, pTitleText, 3);
497  }
498  }
500  render->DrawTextureAlphaNew(556 / 640.0f, 451 / 480.0f,
502  render->DrawTextureAlphaNew(476 / 640.0f, 451 / 480.0f,
504  } else {
505  render->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f,
507  }
508  return;
509  }
510 
511  char *v4 = (char *)pDialogueNPCCount - 1;
512  render->DrawTextureAlphaNew((pNPCPortraits_x[0][0] - 4) / 640.0f,
513  (pNPCPortraits_y[0][0] - 4) / 480.0f,
515  render->DrawTextureAlphaNew(pNPCPortraits_x[0][0] / 640.0f,
516  pNPCPortraits_y[0][0] / 480.0f,
517  pDialogueNPCPortraits[(int)v4]);
521  render->DrawTextureAlphaNew(556 / 640.0f, 451 / 480.0f,
523  render->DrawTextureAlphaNew(476 / 640.0f, 451 / 480.0f,
525  } else {
526  render->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f,
528  }
529  return;
530  }
531  if (v4 || !dword_591080) { // emerald isle ship before quest's done / на
532  // изумрудном острове заходит на корабле пока не
533  // выполнены квесты
535  } else {
536  pWindow.DrawTitleText(
537  pFontCreate, 0x1E3u, 0x71u, pColor2,
541  switch (in_current_building_type) {
544  break;
546  ArmorShopDialog();
547  break;
549  MagicShopDialog();
550  break;
552  AlchemistDialog();
553  break;
563  GuildDialog();
564  break;
565  case BuildingType_18:
566  __debugbreak(); // What over the dialog?
567  sub_4B6478();
568  break;
570  TownHallDialog();
571  break;
572  case BuildingType_Tavern:
573  TavernDialog();
574  break;
575  case BuildingType_Bank:
576  BankDialog();
577  break;
578  case BuildingType_Temple:
579  TempleDialog();
580  break;
582  case BuildingType_Boats:
584  break;
586  // __debugbreak(); // param was passed via pTmpBuf, investiage
587  // ?? no idea why this could pass an argument - its always reset
588  TrainingDialog("");
589  break;
590  case BuildingType_Jail:
591  JailDialog();
592  break;
593  default:
594  // __debugbreak();//New BuildingType (if enter Boat)
595  break;
596  }
597  }
599  render->DrawTextureAlphaNew(556 / 640.0f, 451 / 480.0f,
601  render->DrawTextureAlphaNew(476 / 640.0f, 451 / 480.0f,
603  } else {
604  render->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f,
606  }
607 }
608 
610  int seconds = time.GetSecondsFraction();
611  int minutes = time.GetMinutesFraction();
612  int hours = time.GetHoursOfDay();
613  int days = time.GetDays();
614 
615  String str = "";
616  if (days) {
617  auto day_str = localization->GetString(57); // Days
618  if (days <= 1) day_str = localization->GetString(56); // Day
619 
620  str += StringPrintf("%d %s ", days, day_str);
621  }
622 
623  if (hours) {
624  auto hour_str = localization->GetString(110); // Hours
625  if (hours <= 1) hour_str = localization->GetString(109); // Hour
626 
627  str += StringPrintf("%d %s ", hours, hour_str);
628  }
629 
630  if (minutes && !days) {
631  auto minute_str = localization->GetString(436); // Minutes
632  if (minutes <= 1) minute_str = localization->GetString(437); // Minute
633 
634  str += StringPrintf("%d %s ", minutes, minute_str);
635  }
636 
637  if (seconds && !hours) {
638  auto seconds_str = localization->GetString(438); // Seconds
639  if (seconds <= 1) seconds_str = localization->GetString(439); // Second
640 
641  str += StringPrintf("%d %s ", seconds, seconds_str);
642  }
643 
644  return str;
645 }
646 
647 //----- (004B1854) --------------------------------------------------------
649  auto str = MakeDateTimeString(time);
650  this->DrawTitleText(
651  pFontArrus, 0,
652  (212 - pFontArrus->CalcTextHeight(str, this->uFrameWidth, 0)) / 2 + 101,
653  Color16(0xFFu, 0xFFu, 0x9Bu), localization->GetString(532) + str, 3);
654 }
655 
656 void GUIWindow::DrawTitleText(GUIFont *font, int horizontal_margin,
657  int vertical_margin,
658  unsigned __int16 uDefaultColor, const String &str,
659  int line_spacing) {
660  this->DrawTitleText(font, horizontal_margin, vertical_margin, uDefaultColor,
661  str.c_str(), line_spacing);
662 }
663 
664 //----- (0044D406) --------------------------------------------------------
665 void GUIWindow::DrawTitleText(GUIFont *pFont, int uHorizontalMargin,
666  int uVerticalMargin,
667  unsigned __int16 uDefaultColor,
668  const char *pInString, int uLineSpacing) {
669  int width = this->uFrameWidth - uHorizontalMargin;
670  ui_current_text_color = uDefaultColor;
671  String resString = pFont->FitTextInAWindow(pInString, this->uFrameWidth,
672  uHorizontalMargin);
673  std::istringstream stream(resString);
674  String line;
675  int x = uHorizontalMargin + this->uFrameX;
676  int y = uVerticalMargin + this->uFrameY;
677  while (std::getline(stream, line)) {
678  unsigned int x_offset = pFont->AlignText_Center(width, line);
679  pFont->DrawTextLine(line, uDefaultColor, x + x_offset, y,
680  window->GetWidth());
681  y += pFont->GetHeight() - uLineSpacing;
682  }
683 }
684 
685 void GUIWindow::DrawText(GUIFont *font, int x, int y, unsigned short uFontColor,
686  const String &str, bool present_time_transparency,
687  int max_text_height, int uFontShadowColor) {
688  this->DrawText(font, x, y, uFontColor, str.c_str(),
689  present_time_transparency, max_text_height,
690  uFontShadowColor);
691 }
692 
693 //----- (0044CE08) --------------------------------------------------------
694 void GUIWindow::DrawText(GUIFont *font, int uX, int uY,
695  unsigned short uFontColor, const char *Str,
696  bool present_time_transparency, int max_text_height,
697  int uFontShadowColor) {
698  font->DrawText(this, uX, uY, uFontColor, Str, present_time_transparency,
699  max_text_height, uFontShadowColor);
700 }
701 
702 int GUIWindow::DrawTextInRect(GUIFont *font, unsigned int x, unsigned int y,
703  unsigned int color, const char *text,
704  int rect_width, int reverse_text) {
705  String label = String(text);
706  return DrawTextInRect(font, x, y, color, label, rect_width, reverse_text);
707 }
708 
709 //----- (0044CB4F) --------------------------------------------------------
710 int GUIWindow::DrawTextInRect(GUIFont *pFont, unsigned int uX, unsigned int uY,
711  unsigned int uColor, String &str, int rect_width,
712  int reverse_text) {
713  return pFont->DrawTextInRect(this, uX, uY, uColor, str, rect_width,
714  reverse_text);
715 }
716 
717 GUIButton *GUIWindow::CreateButton(int uX, int uY, int uWidth, int uHeight,
718  int a6, int a7, UIMessageType msg,
719  unsigned int msg_param, uint8_t uHotkey,
720  const String &label,
721  const std::vector<Image *> &textures) {
722  GUIButton *pButton = new GUIButton();
723 
724  pButton->pParent = this;
725  pButton->uWidth = uWidth;
726  pButton->uHeight = uHeight;
727 
728  if (a6 == 2 && !uHeight) {
729  pButton->uHeight = uWidth;
730  }
731 
732  pButton->uButtonType = a6;
733  pButton->uX = uX + this->uFrameX;
734  pButton->uY = uY + this->uFrameY;
735  pButton->uZ = pButton->uX + uWidth;
736  pButton->uW = pButton->uY + uHeight;
737  pButton->field_2C_is_pushed = false;
738  pButton->field_1C = a7;
739  pButton->msg = msg;
740  pButton->msg_param = msg_param;
741  pButton->uHotkey = uHotkey;
742  pButton->sLabel = label;
743  pButton->vTextures = textures;
744 
745  vButtons.push_back(pButton);
746 
747  return pButton;
748 }
749 
750 bool GUIWindow::Contains(unsigned int x, unsigned int y) {
751  return (x >= uFrameX && x <= uFrameZ && y >= uFrameY && y <= uFrameW);
752 }
753 
757 }
758 
759 void GUIWindow::DrawFlashingInputCursor(int uX, int uY, GUIFont *a2) {
760  if (OS_GetTime() % 1000 > 500) {
761  DrawText(a2, uX, uY, 0, "_", 0, 0, 0);
762  }
763 }
764 
766  this->mouse = EngineIoc::ResolveMouse();
767  this->log = EngineIoc::ResolveLogger();
768 }
769 
770 GUIWindow::GUIWindow(WindowType windowType, unsigned int uX, unsigned int uY, unsigned int uWidth,
771  unsigned int uHeight, int pButton, const String &hint
772 )
773  : eWindowType(windowType) {
774  this->mouse = EngineIoc::ResolveMouse();
775  this->log = EngineIoc::ResolveLogger();
776 
777  log->Info(L"New window: %S", ToString(windowType));
778  lWindowList.push_front(this);
779  this->uFrameWidth = uWidth;
780  this->uFrameHeight = uHeight;
781 
782  this->uFrameX = uX;
783  this->uFrameY = uY;
784  this->uFrameZ = uX + uWidth - 1;
785  this->uFrameW = uY + uHeight - 1;
786 
787  this->ptr_1C = (void *)pButton;
788  this->sHint = hint;
789 
790  this->receives_keyboard_input = false;
791 }
792 
793 //----- (004B3EF0) --------------------------------------------------------
794 void DrawJoinGuildWindow(int pEventCode) {
795  uDialogueType = 81; // enum JoinGuildDialog
796  current_npc_text = (char *)pNPCTopics[pEventCode + 99].pText;
797  ContractSelectText(pEventCode);
799  pDialogueWindow = new GUIWindow(WINDOW_Dialogue, 0, 0, window->GetWidth(), 350, pEventCode);
801  471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0,
802  localization->GetString(34),
803  { { ui_exit_cancel_button_background } }); // Cancel
804  pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0,
806  pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_ClickNPCTopic,
807  82, 0, localization->GetString(122));
810 }
811 
814  if (pDialogueWindow) {
816  }
817  pDialogueWindow = nullptr;
818  pMiscTimer->Resume();
819  pEventTimer->Resume();
820 }
821 
823  GUIButton *pButton = (GUIButton *)ptr_1C;
824  render->DrawTextureAlphaNew(uFrameY / 640.0f, uFrameX / 480.0f,
825  pButton->vTextures[0]);
826  viewparams->bRedrawGameUI = true;
827 }
828 
831 }
832 
834  if (bPlaySound) {
836  }
837  GUIButton *pButton = (GUIButton *)ptr_1C;
838  render->DrawTextureAlphaNew(uFrameX / 640.0f, uFrameY / 480.0f, pButton->vTextures[0]);
839  viewparams->bRedrawGameUI = true;
840  if (!sHint.empty()) {
841  pButton->DrawLabel(sHint, pFontCreate, 0, 0);
842  }
843  Release();
844 }
845 
847  if (bPlaySound) {
849  }
850  GUIButton *pButton = (GUIButton *)ptr_1C;
851  if (pButton->uX >= 0 && pButton->uX <= window->GetWidth()) {
852  if (pButton->uY >= 0 && pButton->uY <= window->GetHeight()) {
853  render->DrawTextureAlphaNew(uFrameX / 640.0f, uFrameY / 480.0f, pButton->vTextures[0]);
854  }
855  }
856  viewparams->bRedrawGameUI = true;
857  if (!sHint.empty()) {
858  pButton->DrawLabel(sHint, pFontCreate, 0, 0);
859  }
860  Release();
861 }
862 
864  if (!sHint.empty()) {
866  }
867  auto pButton = (GUIButton *)ptr_1C;
868  render->DrawTextureAlphaNew(uFrameX / 640.0f, uFrameY / 480.0f,
869  pButton->vTextures[1]);
871  if (!sHint.empty()) {
872  pButton->DrawLabel(sHint, pFontCreate, 0, 0);
873  }
874  Release();
875 }
876 
878  if (!sHint.empty()) {
880  }
881  auto pButton = (GUIButton *)ptr_1C;
882  render->DrawTextureAlphaNew(uFrameX / 640.0f, uFrameY / 480.0f,
883  pButton->vTextures[1]);
884  viewparams->bRedrawGameUI = true;
885 
886  Release();
887 }
888 
890  if (!sHint.empty()) {
892  }
893  auto pButton = (GUIButton *)ptr_1C;
894  render->DrawTextureAlphaNew(uFrameX / 640.0f, uFrameY / 480.0f,
895  pButton->vTextures[0]);
896  viewparams->bRedrawGameUI = true;
897  if (!sHint.empty()) {
898  pButton->DrawLabel(sHint, pFontCreate, 0, 0);
899  }
900  Release();
901 
903  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_SaveGame, 0, 0);
904  } else {
905  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_LoadGame, 0, 0);
906  }
907 }
908 
910  if (sHint.empty()) {
912  }
913  auto pGUIButton = (GUIButton *)ptr_1C;
914  render->DrawTextureAlphaNew(uFrameX / 640.0f, uFrameY / 480.0f,
915  pGUIButton->vTextures[0]);
916  viewparams->bRedrawGameUI = true;
917  if (!sHint.empty()) {
918  pGUIButton->DrawLabel(sHint, pFontCreate, 0, 0);
919  }
920  Release();
921 
922  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0);
923 }
924 
926  if (!sHint.empty()) {
928  }
929  auto pButton = (GUIButton *)ptr_1C;
930  render->DrawTextureAlphaNew(uFrameX / 640.0f, uFrameY / 480.0f, pButton->vTextures[1]);
931  viewparams->bRedrawGameUI = true;
932  if (!sHint.empty()) {
933  pButton->DrawLabel(sHint, pFontCreate, 0, 0);
934  }
935  Release();
936 
937  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0);
938 }
939 
941  if (!sHint.empty()) {
943  }
944 
945  auto pButton = (GUIButton *)ptr_1C;
946  render->DrawTextureAlphaNew(uFrameX / 640.0f, uFrameY / 480.0f, pButton->vTextures[0]);
947  viewparams->bRedrawGameUI = true;
948  if (!sHint.empty()) {
949  pButton->DrawLabel(sHint, pFontCreate, 0, 0);
950  }
951  Release();
952 
953  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0);
954 }
955 
958  extern bool UI_OnVkKeyDown(unsigned int vkKey);
959  UI_OnVkKeyDown(VK_NEXT);
960  }
961 
962  std::list<GUIWindow *> tmpWindowList(lWindowList);
963  tmpWindowList.reverse(); // new windows are push front - but front should be drawn last?? testing
964  for (GUIWindow *pWindow : tmpWindowList) {
965  pWindow->Update();
966  }
967 
968  if (GetCurrentMenuID() == -1) {
970  }
974  }
975 }
976 
979  a1.sHint.clear();
980  a1.uFrameX = 1;
981  a1.uFrameY = 1;
982  a1.uFrameWidth = 468;
983  unsigned int v0 =
985  a1.uFrameWidth, 0) +
986  2 * (unsigned char)pFontCreate->GetHeight() + 24;
987  a1.uFrameHeight = v0;
988  if ((v0 + a1.uFrameY) > 479) {
989  v0 = 479 - a1.uFrameY;
990  a1.uFrameHeight = 479 - a1.uFrameY;
991  }
992  a1.uFrameZ = a1.uFrameWidth + a1.uFrameX - 1;
993  a1.uFrameW = v0 + a1.uFrameY - 1;
994  a1.DrawMessageBox(0);
995  a1.uFrameX += 12;
996  a1.uFrameWidth -= 24;
997  a1.uFrameY += 12;
998  a1.uFrameHeight -= 12;
999  a1.uFrameZ = a1.uFrameWidth + a1.uFrameX - 1;
1000  a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
1001  char *v1 =
1002  pItemsTable->pItems[(unsigned int)pGUIWindow_ScrollWindow->ptr_1C + 700]
1003  .pName;
1004 
1005  a1.DrawTitleText(
1006  pFontCreate, 0, 0, 0,
1007  StringPrintf(format_4E2D80, Color16(0xFFu, 0xFFu, 0x9Bu), v1), 3);
1008  a1.DrawText(pFontSmallnum, 1, pFontCreate->GetHeight() - 3, 0,
1009  pScrolls[(unsigned int)pGUIWindow_ScrollWindow->ptr_1C], 0, 0,
1010  0);
1011 }
1012 
1013 //----- (00467F48) --------------------------------------------------------
1014 void CreateMsgScrollWindow(signed int mscroll_id) {
1015  if (!pGUIWindow_ScrollWindow && mscroll_id >= 700) {
1016  if (mscroll_id <= 782) {
1018  new GUIWindow_Scroll(0, 0, window->GetWidth(),
1019  window->GetHeight(), mscroll_id - 700, "");
1020  }
1021  }
1022 }
1023 
1024 //----- (00467F9F) --------------------------------------------------------
1029  }
1030 }
1031 //----- (004226EF) --------------------------------------------------------
1032 void SetUserInterface(PartyAlignment align, bool bReplace) {
1033  extern void set_default_ui_skin();
1035 
1036  if (!parchment) {
1037  parchment = assets->GetImage_ColorKey("parchment", 0x7FF);
1038  }
1039 
1040  if (align == PartyAlignment::PartyAlignment_Evil) {
1041  if (bReplace) {
1044  assets->GetImage_PCXFromIconsLOD("ib-b-C.pcx");
1048  assets->GetImage_PCXFromIconsLOD("IB-Foot-c.pcx");
1049 
1051 
1052  game_ui_minimap_frame = assets->GetImage_Alpha("ib-autmask-c");
1054  assets->GetImage_ColorKey("IB-COMP-C", 0x7FF);
1055 
1059 
1060  ui_btn_npc_left = assets->GetImage_ColorKey("IB-NPCLD-C", 0x7FF);
1061  ui_btn_npc_right = assets->GetImage_ColorKey("IB-NPCRD-C", 0x7FF);
1062  game_ui_btn_zoomin = assets->GetImage_Alpha("ib-autout-C");
1063  game_ui_btn_zoomout = assets->GetImage_Alpha("ib-autin-C");
1065  assets->GetImage_ColorKey("IB-selec-C", 0x7FF);
1066  game_ui_btn_cast = assets->GetImage_Alpha("ib-m1d-c");
1067  game_ui_btn_rest = assets->GetImage_Alpha("ib-m2d-c");
1070 
1072  assets->GetImage_ColorKey("isg-01-c", 0x7FF);
1074  assets->GetImage_ColorKey("isg-02-c", 0x7FF);
1076  assets->GetImage_ColorKey("isg-03-c", 0x7FF);
1078  assets->GetImage_ColorKey("isg-04-c", 0x7FF);
1079 
1082 
1085 
1087  assets->GetImage_ColorKey("ib-bcu-c", 0x7FF);
1088 
1089  game_ui_evtnpc = assets->GetImage_ColorKey("evtnpc-c", 0x7FF);
1091  assets->GetImage_ColorKey("fr_inven-c", 0x7FF);
1092  messagebox_corner_y = assets->GetImage_Alpha("cornr_ll-c");
1093  messagebox_corner_w = assets->GetImage_Alpha("cornr_lr-c");
1094  messagebox_corner_x = assets->GetImage_Alpha("cornr_ul-c");
1095  messagebox_corner_z = assets->GetImage_Alpha("cornr_ur-c");
1099  messagebox_border_top = assets->GetImage_Alpha("edge_top-c");
1100  _591428_endcap = assets->GetImage_ColorKey("endcap-c", 0x7FF);
1101  } else {
1104  assets->GetImage_PCXFromIconsLOD("ib-b-c.pcx");
1108  assets->GetImage_PCXFromIconsLOD("IB-Foot-c.pcx");
1109 
1111  game_ui_minimap_frame = assets->GetImage_Alpha("ib-autmask-c");
1113  assets->GetImage_ColorKey("IB-COMP-C", 0x7FF);
1117 
1118  ui_btn_npc_left = assets->GetImage_ColorKey("IB-NPCLD-C", 0x7FF);
1119  ui_btn_npc_right = assets->GetImage_ColorKey("IB-NPCRD-C", 0x7FF);
1121  assets->GetImage_ColorKey("ib-autout-C", 0x7FF);
1123  assets->GetImage_ColorKey("ib-autin-C", 0x7FF);
1125  assets->GetImage_ColorKey("IB-selec-C", 0x7FF);
1126  game_ui_btn_cast = assets->GetImage_Alpha("ib-m1d-c");
1127  game_ui_btn_rest = assets->GetImage_Alpha("ib-m2d-c");
1131  assets->GetImage_ColorKey("ib-bcu-c", 0x7FF);
1132 
1134  assets->GetImage_ColorKey("isg-01-c", 0x7FF);
1136  assets->GetImage_ColorKey("isg-02-c", 0x7FF);
1138  assets->GetImage_ColorKey("isg-03-c", 0x7FF);
1140  assets->GetImage_ColorKey("isg-04-c", 0x7FF);
1141 
1142  game_ui_evtnpc = assets->GetImage_ColorKey("evtnpc-c", 0x7FF);
1144  assets->GetImage_ColorKey("fr_inven", 0x7FF);
1145 
1148 
1151  }
1152  uGameUIFontMain = Color16(0xC8u, 0, 0);
1153  uGameUIFontShadow = Color16(10, 0, 0);
1154  } else if (align == PartyAlignment::PartyAlignment_Neutral) {
1155  if (bReplace) {
1158  assets->GetImage_PCXFromIconsLOD("ib-b-a.pcx");
1162  assets->GetImage_PCXFromIconsLOD("IB-Foot-a.pcx");
1163 
1165  game_ui_minimap_frame = assets->GetImage_Alpha("ib-autmask-a");
1167  assets->GetImage_ColorKey("IB-COMP-a", 0x7FF);
1171 
1172  ui_btn_npc_left = assets->GetImage_ColorKey("IB-NPCLD-a", 0x7FF);
1173  ui_btn_npc_right = assets->GetImage_ColorKey("IB-NPCRD-a", 0x7FF);
1175  assets->GetImage_ColorKey("ib-autout-a", 0x7FF);
1177  assets->GetImage_ColorKey("ib-autin-a", 0x7FF);
1179  assets->GetImage_ColorKey("IB-selec-a", 0x7FF);
1180  game_ui_btn_cast = assets->GetImage_Alpha("ib-m1d-a");
1181  game_ui_btn_rest = assets->GetImage_Alpha("ib-m2d-a");
1184 
1186  assets->GetImage_ColorKey("isg-01-a", 0x7FF);
1188  assets->GetImage_ColorKey("isg-02-a", 0x7FF);
1190  assets->GetImage_ColorKey("isg-03-a", 0x7FF);
1192  assets->GetImage_ColorKey("isg-04-a", 0x7FF);
1193 
1198 
1200  assets->GetImage_ColorKey("ib-bcu-a", 0x7FF);
1201 
1202  game_ui_evtnpc = assets->GetImage_ColorKey("evtnpc", 0x7FF);
1204  assets->GetImage_ColorKey("fr_inven", 0x7FF);
1205  messagebox_corner_y = assets->GetImage_Alpha("cornr_ll");
1206  messagebox_corner_w = assets->GetImage_Alpha("cornr_lr");
1207  messagebox_corner_x = assets->GetImage_Alpha("cornr_ul");
1208  messagebox_corner_z = assets->GetImage_Alpha("cornr_ur");
1213  _591428_endcap = assets->GetImage_ColorKey("endcap", 0x7FF);
1214  } else {
1217  assets->GetImage_PCXFromIconsLOD("ib-b-A.pcx");
1221  assets->GetImage_PCXFromIconsLOD("IB-Foot-a.pcx");
1222 
1224  game_ui_minimap_frame = assets->GetImage_Alpha("ib-autmask-a");
1226  assets->GetImage_ColorKey("IB-COMP-A", 0x7FF);
1230 
1231  ui_btn_npc_left = assets->GetImage_ColorKey("IB-NPCLD-A", 0x7FF);
1232  ui_btn_npc_right = assets->GetImage_ColorKey("IB-NPCRD-A", 0x7FF);
1234  assets->GetImage_ColorKey("IB-selec-A", 0x7FF);
1235  game_ui_btn_cast = assets->GetImage_Alpha("ib-m1d-a");
1236  game_ui_btn_rest = assets->GetImage_Alpha("ib-m2d-a");
1240  assets->GetImage_ColorKey("ib-autout-a", 0x7FF);
1242  assets->GetImage_ColorKey("ib-autin-a", 0x7FF);
1244  assets->GetImage_ColorKey("ib-bcu-a", 0x7FF);
1245 
1247  assets->GetImage_ColorKey("isg-01-a", 0x7FF);
1249  assets->GetImage_ColorKey("isg-02-a", 0x7FF);
1251  assets->GetImage_ColorKey("isg-03-a", 0x7FF);
1253  assets->GetImage_ColorKey("isg-04-a", 0x7FF);
1254 
1255  game_ui_evtnpc = assets->GetImage_ColorKey("evtnpc", 0x7FF);
1257  assets->GetImage_ColorKey("fr_inven", 0x7FF);
1258 
1263 
1264  messagebox_corner_y = assets->GetImage_Alpha("cornr_ll");
1265  messagebox_corner_w = assets->GetImage_Alpha("cornr_lr");
1266  messagebox_corner_x = assets->GetImage_Alpha("cornr_ul");
1267  messagebox_corner_z = assets->GetImage_Alpha("cornr_ur");
1272  _591428_endcap = assets->GetImage_ColorKey("endcap", 0x7FF);
1273  }
1274  uGameUIFontMain = Color16(0xAu, 0, 0);
1275  uGameUIFontShadow = Color16(230, 214, 193);
1276  } else if (align == PartyAlignment::PartyAlignment_Good) {
1277  if (bReplace) {
1280  assets->GetImage_PCXFromIconsLOD("ib-b-B.pcx");
1284  assets->GetImage_PCXFromIconsLOD("IB-Foot-b.pcx");
1285 
1287  game_ui_minimap_frame = assets->GetImage_Alpha("ib-autmask-b");
1289  assets->GetImage_ColorKey("IB-COMP-B", 0x7FF);
1293 
1294  ui_btn_npc_left = assets->GetImage_ColorKey("IB-NPCLD-B", 0x7FF);
1295  ui_btn_npc_right = assets->GetImage_ColorKey("IB-NPCRD-B", 0x7FF);
1297  assets->GetImage_ColorKey("ib-autout-B", 0x7FF);
1299  assets->GetImage_ColorKey("ib-autin-B", 0x7FF);
1301  assets->GetImage_ColorKey("IB-selec-B", 0x7FF);
1302  game_ui_btn_cast = assets->GetImage_Alpha("ib-m1d-b");
1303  game_ui_btn_rest = assets->GetImage_Alpha("ib-m2d-b");
1306 
1308  assets->GetImage_ColorKey("isg-01-b", 0x7FF);
1310  assets->GetImage_ColorKey("isg-02-b", 0x7FF);
1312  assets->GetImage_ColorKey("isg-03-b", 0x7FF);
1314  assets->GetImage_ColorKey("isg-04-b", 0x7FF);
1315 
1320 
1322  assets->GetImage_ColorKey("ib-bcu-b", 0x7FF);
1323  game_ui_evtnpc = assets->GetImage_ColorKey("evtnpc-b", 0x7FF);
1325  assets->GetImage_ColorKey("fr_inven-b", 0x7FF);
1326  messagebox_corner_y = assets->GetImage_Alpha("cornr_ll-b");
1327  messagebox_corner_w = assets->GetImage_Alpha("cornr_lr-b");
1328  messagebox_corner_x = assets->GetImage_Alpha("cornr_ul-b");
1329  messagebox_corner_z = assets->GetImage_Alpha("cornr_ur-b");
1333  messagebox_border_top = assets->GetImage_Alpha("edge_top-b");
1334  _591428_endcap = assets->GetImage_ColorKey("endcap-b", 0x7FF);
1335  }
1336  uGameUIFontMain = Color16(0, 0, 0xC8u);
1337  uGameUIFontShadow = Color16(255, 255, 255);
1338  } else {
1339  Error("Invalid alignment type: %u", align);
1340  }
1341 }
1342 
1344  GUIFont *Font) {
1345  window->DrawText(Font, 32, uY, 0, "\r020" + MakeDateTimeString(remaining_time), 0, 0, 0);
1346 }
1347 
1349  unsigned int a4, const char *file,
1350  int line) {
1351  // logger->Warning(L"%s @ (%S %u)", UIMessage2String(msg), file, line);
1353  message.eType = msg;
1354  message.param = param;
1355  message.field_8 = a4;
1356  message.file = file;
1357  message.line = line;
1358  qMessages.push(message);
1359 }
1360 
1363 }
1364 
1365 //----- (00417AD4) --------------------------------------------------------
1366 unsigned int GetSkillColor(unsigned int uPlayerClass,
1367  PLAYER_SKILL_TYPE uPlayerSkillType,
1368  signed int skill_level) {
1369  switch (uPlayerClass % 4) {
1370  case 0:
1371  {
1373  [uPlayerClass][uPlayerSkillType] >= skill_level)
1376  [uPlayerClass + 1][uPlayerSkillType] < skill_level &&
1378  [uPlayerClass + 2][uPlayerSkillType] < skill_level) {
1380  [uPlayerClass + 3][uPlayerSkillType] < skill_level)
1382  }
1384  } break;
1385 
1386  case 1:
1387  {
1389  [uPlayerClass][uPlayerSkillType] >= skill_level)
1392  [uPlayerClass + 1][uPlayerSkillType] < skill_level) {
1394  [uPlayerClass + 2][uPlayerSkillType] < skill_level)
1396  }
1398  } break;
1399 
1400  case 2:
1401  case 3:
1402  {
1404  [uPlayerClass][uPlayerSkillType] < skill_level)
1407  } break;
1408  }
1409  Error("Invalid player class: %u", uPlayerClass);
1410 }
1411 
1412 void ClickNPCTopic(int uMessageParam) {
1413  int pEventNumber; // ecx@8
1414  Player *v4; // esi@20
1415  char *v12; // eax@53
1416  char *v13; // eax@56
1417  char *v14; // eax@57
1418  char *v15; // eax@58
1419  int pPrice; // ecx@70
1420  char *v22; // [sp-Ch] [bp-18h]@73
1421  char *v24; // [sp-8h] [bp-14h]@73
1422 
1423  uDialogueType = uMessageParam + 1;
1424  NPCData *pCurrentNPCInfo =
1425  HouseNPCData[pDialogueNPCCount - ((dword_591080 != 0) ? 1 : 0)]; //- 1
1426  if (uMessageParam <= 24) {
1427  switch (uMessageParam) {
1428  case 13:
1430  pNPCStats->pProfessions[pCurrentNPCInfo->uProfession]
1431  .pJoinText,
1432  uActiveCharacter - 1, 0, 0, 0);
1435  BackToHouseMenu();
1436  return;
1437  case 19:
1438  pEventNumber = pCurrentNPCInfo->evt_A;
1439  break;
1440  case 20:
1441  pEventNumber = pCurrentNPCInfo->evt_B;
1442  break;
1443  case 21:
1444  pEventNumber = pCurrentNPCInfo->evt_C;
1445  break;
1446  case 22:
1447  pEventNumber = pCurrentNPCInfo->evt_D;
1448  break;
1449  case 23:
1450  pEventNumber = pCurrentNPCInfo->evt_E;
1451  break;
1452  case 24:
1453  pEventNumber = pCurrentNPCInfo->evt_F;
1454  break;
1455  default:
1456  BackToHouseMenu();
1457  return;
1458  }
1459  /*switch ( pEventNumber )
1460  {
1461  case 139:
1462  OracleDialogue();
1463  goto _return;
1464  case 311:
1465  CheckBountyRespawnAndAward();
1466  goto _return;
1467  }*/
1468  if (pEventNumber < 200 || pEventNumber > 310) {
1469  if (pEventNumber < 400 || pEventNumber > 410) {
1470  if (pEventNumber == 139) {
1471  OracleDialogue();
1472  } else {
1473  if (pEventNumber == 311) {
1475  } else {
1476  current_npc_text.clear();
1478  EventProcessor(pEventNumber, 0, 1);
1479  activeLevelDecoration = nullptr;
1480  }
1481  }
1482  } else {
1483  dword_F8B1D8 = uMessageParam;
1484  DrawJoinGuildWindow(pEventNumber - 400);
1485  }
1486  } else {
1487  _4B3FE5_training_dialogue(pEventNumber);
1488  }
1489  BackToHouseMenu();
1490  return;
1491  }
1492  if (uMessageParam != 76) {
1493  if (uMessageParam == 77) {
1494  // uBoxHeight = pCurrentNPCInfo->uProfession;
1495  __debugbreak(); // probably hirelings found in buildings, not
1496  // present in MM7, changed
1497  // "pCurrentNPCInfo->uProfession - 1" to
1498  // "pCurrentNPCInfo->uProfession", have to check in
1499  // other versions whether it's ok
1502  pNPCStats->pProfessions[pCurrentNPCInfo->uProfession]
1503  .pJoinText,
1504  uActiveCharacter - 1, 0, 0, 0);
1505  } else {
1507  pNPCStats->pProfessions[pCurrentNPCInfo->uProfession]
1508  .pBenefits,
1509  uActiveCharacter - 1, 0, 0, 0);
1510  }
1513  } else {
1514  if (uMessageParam == 79) {
1515  if (contract_approved) {
1517  if (uActiveCharacter) {
1518  v12 =
1519  (char *)&pPlayers[uActiveCharacter]
1520  ->pActiveSkills[dword_F8B1AC_award_bit_number];
1521  *(short *)v12 &= 0x3Fu;
1523  case 2:
1524  v15 = (char *)&pPlayers[uActiveCharacter]
1525  ->pActiveSkills
1527  *v15 |= 0x40u;
1528  break;
1529  case 3:
1530  v14 = (char *)&pPlayers[uActiveCharacter]
1531  ->pActiveSkills
1533  *v14 |= 0x80u;
1534  break;
1535  case 4:
1536  v13 = (char *)&pPlayers[uActiveCharacter]
1537  ->pActiveSkills
1539  v13[1] |= 1u;
1540  break;
1541  }
1542  pPlayers[uActiveCharacter]->PlaySound(SPEECH_85, 0);
1543  }
1544  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0);
1545  /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
1546  {
1547  pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType
1548  = UIMSG_Escape;
1549  pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param
1550  = 1;
1551  *(&pMessageQueue_50CBD0->uNumMessages + 3 *
1552  pMessageQueue_50CBD0->uNumMessages + 3) = 0;
1553  ++pMessageQueue_50CBD0->uNumMessages;
1554  }*/
1555  }
1556  } else {
1557  if (uMessageParam == 82 && contract_approved) { // join guild
1559  v4 = pParty->pPlayers.data();
1560  do {
1561  v4->SetVariable(VAR_Award,
1563  ++v4;
1564  } while ((signed int)v4 <
1565  (signed int)pParty->pHirelings.data());
1566  switch (dword_F8B1D8) {
1567  case 19:
1568  pEventNumber = pCurrentNPCInfo->evt_A;
1569  if (pEventNumber >= 400 && pEventNumber <= 416)
1570  pCurrentNPCInfo->evt_A = 0;
1571  break;
1572  case 20:
1573  pEventNumber = pCurrentNPCInfo->evt_B;
1574  if (pEventNumber >= 400 && pEventNumber <= 416)
1575  pCurrentNPCInfo->evt_B = 0;
1576  break;
1577  case 21:
1578  pEventNumber = pCurrentNPCInfo->evt_C;
1579  if (pEventNumber >= 400 && pEventNumber <= 416)
1580  pCurrentNPCInfo->evt_C = 0;
1581  break;
1582  case 22:
1583  pEventNumber = pCurrentNPCInfo->evt_D;
1584  if (pEventNumber >= 400 && pEventNumber <= 416)
1585  pCurrentNPCInfo->evt_D = 0;
1586  break;
1587  case 23:
1588  pEventNumber = pCurrentNPCInfo->evt_E;
1589  if (pEventNumber >= 400 && pEventNumber <= 416)
1590  pCurrentNPCInfo->evt_E = 0;
1591  break;
1592  case 24:
1593  pEventNumber = pCurrentNPCInfo->evt_F;
1594  if (pEventNumber >= 400 && pEventNumber <= 416)
1595  pCurrentNPCInfo->evt_F = 0;
1596  break;
1597  }
1598  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0);
1599  if (uActiveCharacter) {
1600  pPlayers[uActiveCharacter]->PlaySound(
1601  (PlayerSpeech)SPEECH_86, 0);
1602  BackToHouseMenu();
1603  return;
1604  }
1605  }
1606  }
1607  }
1608  BackToHouseMenu();
1609  return;
1610  }
1611 
1612  if (pParty->pHirelings[0].pName && pParty->pHirelings[1].pName) {
1614  533)); // ""I cannot join you, you're party is full""
1615  BackToHouseMenu();
1616  return;
1617  }
1618 
1619  if (pCurrentNPCInfo->uProfession != 51) { // burglars have no hiring price
1620  __debugbreak(); // probably hirelings found in buildings, not present
1621  // in MM7, changed "pCurrentNPCInfo->uProfession - 1"
1622  // to "pCurrentNPCInfo->uProfession", have to check in
1623  // other versions whether it's ok
1624  pPrice =
1625  pNPCStats->pProfessions[pCurrentNPCInfo->uProfession].uHirePrice;
1626  if (pParty->GetGold() < (unsigned int)pPrice) {
1627  GameUI_StatusBar_OnEvent(localization->GetString(LSTR_NOT_ENOUGH_GOLD));
1629  uDialogueType = 13;
1631  pNPCStats->pProfessions[pCurrentNPCInfo->uProfession].pJoinText,
1632  uActiveCharacter - 1, 0, 0, 0);
1633  if (uActiveCharacter)
1635  GameUI_StatusBar_OnEvent(localization->GetString(LSTR_NOT_ENOUGH_GOLD));
1636  BackToHouseMenu();
1637  return;
1638  } else {
1639  Party::TakeGold(pPrice);
1640  }
1641  }
1642 
1643  pCurrentNPCInfo->uFlags |= 128;
1646  if (pParty->pHirelings[0].pName) {
1647  memcpy(&pParty->pHirelings[1], pCurrentNPCInfo,
1648  sizeof(pParty->pHirelings[1]));
1649  v24 = pCurrentNPCInfo->pName;
1650  v22 = pParty->pHireling2Name;
1651  } else {
1652  memcpy(pParty->pHirelings.data(), pCurrentNPCInfo, 0x4Cu);
1653  v24 = pCurrentNPCInfo->pName;
1654  v22 = pParty->pHireling1Name;
1655  }
1656  strcpy(v22, v24);
1661 
1662  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0);
1663  if (uActiveCharacter)
1664  pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)61, 0);
1665 
1666 // _return:
1667  BackToHouseMenu();
1668 }
1669 
1670 // Originally called _4B254D_SkillMasteryTeacher to have contract_approved
1671 // assigned, to be able to set some button name. But it the name gets immediately
1672 // overwritten
1675  current_npc_text = String(pNPCTopics[a4 + 168].pText);
1677  a4); // might be needed because of contract_approved ?
1679  pDialogueWindow = new GUIWindow(WINDOW_Dialogue, 0, 0, window->GetWidth(), 350, a4);
1681  471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0,
1682  localization->GetString(34), { { ui_exit_cancel_button_background } });
1683  pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0,
1686  480, 160, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Fu, 0,
1690 }
1691 
1692 //----- (004B1ECE) --------------------------------------------------------
1694  __int16 *v0; // edi@1
1695  signed int v4; // eax@9
1696  int v5; // ebx@11
1697  signed int v8; // edi@14
1698  ItemGen *v9; // [sp+Ch] [bp-Ch]@11
1699  signed int v10; // [sp+10h] [bp-8h]@13
1700  int v11; // [sp+14h] [bp-4h]@1
1701 
1702  contract_approved = 0;
1703  v11 = 0;
1704  uDialogueType = 84;
1705  current_npc_text = (char *)pNPCTopics[667].pText;
1707 
1708  for (uint i = 0; i <= 53; i++) {
1709  if ((unsigned __int16)_449B57_test_bit(pParty->_quest_bits, *v0)) {
1710  for (uint pl = 0; pl < 4; pl++) {
1711  if (pParty->pPlayers[pl].CompareVariable(VAR_PlayerItemInHands,
1712  *(v0 + 1)))
1713  break;
1714  }
1715  }
1716  ++v11;
1717  }
1719  current_npc_text = (char *)pNPCTopics[666]
1720  .pText; // Here's %s that you lost. Be careful
1723  pParty->pPlayers[0].AddVariable(VAR_PlayerItemInHands, v4);
1724  }
1725  if (contract_approved == 601) {
1726  v5 = 0;
1727  // v12 = pParty->pPlayers.data();//[0].uClass;
1728  v9 = 0;
1729  // while ( 1 )
1730  for (uint i = 0; i < 4; i++) {
1731  if (pParty->pPlayers[i].classType == PLAYER_CLASS_LICH) {
1732  v10 = 0;
1733  // v6 =
1734  // pParty->pPlayers.data();//[0].pInventoryItems[0].field_1A;
1735  for (uint pl = 0; pl < 4; pl++) {
1736  for (v8 = 0; v8 < 126; v8++) { // 138
1737  if (pParty->pPlayers[pl]
1738  .pInventoryItemList[v8]
1739  .uItemID == ITEM_LICH_JAR_FULL) {
1740  if (!pParty->pPlayers[pl]
1741  .pInventoryItemList[v8]
1742  .uHolderPlayer)
1743  v9 = &pParty->pPlayers[pl]
1744  .pInventoryItemList[v8];
1745  if (pParty->pPlayers[pl]
1746  .pInventoryItemList[v8]
1747  .uHolderPlayer == v5)
1748  v10 = 1;
1749  }
1750  }
1751  }
1752  if (!v10) break;
1753  }
1754  // ++v12;
1755  ++v5;
1756  // if ( v12 > &pParty->pPlayers[3] )
1757  // return;
1758  }
1759  if (v9) v9->uHolderPlayer = v5;
1760  }
1761 }
1762 
1764  int i; // eax@2
1765  int rand_monster_id; // edx@3
1766 
1767  uDialogueType = 83;
1769  pDialogueWindow = new GUIWindow(WINDOW_Dialogue, 0, 0, window->GetWidth(), 350, 0);
1771  471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0,
1772  localization->GetString(34), // "Cancel"
1773  { { ui_exit_cancel_button_background } });
1774  pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0,
1776  pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_0, 83, 0, "");
1779  // get new monster for hunting
1781  int)((char *)window_SpeakInHouse->ptr_1C - 102)] <
1782  pParty->GetPlayingTime()) {
1784  int)((char *)window_SpeakInHouse->ptr_1C - 102)] = false;
1786  int)((char *)window_SpeakInHouse->ptr_1C - 102)] =
1787  GameTime((int64_t)((double)(0x12750000 *
1788  (pParty->uCurrentMonth +
1789  12 * pParty->uCurrentYear - 14015)) *
1790  0.033333335));
1791  for (i = rand();; i = rand()) {
1792  rand_monster_id = i % 258 + 1;
1793  pParty->monster_id_for_hunting[(int)((char *)window_SpeakInHouse->ptr_1C - 102)] =
1794  rand_monster_id;
1795  if ((uint16_t)rand_monster_id < 0x73u ||
1796  (uint16_t)rand_monster_id > 0x84u) {
1797  if (((uint16_t)rand_monster_id < 0xEBu ||
1798  (uint16_t)rand_monster_id > 0xFCu) &&
1799  ((uint16_t)rand_monster_id < 0x85u ||
1800  (uint16_t)rand_monster_id > 0x96u) &&
1801  ((uint16_t)rand_monster_id < 0x97u ||
1802  (uint16_t)rand_monster_id > 0xBAu) &&
1803  ((uint16_t)rand_monster_id < 0xC4u ||
1804  (uint16_t)rand_monster_id > 0xC6u))
1805  break;
1806  }
1807  }
1808  }
1810  int)((char *)window_SpeakInHouse->ptr_1C - 102)];
1812  int)((char *)window_SpeakInHouse->ptr_1C - 102)]) {
1813  bountyHunting_text = pNPCTopics[351].pText;
1815  int)((char *)window_SpeakInHouse->ptr_1C - 102)])
1816  bountyHunting_text = pNPCTopics[353].pText;
1817  } else { // get prize
1819  int)((char *)window_SpeakInHouse->ptr_1C - 102)]) {
1821  100 *
1823  ->pInfos
1824  [(unsigned __int16)pParty->monster_id_for_hunting[(
1825  int)((char *)window_SpeakInHouse->ptr_1C -
1826  102)]]
1827  .uLevel,
1828  0);
1829  for (uint i = 0; i < 4; ++i)
1830  pParty->pPlayers[i].SetVariable(VAR_Award, 86);
1832  100 * pMonsterStats
1834  int)((char *)window_SpeakInHouse->ptr_1C - 102)]]
1835  .uLevel;
1837  int)((char *)window_SpeakInHouse->ptr_1C - 102)] = 0;
1839  int)((char *)window_SpeakInHouse->ptr_1C - 102)] = false;
1840  }
1841  bountyHunting_text = pNPCTopics[352].pText;
1842  }
1843 }
1844 
1845 //----- (004B254D) --------------------------------------------------------
1847  int teacherLevel; // edx@1
1848  int skillBeingTaught; // ecx@1
1849  int pClassType; // eax@7
1850  int currClassMaxMastery; // eax@7
1851  int pointsInSkillWOutMastery; // ebx@7
1852  int classBaseId; // eax@8
1853  unsigned int skillMastery; // eax@29
1854  unsigned __int16 pointsInSkill; // [sp+1Ch] [bp-10h]@7
1855  int masteryLevelBeingTaught; // [sp+24h] [bp-8h]@7
1856 
1857  contract_approved = 0;
1858  teacherLevel = (trainerInfo - 200) % 3;
1859  skillBeingTaught = (trainerInfo - 200) / 3;
1860  Player *activePlayer = pPlayers[uActiveCharacter];
1861  pClassType = activePlayer->classType;
1862  currClassMaxMastery =
1864  [skillBeingTaught];
1865  masteryLevelBeingTaught = teacherLevel + 2;
1866  dword_F8B1B0_MasteryBeingTaught = masteryLevelBeingTaught;
1867  if (currClassMaxMastery < masteryLevelBeingTaught) {
1868  classBaseId = pClassType - pClassType % 4;
1869 
1871  [skillBeingTaught] >=
1872  masteryLevelBeingTaught) {
1873  return localization->FormatString(
1874  633, localization->GetClassName(
1875  classBaseId +
1876  1)); // You have to be promoted to %s to learn this
1877  // skill level. / Вы должны достичь звания %s
1878  // для обучения этому уровню навыка.
1880  [classBaseId + 2][skillBeingTaught] >=
1881  masteryLevelBeingTaught &&
1883  [classBaseId + 3][skillBeingTaught] >=
1884  masteryLevelBeingTaught) {
1885  return localization->FormatString(
1886  634, localization->GetClassName(classBaseId + 2),
1888  classBaseId +
1889  3)); // You have to be promoted to %s or %s to learn this
1890  // skill level. / Вы должны достичь звания %s или
1891  // %s для обучения этому уровню навыка.
1893  [classBaseId + 2][skillBeingTaught] >=
1894  masteryLevelBeingTaught) {
1895  return localization->FormatString(
1896  633, localization->GetClassName(
1897  classBaseId +
1898  2)); // You have to be promoted to %s to learn this
1899  // skill level. / Вы должны достичь звания %s
1900  // для обучения этому уровню навыка.
1902  [classBaseId + 3][skillBeingTaught] >=
1903  masteryLevelBeingTaught) {
1904  return localization->FormatString(
1905  633, localization->GetClassName(
1906  classBaseId +
1907  3)); // You have to be promoted to %s to learn this
1908  // skill level. / Вы должны достичь звания %s
1909  // для обучения этому уровню навыка.
1910  } else {
1911  return localization->FormatString(
1912  632,
1914  pClassType)); // This skill level can not be learned by the
1915  // %s class. / Этот уровень навыка не
1916  // может быть постигнут классом %s.
1917  }
1918  }
1919 
1920  if (!activePlayer->CanAct())
1921  return String(pNPCTopics[122].pText); // Not in your condition!
1922 
1923  pointsInSkill = activePlayer->pActiveSkills[skillBeingTaught];
1924  pointsInSkillWOutMastery = pointsInSkill & 0x3F;
1925  if (!pointsInSkillWOutMastery)
1926  return String(
1927  pNPCTopics[131].pText); // You must know the skill before you can
1928  // become an expert in it!
1929 
1930  skillMastery = SkillToMastery(pointsInSkill);
1931  if (skillMastery > teacherLevel + 1)
1932  return String(
1933  pNPCTopics[teacherLevel + 128]
1934  .pText); // You are already an SKILLLEVEL in this skill.
1935 
1936  dword_F8B1AC_award_bit_number = skillBeingTaught;
1937  if (masteryLevelBeingTaught == 2 && pointsInSkillWOutMastery < 4 ||
1938  masteryLevelBeingTaught == 3 && pointsInSkillWOutMastery < 7 ||
1939  masteryLevelBeingTaught == 4 && pointsInSkillWOutMastery < 10)
1940  return String(
1941  pNPCTopics[127].pText); // You don't meet the requirements, and
1942  // cannot be taught until you do.
1943 
1945  case PLAYER_SKILL_STAFF:
1946  case PLAYER_SKILL_SWORD:
1947  case PLAYER_SKILL_DAGGER:
1948  case PLAYER_SKILL_AXE:
1949  case PLAYER_SKILL_SPEAR:
1950  case PLAYER_SKILL_BOW:
1951  case PLAYER_SKILL_MACE:
1953  switch (masteryLevelBeingTaught) {
1954  case 2:
1955  gold_transaction_amount = 2000;
1956  break;
1957  case 3:
1958  gold_transaction_amount = 5000;
1959  break;
1960  case 4:
1961  gold_transaction_amount = 8000;
1962  break;
1963  }
1964  break;
1965  case PLAYER_SKILL_BLASTER:
1966  switch (masteryLevelBeingTaught) {
1967  case 2:
1969  break;
1970  case 3:
1972  break;
1973  case 4:
1975  break;
1976  }
1977  break;
1978  case PLAYER_SKILL_SHIELD:
1979  case PLAYER_SKILL_LEATHER:
1980  case PLAYER_SKILL_CHAIN:
1981  case PLAYER_SKILL_PLATE:
1982  switch (masteryLevelBeingTaught) {
1983  case 2:
1984  gold_transaction_amount = 1000;
1985  break;
1986  case 3:
1987  gold_transaction_amount = 3000;
1988  break;
1989  case 4:
1990  gold_transaction_amount = 7000;
1991  break;
1992  }
1993  break;
1994  case PLAYER_SKILL_FIRE:
1995  case PLAYER_SKILL_AIR:
1996  case PLAYER_SKILL_WATER:
1997  case PLAYER_SKILL_EARTH:
1998  case PLAYER_SKILL_SPIRIT:
1999  case PLAYER_SKILL_MIND:
2000  case PLAYER_SKILL_BODY:
2001  switch (masteryLevelBeingTaught) {
2002  case 2:
2003  gold_transaction_amount = 1000;
2004  break;
2005  case 3:
2006  gold_transaction_amount = 4000;
2007  break;
2008  case 4:
2009  gold_transaction_amount = 8000;
2010  break;
2011  }
2012  break;
2013  case PLAYER_SKILL_LIGHT:
2014  switch (masteryLevelBeingTaught) {
2015  case 2:
2016  gold_transaction_amount = 2000;
2017  break;
2018  case 3:
2019  if (!(unsigned __int16)_449B57_test_bit(pParty->_quest_bits,
2020  114))
2021  return String(pNPCTopics[127].pText);
2022  gold_transaction_amount = 5000;
2023  break;
2024  case 4:
2025  if (!activePlayer->ProfessionOrGuildFlagsCorrect(0x22u,
2026  1) ||
2027  !activePlayer->ProfessionOrGuildFlagsCorrect(0x1Au, 1))
2028  return String(pNPCTopics[127].pText);
2029  gold_transaction_amount = 8000;
2030  break;
2031  }
2032  break;
2033  case PLAYER_SKILL_DARK:
2034  switch (masteryLevelBeingTaught) {
2035  case 2:
2036  gold_transaction_amount = 2000;
2037  break;
2038  case 3:
2039  if (!(unsigned __int16)_449B57_test_bit(pParty->_quest_bits,
2040  110))
2041  return String(pNPCTopics[127].pText);
2042  gold_transaction_amount = 5000;
2043  break;
2044  case 4:
2045  if (!activePlayer->ProfessionOrGuildFlagsCorrect(0x23u,
2046  1) ||
2047  !activePlayer->ProfessionOrGuildFlagsCorrect(0x1Bu, 1))
2048  return String(pNPCTopics[127].pText);
2049  gold_transaction_amount = 8000;
2050  break;
2051  }
2052  break;
2053  case PLAYER_SKILL_ITEM_ID:
2054  case PLAYER_SKILL_REPAIR:
2059  case PLAYER_SKILL_STEALING:
2060  case PLAYER_SKILL_ALCHEMY:
2061  switch (masteryLevelBeingTaught) {
2062  case 2:
2064  break;
2065  case 3:
2066  gold_transaction_amount = 2500;
2067  break;
2068  case 4:
2069  gold_transaction_amount = 6000;
2070  break;
2071  }
2072  break;
2073  case PLAYER_SKILL_MERCHANT:
2074  switch (masteryLevelBeingTaught) {
2075  case 2:
2076  gold_transaction_amount = 2000;
2077  break;
2078  case 3:
2079  if (activePlayer->GetBaseWillpower() < 50)
2080  return String(pNPCTopics[127].pText);
2081  gold_transaction_amount = 5000;
2082  break;
2083  case 4:
2084  gold_transaction_amount = 8000;
2085  break;
2086  }
2087  break;
2089  switch (masteryLevelBeingTaught) {
2090  case 2:
2092  break;
2093  case 3:
2094  if (activePlayer->GetBaseEndurance() < 50)
2095  return String(pNPCTopics[127].pText);
2096  gold_transaction_amount = 2500;
2097  break;
2098  case 4:
2099  gold_transaction_amount = 6000;
2100  break;
2101  }
2102  break;
2104  Error("Diplomacy not used");
2105  break;
2106  case PLAYER_SKILL_TIEVERY:
2107  Error("Thievery not used");
2108  break;
2109  case PLAYER_SKILL_DODGE:
2110  switch (masteryLevelBeingTaught) {
2111  case 2:
2112  gold_transaction_amount = 2000;
2113  break;
2114  case 3:
2115  gold_transaction_amount = 5000;
2116  break;
2117  case 4:
2118  if ((activePlayer->pActiveSkills[PLAYER_SKILL_UNARMED] &
2119  63) < 0xA)
2120  return String(pNPCTopics[127].pText);
2121  gold_transaction_amount = 8000;
2122  break;
2123  }
2124  break;
2125  case PLAYER_SKILL_UNARMED:
2126  switch (masteryLevelBeingTaught) {
2127  case 2:
2128  gold_transaction_amount = 2000;
2129  break;
2130  case 3:
2131  gold_transaction_amount = 5000;
2132  break;
2133  case 4:
2134  if ((activePlayer->pActiveSkills[PLAYER_SKILL_DODGE] & 63) <
2135  0xA)
2136  return String(pNPCTopics[127].pText);
2137  gold_transaction_amount = 8000;
2138  break;
2139  }
2140  break;
2141 
2142  case PLAYER_SKILL_LEARNING:
2143  switch (masteryLevelBeingTaught) {
2144  case 2:
2145  gold_transaction_amount = 2000;
2146  break;
2147  case 3:
2148  if (activePlayer->GetBaseIntelligence() < 50)
2149  return String(pNPCTopics[127].pText);
2150  gold_transaction_amount = 5000;
2151  break;
2152  case 4:
2153  gold_transaction_amount = 8000;
2154  break;
2155  }
2156  break;
2157  default:
2158  Error("Unknown skill");
2159  }
2160 
2162  return String(pNPCTopics[124].pText); // You don't have enough gold!
2163 
2164  contract_approved = 1;
2165  if (masteryLevelBeingTaught == 2) {
2166  return localization->FormatString(
2167  534, // Получить степень ^Pr[%s] в навыке ^Pr[%s] за ^I[%lu]
2168  // золот^L[ой;ых;ых]
2169  localization->GetString(433), // Expert
2172  } else if (masteryLevelBeingTaught == 3) {
2173  return localization->FormatString(
2174  534,
2175  localization->GetString(432), // Master
2178  } else if (masteryLevelBeingTaught == 4) {
2179  return localization->FormatString(
2180  534,
2181  localization->GetString(225), // Grandmaster
2184  }
2185 
2186  return String("");
2187 }
2188 
2189 String BuildDialogueString(const char *lpsz, unsigned __int8 uPlayerID,
2190  ItemGen *a3, char *a4, int a5, GameTime *a6) {
2191  String str = String(lpsz);
2192  return BuildDialogueString(str, uPlayerID, a3, a4, a5, a6);
2193 }
2194 
2195 //----- (00495461) --------------------------------------------------------
2196 String BuildDialogueString(String &str, unsigned __int8 uPlayerID, ItemGen *a3,
2197  char *a4, int shop_screen, GameTime *a6) {
2198  char v1[256] = "";
2199  Player *pPlayer; // ebx@3
2200  const char *pText; // esi@7
2201  int v17; // eax@10
2202  signed __int64 v18; // qax@18
2203  unsigned __int8 *v20; // ebx@32
2204  int v21; // ecx@34
2205  int v29; // eax@68
2206  __int16 v55[56]; // [sp+10h] [bp-128h]@34
2207  SummonedItem v56; // [sp+80h] [bp-B8h]@107
2208  int v63; // [sp+12Ch] [bp-Ch]@32
2209 
2210  pPlayer = &pParty->pPlayers[uPlayerID];
2211 
2212  NPCData *npc = nullptr;
2213  if (dword_5C35D4)
2214  npc = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount +
2215  -(dword_591080 != 0))]; //- 1
2216  else
2218 
2219  String result;
2220 
2221  // pText = a4;
2222  uint len = str.length();
2223  for (int i = 0, dst = 0; i < len; ++i) {
2224  char c = str[i]; // skip through string till we find insertion point
2225  if (c != '%') {
2226  result += c; // add char to result string
2227  } else {
2228  v17 = 10 * (int)(str[i + 1] - '0') + str[i + 2] -
2229  '0'; // v17 tells what the gap needs filling with
2230  i += 2;
2231 
2232  switch (v17) {
2233  case 1:
2234  result += npc->pName;
2235  break;
2236  case 2:
2237  result += pPlayer->pName;
2238  i += 2;
2239  break;
2240  case 3:
2241  case 4:
2242  result += v1;
2243  break;
2244  case 5:
2245  v18 = pParty->GetPlayingTime().GetHoursOfDay();
2246  pText = localization->GetString(397); // "evening"
2247  if (HEXRAYS_SHIDWORD(v18) <= 0 &&
2248  HEXRAYS_SHIDWORD(v18) >= 0 && (unsigned int)v18 >= 5 &&
2249  HEXRAYS_SHIDWORD(v18) <= 0) {
2250  if (HEXRAYS_SHIDWORD(v18) >= 0 &&
2251  (unsigned int)v18 >= 11) {
2252  if (v18 < 20)
2253  pText = localization->GetString(396); // "day"
2254  } else {
2255  pText = localization->GetString(395); // "morning"
2256  }
2257  }
2258  result += pText;
2259  break;
2260  case 6:
2261  if (pPlayer->uSex)
2262  result += localization->GetString(387); // "lady"
2263  else
2264  result += localization->GetString(385); // "sir"
2265  break;
2266  case 7:
2267  if (pPlayer->uSex)
2268  result += localization->GetString(389); // "Lady"
2269  else
2270  result += localization->GetString(386); // "Sir"
2271  break;
2272  case 8:
2273  v63 = 0;
2274  v20 = (unsigned __int8 *)pPlayer->_achieved_awards_bits;
2275  for (uint _i = 0; _i < 28; ++_i) {
2276  if ((unsigned __int16)_449B57_test_bit(
2277  v20, word_4EE150[i])) {
2278  v21 = v63;
2279  ++v63;
2280  v55[v63] = word_4EE150[i];
2281  }
2282  }
2283  if (v63) {
2284  if (dword_A74CDC == -1) dword_A74CDC = rand() % v63;
2285  pText =
2286  pAwards[v55[dword_A74CDC]]
2287  .pText; // (char *)dword_723E80_award_related[2
2288  // * v55[v24]];
2289  } else {
2290  pText = pNPCTopics[55].pText;
2291  }
2292  result += pText;
2293  break;
2294  case 9:
2295  if (npc->uSex)
2296  result += localization->GetString(384); // "her"
2297  else
2298  result += localization->GetString(383); // "his"
2299  break;
2300  case 10:
2301  if (pPlayer->uSex)
2302  result += localization->GetString(389); // "Lady"
2303  else
2304  result += localization->GetString(388); // "Lord"
2305  break;
2306  case 11:
2308  break;
2309  case 12:
2310  result += GetReputationString(npc->rep);
2311  break;
2312  case 13:
2314  pPlayer->pName[0], pPlayer->uSex);
2315  break;
2316  case 14:
2317  if (npc->uSex)
2318  result += localization->GetString(391); // "sister"
2319  else
2320  result += localization->GetString(390); // "brother"
2321  break;
2322  case 15:
2323  result += localization->GetString(393); // "daughter"
2324  break;
2325  case 16:
2326  if (npc->uSex)
2327  result += localization->GetString(391); // "sister"
2328  else
2329  result += localization->GetString(390); // "brother"
2330  break;
2331  case 17: // hired npc text текст наёмного НПС
2332  {
2333  uint pay_percentage =
2335  100;
2336  if (!pay_percentage) pay_percentage = 1;
2337  sprintf(v1, "%lu", pay_percentage);
2338  result += v1;
2339  break;
2340  }
2341  case 18:
2342  case 19:
2343  case 20:
2344  case 21:
2345  case 22:
2346  case 26:
2347  strncpy(v1, str.c_str() + i + 1, 2);
2348  sprintf(v1, "%lu", atoi(v1));
2349  result += v1;
2350  break;
2351  case 23:
2353  result +=
2354  pMapStats
2356  .pName;
2357  else
2358  result += localization->GetString(394); // "Unknown"
2359  break;
2360 
2361  case 24: // item name
2362  sprintf(v1, format_4E2D80, Color16(255, 255, 155),
2363  a3->GetDisplayName().c_str());
2364  result += v1;
2365  break;
2366 
2367  case 25: // base prices
2368  v29 = pPlayer->GetBaseBuyingPrice(
2369  a3->GetValue(),
2370  p2DEvents[(signed int)a4 - 1].fPriceMultiplier);
2371  switch (shop_screen) {
2372  case 3:
2373  v29 = pPlayer->GetBaseSellingPrice(
2374  a3->GetValue(),
2375  p2DEvents[(signed int)a4 - 1].fPriceMultiplier);
2376  break;
2377  case 4:
2378  v29 = pPlayer->GetBaseIdentifyPrice(
2379  p2DEvents[(signed int)a4 - 1].fPriceMultiplier);
2380  break;
2381  case 5:
2382  v29 = pPlayer->GetBaseRepairPrice(
2383  a3->GetValue(),
2384  p2DEvents[(signed int)a4 - 1].fPriceMultiplier);
2385  break;
2386  case 6:
2387  v29 = pPlayer->GetBaseSellingPrice(
2388  a3->GetValue(),
2389  p2DEvents[(signed int)a4 - 1]
2390  .fPriceMultiplier) /
2391  2;
2392  break;
2393  }
2394  sprintf(v1, "%lu", v29);
2395  result += v1;
2396  break;
2397 
2398  case 27: // actual price
2399  v29 = pPlayer->GetBuyingPrice(
2400  a3->GetValue(),
2401  p2DEvents[(signed int)a4 - 1].fPriceMultiplier);
2402  if (shop_screen == 3) {
2403  // v29 = pPlayer->GetPriceSell(a3->GetValue(),
2404  // p2DEvents[(signed int)a4 - 1].fPriceMultiplier);
2405  v29 = pPlayer->GetPriceSell(
2406  *a3,
2407  p2DEvents[(signed int)a4 - 1].fPriceMultiplier);
2408  // if (a3->IsBroken())
2409  // v29 = 1;
2410  sprintf(v1, "%lu", v29);
2411  result += v1;
2412  break;
2413  }
2414  if (shop_screen != 4) {
2415  if (shop_screen == 5) {
2416  v29 = pPlayer->GetPriceRepair(
2417  a3->GetValue(),
2418  p2DEvents[(signed int)a4 - 1].fPriceMultiplier);
2419  } else {
2420  if (shop_screen == 6) {
2421  // v29 = pPlayer->GetPriceSell(a3->GetValue(),
2422  // p2DEvents[(signed int)a4 -
2423  // 1].fPriceMultiplier) / 2;
2424  v29 = pPlayer->GetPriceSell(
2425  *a3, p2DEvents[(signed int)a4 - 1]
2426  .fPriceMultiplier) /
2427  2;
2428  // if (a3->IsBroken())
2429  // v29 = 1;
2430  if (!v29) // cannot be 0
2431  v29 = 1;
2432  sprintf(v1, "%lu", v29);
2433  result += v1;
2434  break;
2435  }
2436  }
2437  sprintf(v1, "%lu", v29);
2438  result += v1;
2439  break;
2440  }
2441  sprintf(
2442  v1, "%lu",
2443  pPlayer->GetPriceIdentification(
2444  p2DEvents[(signed int)a4 - 1].fPriceMultiplier));
2445  result += v1;
2446  break;
2447 
2448  case 28: // shop type - blacksmith ect..
2449  result += p2DEvents[(signed int)a4 - 1].pProprieterTitle;
2450  break;
2451 
2452  case 29: // identify cost
2453  sprintf(
2454  v1, "%lu",
2455  pPlayer->GetPriceIdentification(
2456  p2DEvents[(signed int)a4 - 1].fPriceMultiplier));
2457  result += v1;
2458  break;
2459  case 30:
2460  if (!a6) {
2461  result += a4;
2462  break;
2463  }
2464  v56.Initialize(*a6);
2466  378,
2469  break;
2470  case 31:
2471  case 32:
2472  case 33:
2473  case 34:
2474  result += pParty->pPlayers[v17 - 31].pName;
2475  break;
2476  default:
2477  if (v17 <= 50 || v17 > 70) {
2478  strncpy(v1, str.c_str() + i + 1, 2);
2479  sprintf(v1, "%lu", atoi(v1));
2480  result += v1;
2481  break;
2482  }
2483  if (v17 - 51 >= 20) {
2484  result += a4;
2485  break;
2486  }
2487 
2488  v56.Initialize(pParty->PartyTimes._s_times[v17 - 51]);
2490  378,
2493  break;
2494  }
2495  }
2496  }
2497 
2498  return result;
2499 }
2500 
2502 
2504  while (lWindowList.size() > 1) {
2505  GUIWindow *pWindow = lWindowList.front();
2506  pWindow->Release();
2507  delete pWindow;
2508  lWindowList.pop_front();
2509  }
2510 }
2511 
2513  // pIcons_LOD->SetupPalettes(render->uTargetRBits, render->uTargetGBits, render->uTargetBBits);
2514  pIcons_LOD->SetupPalettes(5, 6, 5);
2515  // pPaletteManager->SetColorChannelInfo(render->uTargetRBits, render->uTargetGBits, render->uTargetBBits);
2518 
2519  for (uint i = 0; i < window->GetHeight(); ++i) {
2520  pSRZBufferLineOffsets[i] = window->GetWidth() * i;
2521  }
2522 
2523  pFontArrus = GUIFont::LoadFont("arrus.fnt", "FONTPAL", nullptr);
2524  pFontLucida = GUIFont::LoadFont("lucida.fnt", "FONTPAL", nullptr);
2525  pFontCreate = GUIFont::LoadFont("create.fnt", "FONTPAL", nullptr);
2526  pFontSmallnum = GUIFont::LoadFont("smallnum.fnt", "FONTPAL", nullptr);
2527  pFontComic = GUIFont::LoadFont("comic.fnt", "FONTPAL", nullptr);
2528 }
2529 
2530 static void LoadPartyBuffIcons() {
2531  for (uint i = 0; i < 14; ++i) {
2532  party_buff_icons[i] = assets->GetImage_ColorKey(StringPrintf("isn-%02d", i + 1), 0x7FF);
2533  }
2534 
2537 }
2538 
2539 void UI_Create() {
2546 
2547  game_ui_minimap_dirs[0] = assets->GetImage_Alpha("MAPDIR1");
2548  game_ui_minimap_dirs[1] = assets->GetImage_Alpha("MAPDIR2");
2549  game_ui_minimap_dirs[2] = assets->GetImage_Alpha("MAPDIR3");
2550  game_ui_minimap_dirs[3] = assets->GetImage_Alpha("MAPDIR4");
2551  game_ui_minimap_dirs[4] = assets->GetImage_Alpha("MAPDIR5");
2552  game_ui_minimap_dirs[5] = assets->GetImage_Alpha("MAPDIR6");
2553  game_ui_minimap_dirs[6] = assets->GetImage_Alpha("MAPDIR7");
2554  game_ui_minimap_dirs[7] = assets->GetImage_Alpha("MAPDIR8");
2555 
2556  game_ui_bar_blue = assets->GetImage_ColorKey("ib-statB", 0x7FF);
2557  game_ui_bar_green = assets->GetImage_ColorKey("ib-statG", 0x7FF);
2558  game_ui_bar_yellow = assets->GetImage_ColorKey("ib-statY", 0x7FF);
2559  game_ui_bar_red = assets->GetImage_ColorKey("ib-statR", 0x7FF);
2563  game_ui_monster_hp_green = assets->GetImage_ColorKey("mhp_grn", 0x7FF);
2564  game_ui_monster_hp_red = assets->GetImage_ColorKey("mhp_red", 0x7FF);
2565  game_ui_monster_hp_yellow = assets->GetImage_ColorKey("mhp_yel", 0x7FF);
2566  ui_leather_mm7 = assets->GetImage_Solid("LEATHER");
2567  ui_leather_mm6 = assets->GetImage_Solid("ibground");
2568  dialogue_ui_x_x_u = assets->GetImage_ColorKey("x_x_u", 0x7FF);
2569  ui_buttdesc2 = assets->GetImage_Alpha("BUTTESC2");
2570  dialogue_ui_x_ok_u = assets->GetImage_ColorKey("x_ok_u", 0x7FF);
2571  ui_buttyes2 = assets->GetImage_Alpha("BUTTYES2");
2572 
2573  pPrimaryWindow = new GUIWindow(WINDOW_GameUI, 0, 0, window->GetWidth(), window->GetHeight(), 0);
2574  pPrimaryWindow->CreateButton(7, 8, 460, 343, 1, 0, UIMSG_MouseLeftClickInGame, 0, 0, "");
2575 
2576  pPrimaryWindow->CreateButton(61, 424, 31, 80, 2, 94, UIMSG_SelectCharacter, 1, '1', ""); // buttons for portraits
2577  pPrimaryWindow->CreateButton(177, 424, 31, 80, 2, 94, UIMSG_SelectCharacter, 2, '2', "");
2578  pPrimaryWindow->CreateButton(292, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 3, '3', "");
2579  pPrimaryWindow->CreateButton(407, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 4, '4', "");
2580 
2581  pPrimaryWindow->CreateButton(24, 404, 5, 49, 1, 93, UIMSG_0, 1, 0, ""); // buttons for HP
2582  pPrimaryWindow->CreateButton(139, 404, 5, 49, 1, 93, UIMSG_0, 2, 0, "");
2583  pPrimaryWindow->CreateButton(255, 404, 5, 49, 1, 93, UIMSG_0, 3, 0, "");
2584  pPrimaryWindow->CreateButton(370, 404, 5, 49, 1, 93, UIMSG_0, 4, 0, "");
2585 
2586  pPrimaryWindow->CreateButton(97, 404, 5, 49, 1, 93, UIMSG_0, 1, 0, ""); // buttons for SP
2587  pPrimaryWindow->CreateButton(212, 404, 5, 49, 1, 93, UIMSG_0, 2, 0, "");
2588  pPrimaryWindow->CreateButton(328, 404, 5, 49, 1, 93, UIMSG_0, 3, 0, "");
2589  pPrimaryWindow->CreateButton(443, 404, 5, 49, 1, 93, UIMSG_0, 4, 0, "");
2590 
2591  game_ui_tome_quests = assets->GetImage_ColorKey("ib-td1-A", 0x7FF);
2593  491, 353,
2597  localization->GetString(174), { { game_ui_tome_quests } }); // Quests
2598 
2599  game_ui_tome_autonotes = assets->GetImage_ColorKey("ib-td2-A", 0x7FF);
2601  527, 353,
2605  localization->GetString(154), { { game_ui_tome_autonotes } }); // Autonotes
2606 
2607  game_ui_tome_maps = assets->GetImage_ColorKey("ib-td3-A", 0x7FF);
2609  546, 353,
2613  localization->GetString(139), { { game_ui_tome_maps } }); // Maps
2614 
2615  game_ui_tome_calendar = assets->GetImage_ColorKey("ib-td4-A", 0x7FF);
2617  570, 353,
2621  localization->GetString(78), { { game_ui_tome_calendar } }); // Calendar
2622 
2623  game_ui_tome_storyline = assets->GetImage_ColorKey("ib-td5-A", 0x7FF);
2625  600, 361,
2628  1, 0, UIMSG_OpenHistoryBook, 0, 'H',
2629  localization->GetString(602), { { game_ui_tome_storyline } }); // History
2630 
2631  bFlashAutonotesBook = 0;
2632  bFlashQuestBook = 0;
2633  bFlashHistoryBook = 0;
2634 
2637  localization->GetString(252), { { game_ui_btn_zoomin } }); // Zoom In
2638 
2641  localization->GetString(251), { { game_ui_btn_zoomout } }); // Zoom Out
2642 
2643  pPrimaryWindow->CreateButton(481, 0, 153, 67, 1, 92, UIMSG_0, 0, 0, "");
2644  pPrimaryWindow->CreateButton(491, 149, 64, 74, 1, 0, UIMSG_StartHireling1Dialogue, 0, '5', "");
2645  pPrimaryWindow->CreateButton(561, 149, 64, 74, 1, 0, UIMSG_StartHireling2Dialogue, 0, '6', "");
2646  pPrimaryWindow->CreateButton(476, 322, 77, 17, 1, 100, UIMSG_0, 0, 0, "");
2647  pPrimaryWindow->CreateButton(555, 322, 77, 17, 1, 101, UIMSG_0, 0, 0, "");
2648 
2652  1, 0, UIMSG_SpellBookWindow, 0, 67, localization->GetString(38), { { game_ui_btn_cast } });
2656  1, 0, UIMSG_RestWindow, 0, 82, localization->GetString(182), { { game_ui_btn_rest } });
2660  1, 0, UIMSG_QuickReference, 0, 90, localization->GetString(173), { { game_ui_btn_quickref } });
2664  1, 0, UIMSG_GameMenuButton, 0, 0, localization->GetString(93), { { game_ui_btn_settings } });
2665 
2669  1, 0, UIMSG_ScrollNPCPanel, 0, 0, "", { { ui_btn_npc_left } });
2673  1, 0, UIMSG_ScrollNPCPanel, 1, 0, "", { { ui_btn_npc_right } });
2674 
2676 }
UIGame.h
SPEECH_86
@ SPEECH_86
Definition: Player.h:132
uNumDialogueNPCPortraits
int uNumDialogueNPCPortraits
Definition: NPC.cpp:28
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
RGBColor
struct _RGBColor RGBColor
UIPopup.h
game_ui_btn_zoomout
Image * game_ui_btn_zoomout
Definition: UIGame.cpp:89
MENU_SAVELOAD
@ MENU_SAVELOAD
Definition: GUIWindow.h:254
game_ui_btn_settings
Image * game_ui_btn_settings
Definition: UIGame.cpp:91
WindowManager
Definition: GUIWindow.h:674
UI_OnVkKeyDown
bool UI_OnVkKeyDown(unsigned int vkKey)
Definition: Mouse.cpp:336
IconFrameTable.h
ItemGen::uHolderPlayer
char uHolderPlayer
Definition: Items.h:352
pBtn_Rest
GUIButton * pBtn_Rest
Definition: GUIButton.cpp:55
Player
Definition: Player.h:401
GUIWindow::receives_keyboard_input
bool receives_keyboard_input
Definition: GUIWindow.h:487
PartyAlignment
PartyAlignment
Definition: Party.h:133
PLAYER_SKILL_BLASTER
@ PLAYER_SKILL_BLASTER
Definition: Player.h:178
PartyAlignment::PartyAlignment_Good
@ PartyAlignment_Good
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
Engine_::IocContainer
Definition: IocContainer.h:15
ui_character_skillinfo_can_learn_gm
unsigned int ui_character_skillinfo_can_learn_gm
Definition: UICharacter.cpp:54
GetNPCData
NPCData * GetNPCData(signed int npcid)
Definition: NPC.cpp:43
ui_leather_mm7
Image * ui_leather_mm7
Definition: GUIWindow.cpp:106
Party::uNumBountiesCollected
unsigned int uNumBountiesCollected
Definition: Party.h:286
PLAYER_SKILL_MONSTER_ID
@ PLAYER_SKILL_MONSTER_ID
Definition: Player.h:203
GUI_HandleHotkey
GUIButton * GUI_HandleHotkey(uint8_t uHotkey)
Definition: GUIWindow.cpp:215
PLAYER_SKILL_DAGGER
@ PLAYER_SKILL_DAGGER
Definition: Player.h:173
GUIWindow::uFrameW
unsigned int uFrameW
Definition: GUIWindow.h:473
UIMessageType
UIMessageType
Definition: GUIWindow.h:13
game_ui_tome_maps
Image * game_ui_tome_maps
Definition: UIGame.cpp:82
messagebox_border_left
Image * messagebox_border_left
Definition: UIPopup.cpp:47
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
_RGBColor::R
unsigned char R
Definition: GUIWindow.cpp:63
NPCData::uProfession
unsigned int uProfession
Definition: NPC.h:89
IocContainer.h
OnButtonClick::bPlaySound
bool bPlaySound
Definition: GUIWindow.h:520
UIDialogue.h
GUI_ReplaceHotkey
void GUI_ReplaceHotkey(uint8_t uOldHotkey, uint8_t uNewHotkey, char bFirstCall)
Definition: GUIWindow.cpp:192
SimpleHouseDialog
void SimpleHouseDialog()
Definition: UIHouses.cpp:3426
dword_F8B1D8
int dword_F8B1D8
Definition: mm7_data.cpp:777
GUIButton::uHotkey
uint8_t uHotkey
Definition: GUIButton.h:35
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
NPCProfession::uHirePrice
unsigned int uHirePrice
Definition: NPC.h:115
GUIWindow::log
Log * log
Definition: GUIWindow.h:492
game_ui_btn_zoomin
Image * game_ui_btn_zoomin
Definition: UIGame.cpp:88
Party::uCurrentMonth
unsigned int uCurrentMonth
Definition: Party.h:272
SetUserInterface
void SetUserInterface(PartyAlignment align, bool bReplace)
Definition: GUIWindow.cpp:1032
MapStats::pInfos
MapInfo pInfos[77]
Definition: MapInfo.h:79
MENU_NAMEPANELESC
@ MENU_NAMEPANELESC
Definition: GUIWindow.h:258
LOD.h
Image::GetHeight
unsigned int GetHeight()
Definition: Image.cpp:230
Party::GetPlayingTime
GameTime & GetPlayingTime()
Definition: Party.h:230
ui_btn_npc_right
Image * ui_btn_npc_right
Definition: GUIWindow.cpp:97
GameTime::GetDays
int GetDays() const
Definition: Time.h:32
PLAYER_SKILL_STAFF
@ PLAYER_SKILL_STAFF
Definition: Player.h:171
DialogueEnding
void DialogueEnding()
Definition: GUIWindow.cpp:812
BuildingType_Training
@ BuildingType_Training
Definition: Events2D.h:34
GUIFont
Definition: GUIFont.h:8
Mouse::GetCursorPos
Point GetCursorPos()
Definition: Mouse.cpp:108
ptr_507BC8
GUIWindow * ptr_507BC8
Definition: GUIWindow.cpp:53
game_ui_minimap_frame
Image * game_ui_minimap_frame
Definition: UIGame.cpp:68
GUIWindow
Definition: GUIWindow.h:433
AssetsManager::GetImage_Solid
Texture * GetImage_Solid(const String &name)
Definition: AssetsManager.cpp:51
MENU_STATE
MENU_STATE
Definition: GUIWindow.h:250
Mouse
Definition: Mouse.h:279
BuildingType_DarkGuild
@ BuildingType_DarkGuild
Definition: Events2D.h:17
messagebox_border_top
Image * messagebox_border_top
Definition: UIPopup.cpp:45
sub_4B6478
void sub_4B6478()
Definition: UIHouses.cpp:3266
Timer::Resume
void Resume()
Definition: Time.cpp:27
IconFrameTable::InitializeAnimation
void InitializeAnimation(unsigned int uIconID)
Definition: IconFrameTable.cpp:59
TravelByTransport
void TravelByTransport()
Definition: UIHouses.cpp:1673
PaletteManager::SetColorChannelInfo
void SetColorChannelInfo(int uNumRBits, int uNumGBits, int uNumBBits)
Definition: PaletteManager.cpp:167
ui_exit_cancel_button_background
Image * ui_exit_cancel_button_background
Definition: GUIWindow.cpp:89
INPUT_Autonotes
@ INPUT_Autonotes
Definition: Keyboard.h:22
Viewport::uViewportTL_Y
int uViewportTL_Y
Definition: Viewport.h:23
NPCData::uFlags
unsigned int uFlags
Definition: NPC.h:84
UIMSG_ClickNPCTopic
@ UIMSG_ClickNPCTopic
Definition: GUIWindow.h:142
pMonsterStats
struct MonsterStats * pMonsterStats
Definition: Monsters.cpp:8
HouseNPCData
std::array< struct NPCData *, 7 > HouseNPCData
Definition: mm7_data.cpp:617
GuildDialog
void GuildDialog()
Definition: UIGuilds.cpp:27
pSRZBufferLineOffsets
std::array< unsigned int, 480 > pSRZBufferLineOffsets
Definition: mm7_data.cpp:511
LoadPartyBuffIcons
static void LoadPartyBuffIcons()
Definition: GUIWindow.cpp:2530
OnSaveLoad::Update
virtual void Update()
Definition: GUIWindow.cpp:889
UI_OnMouseRightClick
void UI_OnMouseRightClick(int mouse_x, int mouse_y)
Definition: UIPopup.cpp:1459
GUIButton::pParent
GUIWindow * pParent
Definition: GUIButton.h:33
pGUIWindow_CurrentMenu
GUIWindow * pGUIWindow_CurrentMenu
Definition: GUIWindow.cpp:54
_RGBColor::G
unsigned char G
Definition: GUIWindow.cpp:65
message
GLuint GLsizei const GLchar * message
Definition: SDL_opengl_glext.h:2486
_449B57_test_bit
bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2)
Definition: Party.cpp:1185
z
GLdouble GLdouble z
Definition: SDL_opengl_glext.h:407
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
gold_transaction_amount
int gold_transaction_amount
Definition: mm7_data.cpp:775
Engine_::IocContainer::ResolveLogger
static Log * ResolveLogger()
Definition: IocContainer.cpp:51
pIconsFrameTable
struct IconFrameTable * pIconsFrameTable
Definition: mm7_data.cpp:168
PLAYER_SKILL_AXE
@ PLAYER_SKILL_AXE
Definition: Player.h:174
SetCurrentMenuID
void SetCurrentMenuID(MENU_STATE uMenu)
Definition: GUIWindow.cpp:128
height
EGLSurface EGLint EGLint EGLint EGLint height
Definition: SDL_egl.h:1596
GUIButton::field_28
int field_28
Definition: GUIButton.h:31
GUIButton::uZ
unsigned int uZ
Definition: GUIButton.h:25
BuildingType_ArmorShop
@ BuildingType_ArmorShop
Definition: Events2D.h:6
GUIMessageQueue::Flush
void Flush()
Definition: GUIWindow.cpp:159
INPUT_ZoomOut
@ INPUT_ZoomOut
Definition: Keyboard.h:29
MapStats::GetMapInfo
MAP_TYPE GetMapInfo(const String &Str2)
Definition: MapInfo.cpp:225
_2devent::pProprieterTitle
const char * pProprieterTitle
Definition: Events2D.h:46
SkillToMastery
unsigned int SkillToMastery(unsigned int skill_value)
Definition: Player.cpp:7854
PartyAlignment::PartyAlignment_Evil
@ PartyAlignment_Evil
Party::hirelingScrollPosition
unsigned __int8 hirelingScrollPosition
Definition: Party.h:268
BuildingType_MindGuild
@ BuildingType_MindGuild
Definition: Events2D.h:14
pNPCTopics
std::array< NPCTopic, 789 > pNPCTopics
Definition: mm7_data.cpp:740
AudioPlayer::PlaySound
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
Definition: AudioPlayer.cpp:195
UIMSG_ClickZoomInBtn
@ UIMSG_ClickZoomInBtn
Definition: GUIWindow.h:191
game_ui_bottomframe
Image * game_ui_bottomframe
Definition: UIGame.cpp:59
messagebox_border_right
Image * messagebox_border_right
Definition: UIPopup.cpp:48
GUIFont::DrawTextInRect
int DrawTextInRect(GUIWindow *pWindow, unsigned int uX, unsigned int uY, uint16_t uColor, const String &str, int rect_width, int reverse_text)
Definition: GUIFont.cpp:496
Player::CanAct
bool CanAct()
Definition: Player.cpp:549
BuildingType_FireGuild
@ BuildingType_FireGuild
Definition: Events2D.h:9
pBtn_Autonotes
GUIButton * pBtn_Autonotes
Definition: GUIButton.cpp:59
game_ui_leftframe
Image * game_ui_leftframe
Definition: UIGame.cpp:58
MakeDateTimeString
String MakeDateTimeString(GameTime time)
Definition: GUIWindow.cpp:609
PLAYER_SKILL_EARTH
@ PLAYER_SKILL_EARTH
Definition: Player.h:186
game_ui_tome_autonotes
Image * game_ui_tome_autonotes
Definition: UIGame.cpp:83
UIMSG_QuickReference
@ UIMSG_QuickReference
Definition: GUIWindow.h:89
windowManager
WindowManager windowManager
Definition: GUIWindow.cpp:2501
spell_tooltip_colors
std::array< RGBColor, 20 > spell_tooltip_colors
Definition: GUIWindow.cpp:68
NPCData::evt_B
unsigned int evt_B
Definition: NPC.h:94
GetReputationString
String GetReputationString(int reputation)
Definition: UIGame.cpp:2360
UIMSG_SaveGame
@ UIMSG_SaveGame
Definition: GUIWindow.h:68
GUIWindow::GUIWindow
GUIWindow()
Definition: GUIWindow.cpp:765
UIMSG_GameMenuButton
@ UIMSG_GameMenuButton
Definition: GUIWindow.h:90
PLAYER_SKILL_MIND
@ PLAYER_SKILL_MIND
Definition: Player.h:188
Party::_quest_bits
unsigned __int8 _quest_bits[64]
Definition: Party.h:291
localization
Localization * localization
Definition: Localization.cpp:11
Player::GetBaseRepairPrice
int GetBaseRepairPrice(int uRealValue, float price_multiplier)
Definition: Player.cpp:465
SPEECH_NotEnoughGold
@ SPEECH_NotEnoughGold
Definition: Player.h:84
Point::x
unsigned int x
Definition: Point.h:7
game_ui_bar_red
Image * game_ui_bar_red
Definition: UIGame.cpp:113
MENU_MAIN
@ MENU_MAIN
Definition: GUIWindow.h:251
PLAYER_SKILL_LEARNING
@ PLAYER_SKILL_LEARNING
Definition: Player.h:207
Icon::id
int id
Definition: IconFrameTable.h:35
dialogue_ui_x_x_u
Image * dialogue_ui_x_x_u
Definition: GUIWindow.cpp:92
pNPCPortraits_y
std::array< std::array< int, 6 >, 6 > pNPCPortraits_y
Definition: mm7_data.cpp:290
PaletteManager.h
Player::GetPriceRepair
int GetPriceRepair(int uRealValue, float price_multiplier)
Definition: Player.cpp:421
PLAYER_SKILL_BOW
@ PLAYER_SKILL_BOW
Definition: Player.h:176
NPCStats::sub_495366_MispronounceName
char * sub_495366_MispronounceName(uint8_t firstLetter, uint8_t genderId)
Definition: NPC.cpp:714
int64_t
__int64 int64_t
Definition: alext.h:31
UIMSG_SelectCharacter
@ UIMSG_SelectCharacter
Definition: GUIWindow.h:93
messagebox_border_bottom
Image * messagebox_border_bottom
Definition: UIPopup.cpp:46
Party::pPlayers
std::array< Player, 4 > pPlayers
Definition: Party.h:310
pNPCPortraits_x
std::array< std::array< int, 6 >, 6 > pNPCPortraits_x
Definition: mm7_data.cpp:282
bFlashAutonotesBook
char bFlashAutonotesBook
Definition: mm7_data.cpp:548
pBtn_Calendar
GUIButton * pBtn_Calendar
Definition: GUIButton.cpp:57
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
AssetsManager::GetImage_PCXFromIconsLOD
Texture * GetImage_PCXFromIconsLOD(const String &name)
Definition: AssetsManager.cpp:81
GUIWindow::Release
virtual void Release()
Definition: GUIWindow.cpp:292
Player::uSex
PLAYER_SEX uSex
Definition: Player.h:638
GUIFont.h
w
GLubyte GLubyte GLubyte GLubyte w
Definition: SDL_opengl_glext.h:734
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
UIMSG_SpellBookWindow
@ UIMSG_SpellBookWindow
Definition: GUIWindow.h:88
MENU_DebugBLVLevel
@ MENU_DebugBLVLevel
Definition: GUIWindow.h:261
game_ui_monster_hp_green
Image * game_ui_monster_hp_green
Definition: UIGame.cpp:61
NPCData::evt_E
unsigned int evt_E
Definition: NPC.h:97
OnCancel::Update
virtual void Update()
Definition: GUIWindow.cpp:909
OnButtonClick2::Update
virtual void Update()
Definition: GUIWindow.cpp:846
PartyTimeStruct::bountyHunting_next_generation_time
std::array< GameTime, 10 > bountyHunting_next_generation_time
Definition: Party.h:142
ptr_507BD0
GUIWindow * ptr_507BD0
Definition: GUIWindow.cpp:55
PrepareHouse
void PrepareHouse(HOUSE_ID house)
Definition: UIHouses.cpp:978
BuildingType_Bank
@ BuildingType_Bank
Definition: Events2D.h:26
UIMSG_RestWindow
@ UIMSG_RestWindow
Definition: GUIWindow.h:87
AssetsManager.h
NPCData::evt_C
unsigned int evt_C
Definition: NPC.h:95
Player::pActiveSkills
std::array< unsigned __int16, 37 > pActiveSkills
Definition: Player.h:711
pPlayers
NZIArray< struct Player *, 5 > pPlayers
Definition: Player.cpp:46
OnButtonClick3::Update
virtual void Update()
Definition: GUIWindow.cpp:863
pFontCreate
GUIFont * pFontCreate
Definition: GUIFont.cpp:22
GUIWindow::uFrameWidth
unsigned int uFrameWidth
Definition: GUIWindow.h:470
dword_591080
int dword_591080
Definition: UIHouses.cpp:47
pBtn_ZoomOut
GUIButton * pBtn_ZoomOut
Definition: mm7_data.cpp:550
PLAYER_SKILL_ITEM_ID
@ PLAYER_SKILL_ITEM_ID
Definition: Player.h:192
UIMSG_StartHireling2Dialogue
@ UIMSG_StartHireling2Dialogue
Definition: GUIWindow.h:117
BuildingType_Boats
@ BuildingType_Boats
Definition: Events2D.h:32
Localization::GetSkillName
const char * GetSkillName(unsigned int index) const
Definition: Localization.h:51
GUIButton
Definition: GUIButton.h:11
PLAYER_SKILL_FIRE
@ PLAYER_SKILL_FIRE
Definition: Player.h:183
game_ui_bar_blue
Image * game_ui_bar_blue
Definition: UIGame.cpp:116
UIMSG_OpenQuestBook
@ UIMSG_OpenQuestBook
Definition: GUIWindow.h:168
GUIWindow::uFrameZ
unsigned int uFrameZ
Definition: GUIWindow.h:472
Chest.h
ui_character_skillinfo_can_learn
unsigned int ui_character_skillinfo_can_learn
Definition: UICharacter.cpp:53
Engine.h
current_screen_type
enum CURRENT_SCREEN current_screen_type
Definition: GUIWindow.cpp:83
ui_character_skillinfo_cant_learn
unsigned int ui_character_skillinfo_cant_learn
Definition: UICharacter.cpp:55
pBtn_Quests
GUIButton * pBtn_Quests
Definition: GUIButton.cpp:60
PLAYER_SKILL_UNARMED
@ PLAYER_SKILL_UNARMED
Definition: Player.h:202
Party::PartyTimes
PartyTimeStruct PartyTimes
Definition: Party.h:249
GUIMessage
Definition: GUIWindow.h:643
dword_5C35D4
int dword_5C35D4
Definition: mm7_data.cpp:645
p2DEvents
_2devent p2DEvents[525]
Definition: Events.cpp:57
ui_ar_up_up
Image * ui_ar_up_up
Definition: GUIWindow.cpp:103
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9435
_2devent::pName
char * pName
Definition: Events2D.h:43
dword_A74CDC
int dword_A74CDC
Definition: mm7_data.cpp:762
pMapStats
struct MapStats * pMapStats
Definition: mm7_data.cpp:20
GUIWindow::pStartingPosActiveItem
int pStartingPosActiveItem
Definition: GUIWindow.h:485
Party::pPartyBuffs
std::array< SpellBuff, 20 > pPartyBuffs
Definition: Party.h:309
CharacterUI_InventoryTab_Draw
void CharacterUI_InventoryTab_Draw(Player *player, bool a2)
Definition: UICharacter.cpp:1829
TavernDialog
void TavernDialog()
Definition: UIHouses.cpp:2200
CreateScrollWindow
void CreateScrollWindow()
Definition: GUIWindow.cpp:977
GUIWindow::vButtons
std::vector< GUIButton * > vButtons
Definition: GUIWindow.h:489
WINDOW_null
@ WINDOW_null
Definition: GUIWindow.h:291
messagebox_corner_w
Image * messagebox_corner_w
Definition: UIPopup.cpp:44
uHouse_ExitPic
int uHouse_ExitPic
Definition: UIHouses.cpp:45
game_ui_player_alert_green
Image * game_ui_player_alert_green
Definition: UIGame.cpp:111
OnCancel3::Update
virtual void Update()
Definition: GUIWindow.cpp:940
GameTime::GetMinutesFraction
int GetMinutesFraction() const
Definition: Time.h:38
GUIWindow::_41D08F_set_keyboard_control_group
void _41D08F_set_keyboard_control_group(int num_buttons, int a3, int a4, int a5)
Definition: GUIWindow.cpp:273
INPUT_ZoomIn
@ INPUT_ZoomIn
Definition: Keyboard.h:28
PLAYER_SKILL_LIGHT
@ PLAYER_SKILL_LIGHT
Definition: Player.h:190
Events.h
GameUI_DrawFoodAndGold
void GameUI_DrawFoodAndGold()
Definition: UIGame.cpp:1179
ContractSelectText
const char * ContractSelectText(int pEventCode)
Definition: NPC.cpp:1052
GUIMessageQueue::AddMessageImpl
void AddMessageImpl(UIMessageType msg, int param, unsigned int a4, const char *file=nullptr, int line=0)
Definition: GUIWindow.cpp:1348
uGameUIFontShadow
unsigned int uGameUIFontShadow
Definition: mm7_data.cpp:552
GUIMessageQueue::GUIMessageQueue
GUIMessageQueue()
Definition: GUIWindow.h:655
WindowManager::DeleteAllVisibleWindows
void DeleteAllVisibleWindows()
Definition: GUIWindow.cpp:2503
game_ui_btn_quickref
Image * game_ui_btn_quickref
Definition: UIGame.cpp:90
Actor.h
GetCurrentMenuID
MENU_STATE GetCurrentMenuID()
Definition: GUIWindow.cpp:133
party_buff_icons
std::array< class Image *, 14 > party_buff_icons
Definition: mm7_data.cpp:596
UIHouses.h
CURRENT_SCREEN
CURRENT_SCREEN
Definition: GUIWindow.h:604
pItemsTable
struct ItemsTable * pItemsTable
Definition: Items.cpp:37
CURRENT_SCREEN::SCREEN_E
@ SCREEN_E
Party::PartyFindsGold
void PartyFindsGold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal)
Definition: Party.cpp:976
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
PLAYER_SKILL_BODYBUILDING
@ PLAYER_SKILL_BODYBUILDING
Definition: Player.h:195
in_current_building_type
BuildingType in_current_building_type
Definition: UIHouses.cpp:49
Localization.h
MENU_NEWGAME
@ MENU_NEWGAME
Definition: GUIWindow.h:252
GameTime::GetSecondsFraction
int GetSecondsFraction() const
Definition: Time.h:37
PLAYER_SKILL_PERCEPTION
@ PLAYER_SKILL_PERCEPTION
Definition: Player.h:197
NPCData::evt_A
unsigned int evt_A
Definition: NPC.h:93
BuildingType_WeaponShop
@ BuildingType_WeaponShop
Definition: Events2D.h:5
SummonedItem::Initialize
void Initialize(GameTime duration)
Definition: Items.h:573
UIBooks.h
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
NPCData::evt_D
unsigned int evt_D
Definition: NPC.h:96
UIMSG_0
@ UIMSG_0
Definition: GUIWindow.h:14
BuildingType_LightGuild
@ BuildingType_LightGuild
Definition: Events2D.h:16
IconFrameTable::GetIcon
Icon * GetIcon(unsigned int idx)
Definition: IconFrameTable.cpp:17
Image::GetWidth
unsigned int GetWidth()
Definition: Image.cpp:217
MENU_EXIT_GAME
@ MENU_EXIT_GAME
Definition: GUIWindow.h:255
pGUIWindow2
GUIWindow * pGUIWindow2
Definition: GUIWindow.cpp:60
game_ui_bar_green
Image * game_ui_bar_green
Definition: UIGame.cpp:115
parchment
Texture * parchment
Definition: UIPopup.cpp:40
INPUT_Quest
@ INPUT_Quest
Definition: Keyboard.h:18
GUIFont::DrawTextLine
void DrawTextLine(const String &text, uint16_t uDefaultColor, int uX, int uY, int max_len_pix)
Definition: GUIFont.cpp:88
GUIWindow::field_34
int field_34
Definition: GUIWindow.h:484
CURRENT_SCREEN::SCREEN_BRANCHLESS_NPC_DIALOG
@ SCREEN_BRANCHLESS_NPC_DIALOG
UIMSG_OpenHistoryBook
@ UIMSG_OpenHistoryBook
Definition: GUIWindow.h:186
GUIMessageQueue
Definition: GUIWindow.h:654
contract_approved
int contract_approved
Definition: mm7_data.cpp:772
game_ui_minimap_dirs
std::array< Image *, 8 > game_ui_minimap_dirs
Definition: UIGame.cpp:70
window_SpeakInHouse
GUIWindow * window_SpeakInHouse
Definition: GUIWindow.cpp:51
PLAYER_SKILL_DIPLOMACY
@ PLAYER_SKILL_DIPLOMACY
Definition: Player.h:198
BuildingType_18
@ BuildingType_18
Definition: Events2D.h:22
GUIButton.h
game_ui_playerbuff_pain_reflection
Image * game_ui_playerbuff_pain_reflection
Definition: UIGame.cpp:118
pBtn_ExitCancel
GUIButton * pBtn_ExitCancel
Definition: GUIButton.cpp:28
activeLevelDecoration
LevelDecoration * activeLevelDecoration
Definition: Decoration.cpp:10
_RGBColor
Definition: GUIWindow.cpp:62
HOUSE_ID
HOUSE_ID
Definition: UIHouses.h:50
pParty
Party * pParty
Definition: Party.cpp:30
Image
Definition: Image.h:19
HOUSE_DIALOGUE_MAIN
@ HOUSE_DIALOGUE_MAIN
Definition: UIHouses.h:8
len
GLenum GLsizei len
Definition: SDL_opengl_glext.h:2929
GUIWindow::DrawTextInRect
int DrawTextInRect(GUIFont *font, unsigned int x, unsigned int y, unsigned int color, const char *text, int rect_width, int reverse_text)
Definition: GUIWindow.cpp:702
CreateMsgScrollWindow
void CreateMsgScrollWindow(signed int mscroll_id)
Definition: GUIWindow.cpp:1014
PLAYER_SKILL_TIEVERY
@ PLAYER_SKILL_TIEVERY
Definition: Player.h:199
pMessageQueue_50C9E8
struct GUIMessageQueue * pMessageQueue_50C9E8
Definition: GUIWindow.cpp:87
pFontArrus
GUIFont * pFontArrus
Definition: GUIFont.cpp:18
GUIWindow::pCurrentPosActiveItem
int pCurrentPosActiveItem
Definition: GUIWindow.h:482
game_ui_player_selection_frame
Image * game_ui_player_selection_frame
Definition: UIGame.cpp:108
GUIWindow::DeleteButtons
void DeleteButtons()
Definition: GUIWindow.cpp:305
OnCastTargetedSpell::OnCastTargetedSpell
OnCastTargetedSpell(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const String &hint=String())
Definition: GUIWindow.cpp:147
IRender.h
PLAYER_SKILL_SPIRIT
@ PLAYER_SKILL_SPIRIT
Definition: Player.h:187
SummonedItem::field_18_expire_year
int field_18_expire_year
Definition: Items.h:589
bFlashHistoryBook
char bFlashHistoryBook
Definition: mm7_data.cpp:547
NPCData::pName
char * pName
Definition: NPC.h:82
UIMSG_OpenCalendar
@ UIMSG_OpenCalendar
Definition: GUIWindow.h:171
current_npc_text
String current_npc_text
Definition: mm7_data.cpp:780
game_ui_playerbuff_hammerhands
Image * game_ui_playerbuff_hammerhands
Definition: UIGame.cpp:119
prev_screen_type
enum CURRENT_SCREEN prev_screen_type
Definition: GUIWindow.cpp:84
ItemGen::GetDisplayName
String GetDisplayName()
Definition: Items.cpp:610
UIMSG_MouseLeftClickInGame
@ UIMSG_MouseLeftClickInGame
Definition: GUIWindow.h:18
GUIWindow::pNumPresenceButton
int pNumPresenceButton
Definition: GUIWindow.h:481
BackToHouseMenu
void BackToHouseMenu()
Definition: UIHouses.cpp:3991
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
PLAYER_SKILL_DODGE
@ PLAYER_SKILL_DODGE
Definition: Player.h:201
NPCStats::pProfessions
NPCProfession pProfessions[59]
Definition: NPC.h:167
GetSkillColor
unsigned int GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level)
Definition: GUIWindow.cpp:1366
TrainingDialog
void TrainingDialog(const char *s)
Definition: UIHouses.cpp:2933
DrawPopupWindow
void DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight)
Definition: UIPopup.cpp:89
color
GLuint color
Definition: SDL_opengl_glext.h:1151
GUIFont::AlignText_Center
unsigned int AlignText_Center(unsigned int width, const String &str)
Definition: GUIFont.cpp:306
Player::GetBaseIdentifyPrice
int GetBaseIdentifyPrice(float price_multiplier)
Definition: Player.cpp:455
GUIButton::field_2C_is_pushed
bool field_2C_is_pushed
Definition: GUIButton.h:32
param
GLfloat param
Definition: SDL_opengl_glext.h:373
MENU_MMT_MAIN_MENU
@ MENU_MMT_MAIN_MENU
Definition: GUIWindow.h:263
Log::Info
void Info(const wchar_t *pFormat,...)
Definition: Log.cpp:11
Party::pHireling2Name
char pHireling2Name[100]
Definition: Party.h:319
viewparams
struct ViewingParams * viewparams
Definition: mm7_data.cpp:22
WINDOW_CastSpell
@ WINDOW_CastSpell
Definition: GUIWindow.h:311
label
GLuint GLsizei const GLchar * label
Definition: SDL_opengl_glext.h:2488
uIconIdx_WaterWalk
unsigned int uIconIdx_WaterWalk
Definition: mm7_data.cpp:598
OS_GetTime
unsigned int OS_GetTime()
Definition: Lin.cpp:12
PLAYER_SKILL_TYPE
PLAYER_SKILL_TYPE
Definition: Player.h:170
GUIButton::vTextures
std::vector< Image * > vTextures
Definition: GUIButton.h:34
LODFile_IconsBitmaps::SetupPalettes
void SetupPalettes(unsigned int uTargetRBits, unsigned int uTargetGBits, unsigned int uTargetBBits)
Definition: LOD.cpp:872
INPUT_TimeCal
@ INPUT_TimeCal
Definition: Keyboard.h:21
GUIWindow::DrawMessageBox
void DrawMessageBox(bool inside_game_viewport)
Definition: GUIWindow.cpp:319
PLAYER_SKILL_MEDITATION
@ PLAYER_SKILL_MEDITATION
Definition: Player.h:196
mouse
static Mouse * mouse
Definition: Chest.cpp:36
AlchemistDialog
void AlchemistDialog()
Definition: UIShops.cpp:785
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
WINDOW_Dialogue
@ WINDOW_Dialogue
Definition: GUIWindow.h:298
GUIWindow::uFrameHeight
unsigned int uFrameHeight
Definition: GUIWindow.h:471
Player::_achieved_awards_bits
unsigned char _achieved_awards_bits[64]
Definition: Player.h:715
BuildingType_Temple
@ BuildingType_Temple
Definition: Events2D.h:27
sub_4637E0_is_there_popup_onscreen
char sub_4637E0_is_there_popup_onscreen()
Definition: GUIWindow.cpp:1361
PLAYER_SKILL_AIR
@ PLAYER_SKILL_AIR
Definition: Player.h:184
PLAYER_CLASS_LICH
@ PLAYER_CLASS_LICH
Definition: Player.h:251
v1
GLfloat GLfloat v1
Definition: SDL_opengl_glext.h:694
UI_Create
void UI_Create()
Definition: GUIWindow.cpp:2539
GUIFont::LoadFont
static GUIFont * LoadFont(const char *pFontFile, const char *pFontPalette,...)
Definition: GUIFont.cpp:56
GUIWindow_Scroll
Definition: GUIWindow.h:495
PauseGameDrawing
bool PauseGameDrawing()
Definition: GUIWindow.cpp:137
game_ui_right_panel_frame
Image * game_ui_right_panel_frame
Definition: GUIWindow.cpp:90
dword_F8B1B0_MasteryBeingTaught
int dword_F8B1B0_MasteryBeingTaught
Definition: mm7_data.cpp:774
width
EGLSurface EGLint EGLint EGLint width
Definition: SDL_egl.h:1596
Engine_::IocContainer::ResolveMouse
static Mouse * ResolveMouse()
Definition: IocContainer.cpp:88
UIAnimation::icon
class Icon * icon
Definition: IconFrameTable.h:71
Party::TakeGold
static void TakeGold(int amount)
Definition: Party.cpp:292
uGameUIFontMain
unsigned int uGameUIFontMain
Definition: mm7_data.cpp:553
Log::Warning
void Warning(const wchar_t *pFormat,...)
Definition: Log.cpp:28
CURRENT_SCREEN::SCREEN_SAVEGAME
@ SCREEN_SAVEGAME
pIcons_LOD
LODFile_IconsBitmaps * pIcons_LOD
Definition: LOD.cpp:12
SummonedItem::field_C_expire_day
int field_C_expire_day
Definition: Items.h:586
GUIButton::msg
UIMessageType msg
Definition: GUIButton.h:29
dialogue_show_profession_details
char dialogue_show_profession_details
Definition: mm7_data.cpp:781
game_ui_evtnpc
Image * game_ui_evtnpc
Definition: UIGame.cpp:102
WeaponShopDialog
void WeaponShopDialog()
Definition: UIShops.cpp:437
AudioPlayer::StopChannels
void StopChannels(int uStartChannel, int uEndChannel)
Definition: AudioPlayer.cpp:331
GUIWindow::field_30
int field_30
Definition: GUIWindow.h:483
GUIFont::CalcTextHeight
unsigned int CalcTextHeight(const String &str, unsigned int width, int x_offset, bool return_on_carriage=false)
Definition: GUIFont.cpp:246
PLAYER_SKILL_LEATHER
@ PLAYER_SKILL_LEATHER
Definition: Player.h:180
DrawJoinGuildWindow
void DrawJoinGuildWindow(int pEventCode)
Definition: GUIWindow.cpp:794
sCurrentMenuID
MENU_STATE sCurrentMenuID
Definition: GUIWindow.cpp:81
BuildingType_MagicShop
@ BuildingType_MagicShop
Definition: Events2D.h:7
Party.h
SummonedItem::field_14_exprie_month
int field_14_exprie_month
Definition: Items.h:588
PLAYER_SKILL_MACE
@ PLAYER_SKILL_MACE
Definition: Player.h:177
BuildingType_EarthGuild
@ BuildingType_EarthGuild
Definition: Events2D.h:12
uCurrentHouse_Animation
int uCurrentHouse_Animation
Definition: mm7_data.cpp:607
PLAYER_SKILL_TRAP_DISARM
@ PLAYER_SKILL_TRAP_DISARM
Definition: Player.h:200
Viewport::uViewportBR_X
int uViewportBR_X
Definition: Viewport.h:24
TempleDialog
void TempleDialog()
Definition: UIHouses.cpp:2599
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
Player::pName
char pName[16]
Definition: Player.h:637
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
PLAYER_SKILL_WATER
@ PLAYER_SKILL_WATER
Definition: Player.h:185
GameTime::GetHoursOfDay
int GetHoursOfDay() const
Definition: Time.h:39
pBtn_NPCLeft
GUIButton * pBtn_NPCLeft
Definition: GUIButton.cpp:51
GUI_UpdateWindows
void GUI_UpdateWindows()
Definition: GUIWindow.cpp:956
MonsterStats::pInfos
MonsterInfo pInfos[265]
Definition: Monsters.h:194
NPCData::rep
int rep
Definition: NPC.h:87
GUIWindow::Contains
bool Contains(unsigned int x, unsigned int y)
Definition: GUIWindow.cpp:750
MapInfo::pName
String pName
Definition: MapInfo.h:38
uIconIdx_FlySpell
unsigned int uIconIdx_FlySpell
Definition: mm7_data.cpp:597
HOUSE_DIALOGUE_OTHER
@ HOUSE_DIALOGUE_OTHER
Definition: UIHouses.h:46
game_ui_tome_quests
Image * game_ui_tome_quests
Definition: UIGame.cpp:84
Timer::Pause
void Pause()
Definition: Time.cpp:19
BuildingType_AirGuild
@ BuildingType_AirGuild
Definition: Events2D.h:10
NPCData
Definition: NPC.h:79
GUIButton::uWidth
unsigned int uWidth
Definition: GUIButton.h:23
pScrolls
std::array< const char *, 82 > pScrolls
Definition: mm7_data.cpp:743
GUIButton::field_1C
int field_1C
Definition: GUIButton.h:28
bFlashQuestBook
char bFlashQuestBook
Definition: mm7_data.cpp:549
ui_current_text_color
int ui_current_text_color
Definition: mm7_data.cpp:649
ui_btn_npc_left
Image * ui_btn_npc_left
Definition: GUIWindow.cpp:98
GUIMessageQueue::PopMessage
void PopMessage(UIMessageType *pMsg, int *pParam, int *a4)
Definition: GUIWindow.cpp:174
PLAYER_SKILL_SPEAR
@ PLAYER_SKILL_SPEAR
Definition: Player.h:175
UIMSG_BuyInShop_Identify_Repair
@ UIMSG_BuyInShop_Identify_Repair
Definition: GUIWindow.h:66
pDialogueNPCCount
int pDialogueNPCCount
Definition: NPC.cpp:26
dst
GLenum GLenum dst
Definition: SDL_opengl_glext.h:1740
pGUIWindow_ScrollWindow
GUIWindow * pGUIWindow_ScrollWindow
Definition: GUIWindow.cpp:52
SummonedItem
Definition: Items.h:571
LevelDecoration
Definition: Decoration.h:20
pCurrentMapName
String pCurrentMapName
Definition: mm7_data.cpp:712
Autonotes.h
KeyboardActionMapping::GetActionVKey
unsigned int GetActionVKey(enum InputAction eAction)
Definition: Keyboard.cpp:145
pPaletteManager
PaletteManager * pPaletteManager
Definition: PaletteManager.cpp:7
GUIFont::DrawText
void DrawText(GUIWindow *pWindow, int uX, int uY, uint16_t uFontColor, const String &str, bool present_time_transparency, int max_text_height, int uFontShadowColor)
Definition: GUIFont.cpp:388
game_ui_topframe
Image * game_ui_topframe
Definition: UIGame.cpp:57
IconFrameTable::FindIcon
unsigned int FindIcon(const char *pIconName)
Definition: IconFrameTable.cpp:31
MENU_5
@ MENU_5
Definition: GUIWindow.h:256
UIArena.h
ui_ar_dn_dn
Image * ui_ar_dn_dn
Definition: GUIWindow.cpp:100
dword_F8B1AC_award_bit_number
int dword_F8B1AC_award_bit_number
Definition: mm7_data.cpp:773
GUIWindow::HouseDialogManager
void HouseDialogManager()
Definition: GUIWindow.cpp:397
GUIWindow::uFrameY
unsigned int uFrameY
Definition: GUIWindow.h:469
game_ui_monster_hp_background
Image * game_ui_monster_hp_background
Definition: UIGame.cpp:64
stream
EGLStreamKHR stream
Definition: SDL_egl.h:1082
Viewport::uViewportBR_Y
int uViewportBR_Y
Definition: Viewport.h:25
PLAYER_SKILL_SHIELD
@ PLAYER_SKILL_SHIELD
Definition: Player.h:179
pMiscTimer
Timer * pMiscTimer
Definition: Time.cpp:7
GUIButton::uX
unsigned int uX
Definition: GUIButton.h:21
pBtn_GameSettings
GUIButton * pBtn_GameSettings
Definition: GUIButton.cpp:52
PLAYER_SKILL_ALCHEMY
@ PLAYER_SKILL_ALCHEMY
Definition: Player.h:206
pFontComic
GUIFont * pFontComic
Definition: GUIFont.cpp:24
_4F0882_evt_VAR_PlayerItemInHands_vals
std::array< int16_t, 54 > _4F0882_evt_VAR_PlayerItemInHands_vals
Definition: mm7_data.cpp:484
CURRENT_SCREEN::SCREEN_INPUT_BLV
@ SCREEN_INPUT_BLV
Party::GetPartyReputation
int GetPartyReputation()
Definition: Party.cpp:922
bountyHunting_monster_id_for_hunting
int16_t bountyHunting_monster_id_for_hunting
Definition: mm7_data.cpp:770
GUIButton::uW
unsigned int uW
Definition: GUIButton.h:26
VAR_Award
@ VAR_Award
Definition: Events.h:140
GUIWindow::DrawFlashingInputCursor
void DrawFlashingInputCursor(int uX, int uY, GUIFont *a2)
Definition: GUIWindow.cpp:759
BuildingType_SpiritGuild
@ BuildingType_SpiritGuild
Definition: Events2D.h:13
UIMSG_LoadGame
@ UIMSG_LoadGame
Definition: GUIWindow.h:67
word_4EE150
std::array< short, 28 > word_4EE150
Definition: mm7_data.cpp:474
WindowType
WindowType
Definition: GUIWindow.h:290
GUIWindow_Scroll::Update
virtual void Update()
Definition: GUIWindow.cpp:829
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
messagebox_corner_y
Image * messagebox_corner_y
Definition: UIPopup.cpp:42
pViewport
struct Viewport * pViewport
Definition: mm7_data.cpp:21
Party::CountHirelings
void CountHirelings()
Definition: Party.cpp:57
ClickNPCTopic
void ClickNPCTopic(int uMessageParam)
Definition: GUIWindow.cpp:1412
game_ui_player_alert_yellow
Image * game_ui_player_alert_yellow
Definition: UIGame.cpp:109
pDialogueNPCPortraits
std::array< class Image *, 6 > pDialogueNPCPortraits
Definition: NPC.cpp:27
INPUT_Mapbook
@ INPUT_Mapbook
Definition: Keyboard.h:23
MENU_LoadingProcInMainMenu
@ MENU_LoadingProcInMainMenu
Definition: GUIWindow.h:260
UICharacter.h
CURRENT_SCREEN::SCREEN_CHANGE_LOCATION
@ SCREEN_CHANGE_LOCATION
CURRENT_SCREEN::SCREEN_GAME
@ SCREEN_GAME
PaletteManager::RecalculateAll
void RecalculateAll()
Definition: PaletteManager.cpp:784
PLAYER_SKILL_STEALING
@ PLAYER_SKILL_STEALING
Definition: Player.h:205
Party::pHireling1Name
char pHireling1Name[100]
Definition: Party.h:318
game_ui_minimap_compass
Image * game_ui_minimap_compass
Definition: UIGame.cpp:69
dword_507BF0_is_there_popup_onscreen
int dword_507BF0_is_there_popup_onscreen
Definition: mm7_data.cpp:556
MENU_CREDITSPROC
@ MENU_CREDITSPROC
Definition: GUIWindow.h:259
MagicShopDialog
void MagicShopDialog()
Definition: UIShops.cpp:827
uint8_t
unsigned __int8 uint8_t
Definition: SDL_config.h:35
PLAYER_SKILL_CHAIN
@ PLAYER_SKILL_CHAIN
Definition: Player.h:181
BuildingType_Jail
@ BuildingType_Jail
Definition: Events2D.h:35
ToString
const char * ToString(WindowType windowType)
Definition: GUIWindow.h:357
NPCProfession::pJoinText
char * pJoinText
Definition: NPC.h:118
game_ui_tome_calendar
Image * game_ui_tome_calendar
Definition: UIGame.cpp:81
pBooksButtonOverlay
GUIWindow * pBooksButtonOverlay
Definition: GUIWindow.cpp:59
Player::GetBaseBuyingPrice
int GetBaseBuyingPrice(int uRealValue, float price_multiplier)
Definition: Player.cpp:445
BuildingType_Stables
@ BuildingType_Stables
Definition: Events2D.h:31
DIALOGUE_SKILL_TRAINER
@ DIALOGUE_SKILL_TRAINER
Definition: GUIWindow.h:278
uDialogueType
unsigned int uDialogueType
Definition: mm7_data.cpp:604
Player::classType
PLAYER_CLASS_TYPE classType
Definition: Player.h:639
Point::y
unsigned int y
Definition: Point.h:8
CURRENT_SCREEN::SCREEN_NPC_DIALOGUE
@ SCREEN_NPC_DIALOGUE
BankDialog
void BankDialog()
Definition: UIHouses.cpp:2074
OnButtonClick2::bPlaySound
bool bPlaySound
Definition: GUIWindow.h:533
Player::GetBaseIntelligence
int GetBaseIntelligence()
Definition: Player.cpp:1037
pBtn_Maps
GUIButton * pBtn_Maps
Definition: GUIButton.cpp:58
JailDialog
void JailDialog()
Definition: UIHouses.cpp:3698
GUIButton::msg_param
unsigned int msg_param
Definition: GUIButton.h:30
Player::GetBaseWillpower
int GetBaseWillpower()
Definition: Player.cpp:1043
game_ui_monster_hp_border_right
Image * game_ui_monster_hp_border_right
Definition: UIGame.cpp:66
WINDOW_GameUI
@ WINDOW_GameUI
Definition: GUIWindow.h:346
pGUIWindow_EscMessageWindow
GUIWindow * pGUIWindow_EscMessageWindow
Definition: GUIWindow.cpp:58
free_book_subwindow
void free_book_subwindow()
Definition: GUIWindow.cpp:1025
Localization::GetMonthName
const char * GetMonthName(unsigned int index) const
Definition: Localization.h:19
game_ui_rightframe
Image * game_ui_rightframe
Definition: UIGame.cpp:56
UIStatusBar.h
pKeyActionMap
struct KeyboardActionMapping * pKeyActionMap
Definition: Keyboard.cpp:35
UIMSG_OpenAutonotes
@ UIMSG_OpenAutonotes
Definition: GUIWindow.h:169
Awards.h
PLAYER_SKILL_SWORD
@ PLAYER_SKILL_SWORD
Definition: Player.h:172
c
const GLubyte * c
Definition: SDL_opengl_glext.h:11096
game_ui_statusbar
Image * game_ui_statusbar
Definition: UIGame.cpp:55
BuildingType_AlchemistShop
@ BuildingType_AlchemistShop
Definition: Events2D.h:8
CheckBountyRespawnAndAward
void CheckBountyRespawnAndAward()
Definition: GUIWindow.cpp:1763
game_ui_btn_rest
Image * game_ui_btn_rest
Definition: UIGame.cpp:86
messagebox_corner_x
Image * messagebox_corner_x
Definition: UIPopup.cpp:41
GUIWindow::mouse
Mouse * mouse
Definition: GUIWindow.h:491
messagebox_corner_z
Image * messagebox_corner_z
Definition: UIPopup.cpp:43
MENU_CREDITS
@ MENU_CREDITS
Definition: GUIWindow.h:253
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
pBtn_QuickReference
GUIButton * pBtn_QuickReference
Definition: GUIButton.cpp:53
MainMenuUI_LoadFontsAndSomeStuff
void MainMenuUI_LoadFontsAndSomeStuff()
Definition: GUIWindow.cpp:2512
uint
unsigned int uint
Definition: MM7.h:4
GUIButton::DrawLabel
void DrawLabel(const String &label_text, GUIFont *pFont, int a5, int uFontShadowColor)
Definition: GUIButton.cpp:104
UIMSG_ScrollNPCPanel
@ UIMSG_ScrollNPCPanel
Definition: GUIWindow.h:155
ui_buttyes2
Image * ui_buttyes2
Definition: GUIWindow.cpp:95
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
GUIWindow_BooksButtonOverlay::Update
virtual void Update()
Definition: GUIWindow.cpp:822
GUIButton::uY
unsigned int uY
Definition: GUIButton.h:22
NPCData::evt_F
unsigned int evt_F
Definition: NPC.h:98
__debugbreak
void __cdecl __debugbreak(void)
GUIFont::FitTextInAWindow
String FitTextInAWindow(const String &inString, unsigned int width, int uX, bool return_on_carriage=false)
Definition: GUIFont.cpp:311
GUIButton::uHeight
unsigned int uHeight
Definition: GUIButton.h:24
pNPCStats
struct NPCStats * pNPCStats
Definition: NPC.cpp:29
_2devent::fPriceMultiplier
float fPriceMultiplier
Definition: Events2D.h:53
GUIWindow::par1C
unsigned int par1C
Definition: GUIWindow.h:477
lWindowList
std::list< GUIWindow * > lWindowList
Definition: GUIWindow.cpp:79
ui_leather_mm6
Image * ui_leather_mm6
Definition: GUIWindow.cpp:105
PLAYER_SKILL_REPAIR
@ PLAYER_SKILL_REPAIR
Definition: Player.h:194
GameUI_StatusBar_OnEvent
void GameUI_StatusBar_OnEvent(const String &str, unsigned int num_seconds)
Definition: UIStatusBar.cpp:33
MENU_CREDITSCLOSE
@ MENU_CREDITSCLOSE
Definition: GUIWindow.h:262
_4B3FE5_training_dialogue
void _4B3FE5_training_dialogue(int a4)
Definition: GUIWindow.cpp:1673
GUIWindow::eWindowType
WindowType eWindowType
Definition: GUIWindow.h:474
game_ui_player_alert_red
Image * game_ui_player_alert_red
Definition: UIGame.cpp:110
Decoration.h
GUIWindow::ptr_1C
void * ptr_1C
Definition: GUIWindow.h:476
m
const GLfloat * m
Definition: SDL_opengl_glext.h:6095
ViewingParams::bRedrawGameUI
int bRedrawGameUI
Definition: Viewport.h:74
Player::GetPriceIdentification
int GetPriceIdentification(float price_multiplier)
Definition: Player.cpp:407
AssetsManager::GetImage_Alpha
Texture * GetImage_Alpha(const String &name)
Definition: AssetsManager.cpp:66
OurMath.h
NPCProfession::pBenefits
char * pBenefits
Definition: NPC.h:116
GUIWindow::DrawShops_next_generation_time_string
void DrawShops_next_generation_time_string(GameTime time)
Definition: GUIWindow.cpp:648
EventProcessor
void EventProcessor(int uEventID, int targetObj, int canShowMessages, int entry_line)
Definition: Events.cpp:260
_2devent::pProprieterName
const char * pProprieterName
Definition: Events2D.h:44
game_ui_dialogue_background
Image * game_ui_dialogue_background
Definition: UIGame.cpp:93
Mouse::SetCursorImage
void SetCursorImage(const String &name)
Definition: Mouse.cpp:38
Player::GetBaseSellingPrice
int GetBaseSellingPrice(int uRealValue, float price_multiplier)
Definition: Player.cpp:435
GUIMessageQueue::qMessages
std::queue< GUIMessage > qMessages
Definition: GUIWindow.h:664
game_ui_tome_storyline
Image * game_ui_tome_storyline
Definition: UIGame.cpp:80
GUIWindow::GetControl
GUIButton * GetControl(unsigned int uID)
Definition: GUIWindow.cpp:311
ui_ar_up_dn
Image * ui_ar_up_dn
Definition: GUIWindow.cpp:102
PLAYER_SKILL_DARK
@ PLAYER_SKILL_DARK
Definition: Player.h:191
MENU_STATE_to_string
const wchar_t * MENU_STATE_to_string(MENU_STATE m)
Definition: GUIWindow.cpp:108
pPrimaryWindow
GUIWindow * pPrimaryWindow
Definition: GUIWindow.cpp:48
PLAYER_SKILL_BODY
@ PLAYER_SKILL_BODY
Definition: Player.h:189
PLAYER_SKILL_MERCHANT
@ PLAYER_SKILL_MERCHANT
Definition: Player.h:193
pUIAnim_WizardEye
UIAnimation * pUIAnim_WizardEye
Definition: Party.cpp:49
GUIWindow::uFrameX
unsigned int uFrameX
Definition: GUIWindow.h:468
GUIWindow::_41D73D_draw_buff_tooltip
void _41D73D_draw_buff_tooltip()
Definition: GUIWindow.cpp:235
GUIWindow::sHint
String sHint
Definition: GUIWindow.h:488
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
Localization::GetClassName
const char * GetClassName(unsigned int index) const
Definition: Localization.h:35
v0
GLfloat v0
Definition: SDL_opengl_glext.h:693
pModalWindow
GUIWindow * pModalWindow
Definition: GUIWindow.cpp:57
pBtn_NPCRight
GUIButton * pBtn_NPCRight
Definition: GUIButton.cpp:50
SOUND_StartMainChoice02
@ SOUND_StartMainChoice02
Definition: AudioPlayer.h:37
_4B254D_SkillMasteryTeacher
String _4B254D_SkillMasteryTeacher(int trainerInfo)
Definition: GUIWindow.cpp:1846
GUIMessageQueue::Clear
void Clear()
Definition: GUIWindow.cpp:169
textures
GLsizei const GLuint * textures
Definition: SDL_opengl_glext.h:2565
GUIWindow.h
Point
Definition: Point.h:3
OnCancel2::Update
virtual void Update()
Definition: GUIWindow.cpp:925
ItemGen
Definition: Items.h:263
ItemGen::GetValue
unsigned int GetValue()
Definition: Items.cpp:588
ITEM_LICH_JAR_FULL
@ ITEM_LICH_JAR_FULL
Definition: Items.h:206
OnButtonClick4::Update
virtual void Update()
Definition: GUIWindow.cpp:877
BuildingType_BodyGuild
@ BuildingType_BodyGuild
Definition: Events2D.h:15
pBtn_ZoomIn
GUIButton * pBtn_ZoomIn
Definition: mm7_data.cpp:551
pMessageQueue_50CBD0
struct GUIMessageQueue * pMessageQueue_50CBD0
Definition: GUIWindow.cpp:86
logger
Log * logger
Definition: IocContainer.cpp:47
ui_buttdesc2
Image * ui_buttdesc2
Definition: GUIWindow.cpp:94
PlayerSpeech
PlayerSpeech
Definition: Player.h:46
Player::GetBuyingPrice
int GetBuyingPrice(unsigned int uRealValue, float price_multiplier)
Definition: Player.cpp:396
PLAYER_SKILL_ARMSMASTER
@ PLAYER_SKILL_ARMSMASTER
Definition: Player.h:204
pAwards
std::array< Award, 105 > pAwards
Definition: mm7_data.cpp:26
pDialogueWindow
GUIWindow * pDialogueWindow
Definition: GUIWindow.cpp:50
PartyTimeStruct::_s_times
std::array< GameTime, 20 > _s_times
Definition: Party.h:147
ArmorShopDialog
void ArmorShopDialog()
Definition: UIShops.cpp:602
Color16
uint16_t Color16(uint32_t r, uint32_t g, uint32_t b)
Definition: Engine.cpp:148
pFontLucida
GUIFont * pFontLucida
Definition: GUIFont.cpp:19
pBtn_CastSpell
GUIButton * pBtn_CastSpell
Definition: GUIButton.cpp:54
_RGBColor::B
unsigned char B
Definition: GUIWindow.cpp:64
game_ui_monster_hp_red
Image * game_ui_monster_hp_red
Definition: UIGame.cpp:63
Player::SetVariable
void SetVariable(enum VariableType var, signed int a3)
Definition: Player.cpp:5061
Party::uCurrentYear
unsigned int uCurrentYear
Definition: Party.h:271
VAR_PlayerItemInHands
@ VAR_PlayerItemInHands
Definition: Events.h:144
pBtn_History
GUIButton * pBtn_History
Definition: GUIButton.cpp:56
NPCHireableDialogPrepare
void NPCHireableDialogPrepare()
Definition: NPC.cpp:1080
format_4E2D80
const char * format_4E2D80
Definition: mm7_data.cpp:240
ui_ar_dn_up
Image * ui_ar_dn_up
Definition: GUIWindow.cpp:101
pGUIWindow_CastTargetedSpell
GUIWindow * pGUIWindow_CastTargetedSpell
Definition: GUIWindow.cpp:56
StringPrintf
String StringPrintf(const char *fmt,...)
Definition: Strings.cpp:9
game_ui_monster_hp_border_left
Image * game_ui_monster_hp_border_left
Definition: UIGame.cpp:65
Viewport::uViewportTL_X
int uViewportTL_X
Definition: Viewport.h:22
Player::ProfessionOrGuildFlagsCorrect
bool ProfessionOrGuildFlagsCorrect(unsigned int uClass, int a3)
Definition: Player.cpp:7964
NPCData::uSex
unsigned int uSex
Definition: NPC.h:99
BuildingType_Tavern
@ BuildingType_Tavern
Definition: Events2D.h:25
UIMSG_OpenMapBook
@ UIMSG_OpenMapBook
Definition: GUIWindow.h:170
TownHallDialog
void TownHallDialog()
Definition: UIHouses.cpp:1915
GUIButton::sLabel
String sLabel
Definition: GUIButton.h:36
SPEECH_85
@ SPEECH_85
Definition: Player.h:131
StorylineTextTable.h
String
std::string String
Definition: Strings.h:10
byte_4ED970_skill_learn_ability_by_class_table
std::array< std::array< char, 37 >, 36 > byte_4ED970_skill_learn_ability_by_class_table
Definition: mm7_data.cpp:425
set_default_ui_skin
void set_default_ui_skin()
Definition: UICharacter.cpp:102
Keyboard.h
pChestWindow
GUIWindow * pChestWindow
Definition: GUIWindow.cpp:49
bountyHunting_text
const char * bountyHunting_text
Definition: mm7_data.cpp:771
UIMSG_StartHireling1Dialogue
@ UIMSG_StartHireling1Dialogue
Definition: GUIWindow.h:116
pEventTimer
Timer * pEventTimer
Definition: Time.cpp:8
Player::GetBaseEndurance
int GetBaseEndurance()
Definition: Player.cpp:1048
game_ui_playerbuff_preservation
Image * game_ui_playerbuff_preservation
Definition: UIGame.cpp:120
GameTime
Definition: Time.h:14
_591428_endcap
Image * _591428_endcap
Definition: UIHouses.cpp:52
Party::monster_for_hunting_killed
std::array< __int16, 5 > monster_for_hunting_killed
Definition: Party.h:289
Player::GetPriceSell
int GetPriceSell(ItemGen itemx, float price_multiplier)
Definition: Player.cpp:380
Party::GetGold
int GetGold() const
Definition: Party.cpp:264
UIMSG_ClickZoomOutBtn
@ UIMSG_ClickZoomOutBtn
Definition: GUIWindow.h:190
pFontSmallnum
GUIFont * pFontSmallnum
Definition: GUIFont.cpp:25
Party::monster_id_for_hunting
std::array< __int16, 5 > monster_id_for_hunting
Definition: Party.h:288
BuildingType_TownHall
@ BuildingType_TownHall
Definition: Events2D.h:21
ItemsTable::pItems
NZIArray< ItemDesc, 800 > pItems
Definition: Items.h:460
OracleDialogue
void OracleDialogue()
Definition: GUIWindow.cpp:1693
Mouse.h
sDialogue_SpeakingActorNPC_ID
int sDialogue_SpeakingActorNPC_ID
Definition: mm7_data.cpp:605
CURRENT_SCREEN::SCREEN_VIDEO
@ SCREEN_VIDEO
dialogue_ui_x_ok_u
Image * dialogue_ui_x_ok_u
Definition: GUIWindow.cpp:91
GUIButton::uButtonType
int uButtonType
Definition: GUIButton.h:27
GUIWindow::InitializeGUI
static void InitializeGUI()
Definition: GUIWindow.cpp:754
OnButtonClick::Update
virtual void Update()
Definition: GUIWindow.cpp:833
BuildingType_WaterGuild
@ BuildingType_WaterGuild
Definition: Events2D.h:11
Time.h
MENU_CREATEPARTY
@ MENU_CREATEPARTY
Definition: GUIWindow.h:257
ui_character_inventory_background
Image * ui_character_inventory_background
Definition: UICharacter.cpp:457
PLAYER_SKILL_PLATE
@ PLAYER_SKILL_PLATE
Definition: Player.h:182
game_ui_bar_yellow
Image * game_ui_bar_yellow
Definition: UIGame.cpp:114
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52