World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
UIDialogue.cpp
См. документацию.
1 #include "GUI/UI/UIDialogue.h"
2 
3 #include "Engine/Events.h"
7 #include "Engine/Localization.h"
8 #include "Engine/Objects/Actor.h"
9 #include "Engine/Objects/NPC.h"
10 #include "Engine/Party.h"
11 
12 #include "GUI/GUIFont.h"
13 #include "GUI/GUIButton.h"
14 #include "GUI/UI/UIGame.h"
15 #include "GUI/UI/UIHouses.h"
16 #include "GUI/UI/UIStatusBar.h"
17 #include "GUI/UI/UIArena.h"
18 
20 
21 #include "Platform/OSWindow.h"
22 
23 #include "IO/Keyboard.h"
24 
25 void GameUI_InitializeDialogue(Actor *actor, int bPlayerSaysHello) {
26  dword_A74CDC = -1;
28  pEventTimer->Pause();
29  pMiscTimer->Pause();
30  pAudioPlayer->StopChannels(-1, -1);
31  uDialogueType = 0;
34  NPCData *pNPCInfo = GetNPCData(actor->sNPC_ID);
35  if ((pNPCInfo->uFlags & 3) != 2) {
36  pNPCInfo->uFlags = pNPCInfo->uFlags + 1;
37  }
38 
39  String filename;
40  switch (pParty->alignment) {
42  filename = "evt02-b";
43  break;
45  filename = "evt02";
46  break;
48  filename = "evt02-c";
49  break;
50  default:
51  Error("Invalid alignment: %u", pParty->alignment);
52  }
54 
57 
58  filename = StringPrintf("npc%03u", pNPCInfo->uPortraitID);
59  pDialogueNPCPortraits[0] = assets->GetImage_ColorKey(filename, 0x7FF);
60 
61  int pNumberContacts = 0;
62  int v9 = 0;
63  if (!pNPCInfo->Hired() && pNPCInfo->Location2D >= 0) {
64  if ((signed int)pParty->GetPartyFame() <= pNPCInfo->fame ||
65  (pNumberContacts = pNPCInfo->uFlags & 0xFFFFFF7F,
66  (pNumberContacts & 0x80000000u) != 0)) {
67  v9 = 1;
68  } else {
69  if (pNumberContacts > 1) {
70  if (pNumberContacts == 2) {
71  v9 = 3;
72  } else {
73  if (pNumberContacts != 3) {
74  if (pNumberContacts != 4) v9 = 1;
75  } else {
76  v9 = 2;
77  }
78  }
79  } else if (pNPCInfo->rep) {
80  v9 = 2;
81  }
82  }
83  }
84  if (sDialogue_SpeakingActorNPC_ID < 0) v9 = 4;
85 
87  0, 0, window->GetWidth(), window->GetHeight(),
88  3); // pNumberContacts = 1, v9 = 0; pNumberContacts = 2, v9 = 3;
89  if (pNPCInfo->Hired() && !pNPCInfo->bHasUsedTheAbility) {
90  if (pNPCInfo->uProfession == 10 || // Healer
91  pNPCInfo->uProfession == 11 || // Expert Healer
92  pNPCInfo->uProfession == 12 || // Master Healer
93  pNPCInfo->uProfession == 33 || // Cook
94  pNPCInfo->uProfession == 34 || // Chef
95  pNPCInfo->uProfession == 39 || // Wind Master
96  pNPCInfo->uProfession == 40 || // Water Master
97  pNPCInfo->uProfession == 41 || // Gate Master
98  pNPCInfo->uProfession == 42 || // Chaplain
99  pNPCInfo->uProfession == 43 || // Piper
100  pNPCInfo->uProfession == 52 // Fallen Wizard
101  ) {
103  480, 250, 140, pFontArrus->GetHeight() - 3, 1, 0,
106  }
107  }
108 
109  pDialogueWindow->CreateButton(61, 424, 31, 40, 2, 94, UIMSG_SelectCharacter,
110  1, '1', "");
111  pDialogueWindow->CreateButton(177, 424, 31, 40, 2, 94,
112  UIMSG_SelectCharacter, 2, '2', "");
113  pDialogueWindow->CreateButton(292, 424, 31, 40, 2, 94,
114  UIMSG_SelectCharacter, 3, '3', "");
115  pDialogueWindow->CreateButton(407, 424, 31, 40, 2, 94,
116  UIMSG_SelectCharacter, 4, '4', "");
117 
118  if (bPlayerSaysHello && uActiveCharacter && !pNPCInfo->Hired()) {
119  if (pParty->uCurrentHour < 5 || pParty->uCurrentHour > 21)
121  else
122  pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodDay, 0);
123  }
124 }
125 
126 GUIWindow_Dialogue::GUIWindow_Dialogue(unsigned int x, unsigned int y,
127  unsigned int width, unsigned int height,
128  int button, const String &hint)
129  : GUIWindow(WINDOW_Dialogue, x, y, width, height, button, hint) {
133  CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0,
134  localization->GetString(79), // "Exit"
135  {{ui_exit_cancel_button_background}});
136  if (par1C != 1) {
137  int num_menu_buttons = 0;
138  int v11 = pFontArrus->GetHeight() - 3;
141  1) { // QuestsNPC_greet
142  if (speakingNPC->joins) {
143  CreateButton(480, 130, 140, v11, 1, 0,
144  UIMSG_SelectNPCDialogueOption, 0xDu, 0, "");
145  num_menu_buttons = 1;
146  }
147  if (speakingNPC->evt_A) {
148  if (num_menu_buttons < 4) {
149  int v14 = NPC_EventProcessor(speakingNPC->evt_A);
150  if (v14 == 1 || v14 == 2)
151  CreateButton(
152  0x1E0u, num_menu_buttons++ * v11 + 130, 0x8Cu, v11,
153  1, 0, UIMSG_SelectNPCDialogueOption, 0x13u, 0, "");
154  }
155  }
156  if (speakingNPC->evt_B) {
157  if (num_menu_buttons < 4) {
158  int v16 = NPC_EventProcessor(speakingNPC->evt_B);
159  if (v16 == 1 || v16 == 2)
160  CreateButton(
161  0x1E0u, num_menu_buttons++ * v11 + 130, 0x8Cu, v11,
162  1, 0, UIMSG_SelectNPCDialogueOption, 0x14u, 0, "");
163  }
164  }
165  if (speakingNPC->evt_C) {
166  if (num_menu_buttons < 4) {
167  int v18 = NPC_EventProcessor(speakingNPC->evt_C);
168  if (v18 == 1 || v18 == 2)
169  CreateButton(
170  0x1E0u, num_menu_buttons++ * v11 + 130, 0x8Cu, v11,
171  1, 0, UIMSG_SelectNPCDialogueOption, 0x15u, 0, "");
172  }
173  }
174  if (speakingNPC->evt_D) {
175  if (num_menu_buttons < 4) {
176  int v20 = NPC_EventProcessor(speakingNPC->evt_D);
177  if (v20 == 1 || v20 == 2)
178  CreateButton(
179  0x1E0u, num_menu_buttons++ * v11 + 130, 0x8Cu, v11,
180  1, 0, UIMSG_SelectNPCDialogueOption, 0x16u, 0, "");
181  }
182  }
183  if (speakingNPC->evt_E) {
184  if (num_menu_buttons < 4) {
185  int v22 = NPC_EventProcessor(speakingNPC->evt_E);
186  if (v22 == 1 || v22 == 2)
187  CreateButton(
188  0x1E0u, num_menu_buttons++ * v11 + 130, 0x8Cu, v11,
189  1, 0, UIMSG_SelectNPCDialogueOption, 0x17u, 0, "");
190  }
191  }
192  if (speakingNPC->evt_F) {
193  if (num_menu_buttons < 4) {
194  int v24 = NPC_EventProcessor(speakingNPC->evt_F);
195  if (v24 == 1 || v24 == 2)
196  CreateButton(
197  0x1E0u, num_menu_buttons++ * v11 + 130, 0x8Cu, v11,
198  1, 0, UIMSG_SelectNPCDialogueOption, 0x18u, 0, "");
199  }
200  }
201  } else {
202  if (speakingNPC->joins) {
203  CreateButton(0x1E0u, 0x82u, 0x8Cu, v11, 1, 0,
205  localization->GetString(407)); // Подробнее
206  if (speakingNPC->Hired()) {
207  CreateButton(
208  0x1E0u, v11 + 130, 0x8Cu, v11, 1, 0,
211  408,
212  speakingNPC->pName)); // Release %s Отпустить %s
213  } else {
214  CreateButton(0x1E0u, v11 + 130, 0x8Cu, v11, 1, 0,
216  localization->GetString(406)); // Hire Нанять
217  }
218  num_menu_buttons = 2;
219  }
220  }
221  _41D08F_set_keyboard_control_group(num_menu_buttons, 1, 0, 1);
222  }
223 }
224 
227 
230  game_ui_dialogue_background = nullptr;
231  }
232 
234 
236 }
237 
239  if (!pDialogueWindow) {
240  return;
241  }
242 
243  // Window title(Заголовок окна)----
247  window.uFrameWidth -= 10;
248  window.uFrameZ -= 10;
249  render->DrawTextureNew(477 / 640.0f, 0, game_ui_dialogue_background);
250  render->DrawTextureAlphaNew(468 / 640.0f, 0, game_ui_right_panel_frame);
251  render->DrawTextureAlphaNew((pNPCPortraits_x[0][0] - 4) / 640.0f,
252  (pNPCPortraits_y[0][0] - 4) / 480.0f,
254  render->DrawTextureAlphaNew(pNPCPortraits_x[0][0] / 640.0f,
255  pNPCPortraits_y[0][0] / 480.0f,
257 
258  String title;
259  if (pNPC->uProfession) {
260  assert(pNPC->uProfession <
261  59); // sometimes buffer overflows; errors emerge both here and
262  // in dialogue text
263  title =
264  localization->FormatString(429, pNPC->pName,
266  pNPC->uProfession)); // ^Pi[%s] %s
267  } else if (pNPC->pName) {
268  title = pNPC->pName;
269  }
270 
271  window.DrawTitleText(pFontArrus, 483, 112, ui_game_dialogue_npc_name_color,
272  title, 3);
273 
274  pParty->GetPartyFame();
275 
276  String dialogue_string;
277  switch (uDialogueType) {
278  case DIALOGUE_13:
279  dialogue_string = BuildDialogueString(
281  uActiveCharacter - 1, 0, 0, 0);
282  break;
283 
285  // auto prof = pNPCStats->pProfessions[pNPC->uProfession];
286 
288  dialogue_string = BuildDialogueString(
290  uActiveCharacter - 1, 0, 0, 0);
291  else if (pNPC->Hired())
292  dialogue_string = BuildDialogueString(
294  uActiveCharacter - 1, 0, 0, 0);
295  else
296  dialogue_string = BuildDialogueString(
298  uActiveCharacter - 1, 0, 0, 0);
299  break;
300  }
301 
303  dialogue_string = localization->GetString(
304  574); // "Welcome to the Arena of Life and Death. Remember,
305  // you are only allowed one arena combat per visit. To
306  // fight an arena battle, select the option that best
307  // describes your abilities and return to me- if you
308  // survive:"
309  break;
310 
312  dialogue_string =
313  localization->GetString(577); // "Get back in there you wimps:"
314  break;
315 
317  dialogue_string = localization->FormatString(
318  576, gold_transaction_amount); // "Congratulations on your win:
319  // here's your stuff: %u gold."
320  break;
321 
323  dialogue_string = localization->GetString(
324  582); // "You already won this trip to the Arena:"
325  break;
326 
327  default:
329  branchless_dialogue_str.empty()) {
330  dialogue_string = current_npc_text;
331  } else if (pGreetType == 1) { // QuestNPC_greet
332  if (pNPC->greet) {
333  if ((pNPC->uFlags & 3) == 2)
334  dialogue_string =
336  else
337  dialogue_string =
339  }
340  } else if (pGreetType == 2) { // HiredNPC_greet
341  NPCProfession *prof =
343 
344  if (pNPC->Hired())
345  dialogue_string = BuildDialogueString(
346  prof->pDismissText, uActiveCharacter - 1, 0, 0, 0);
347  else
348  dialogue_string = BuildDialogueString(
349  prof->pJoinText, uActiveCharacter - 1, 0, 0, 0);
350  }
351  break;
352  }
353 
354  int pTextHeight = 0;
355 
356  // Message window(Окно сообщения)----
357  if (!dialogue_string.empty()) {
358  window.uFrameWidth = game_viewport_width;
359  window.uFrameZ = 452;
360  GUIFont *font = pFontArrus;
361  pTextHeight = pFontArrus->CalcTextHeight(dialogue_string,
362  window.uFrameWidth, 13) +
363  7;
364  if (352 - pTextHeight < 8) {
365  font = pFontCreate;
366  pTextHeight = pFontCreate->CalcTextHeight(dialogue_string,
367  window.uFrameWidth, 13) +
368  7;
369  }
370 
371  if (ui_leather_mm7)
372  render->DrawTextureCustomHeight(8 / 640.0f,
373  (352 - pTextHeight) / 480.0f,
374  ui_leather_mm7, pTextHeight);
375 
376  render->DrawTextureAlphaNew(8 / 640.0f, (347 - pTextHeight) / 480.0f,
379  font, 13, 354 - pTextHeight, 0,
380  font->FitTextInAWindow(dialogue_string, window.uFrameWidth, 13), 0,
381  0, 0);
382  }
383 
384  // Right panel(Правая панель)-------
386  window.uFrameX = 483;
387  window.uFrameWidth = 148;
388  window.uFrameZ = 334;
389  for (int i = window.pStartingPosActiveItem;
390  i < window.pStartingPosActiveItem + window.pNumPresenceButton; ++i) {
391  GUIButton *pButton = window.GetControl(i);
392  if (!pButton) break;
393 
394  if (pButton->msg_param > 88) {
395  pButton->sLabel.clear();
396  } else if (pButton->msg_param == 88) {
397  pButton->sLabel = localization->GetString(581); // Lord
398  } else if (pButton->msg_param == 87) {
399  pButton->sLabel = localization->GetString(580); // Knight
400  } else if (pButton->msg_param == 86) {
401  pButton->sLabel = localization->GetString(579); // Squire
402  } else if (pButton->msg_param == 85) {
403  pButton->sLabel = localization->GetString(578); // Page
404  } else if (pButton->msg_param == 77) {
405  pButton->sLabel = localization->GetString(407); // Details
406  } else if (pButton->msg_param == 76) {
407  if (pNPC->Hired()) {
408  pButton->sLabel = StringPrintf(localization->GetString(408),
409  pNPC->pName); // Release %s
410  } else {
411  pButton->sLabel = localization->GetString(406); // Hire
412  }
413  } else if (pButton->msg_param == 24) {
414  __debugbreak(); // learn conditions of this event
415  if (!pNPC->evt_F) {
416  pButton->sLabel.clear();
417  pButton->msg_param = 0;
418  } else {
419  pButton->sLabel = pNPCTopics[pNPC->evt_F].pTopic;
420  }
421  } else if (pButton->msg_param == 9) {
422  pButton->sLabel = GetProfessionActionText(pNPC->uProfession);
423  } else if (pButton->msg_param == 19) { // Scavenger Hunt
424  if (!pNPC->evt_A) {
425  pButton->sLabel.clear();
426  pButton->msg_param = 0;
427  } else {
428  pButton->sLabel = pNPCTopics[pNPC->evt_A].pTopic;
429  }
430  } else if (pButton->msg_param == 20) { // Scavenger Hunt
431  if (!pNPC->evt_B) {
432  pButton->sLabel.clear();
433  pButton->msg_param = 0;
434  } else {
435  pButton->sLabel = pNPCTopics[pNPC->evt_B].pTopic;
436  }
437  } else if (pButton->msg_param == 21) {
438  // __debugbreak(); // learn conditions of this event
439  if (!pNPC->evt_C) {
440  pButton->sLabel.clear();
441  pButton->msg_param = 0;
442  } else {
443  pButton->sLabel = pNPCTopics[pNPC->evt_C].pTopic;
444  }
445  } else if (pButton->msg_param == 22) {
446  // __debugbreak(); // learn conditions of this event
447  if (!pNPC->evt_D) {
448  pButton->sLabel.clear();
449  pButton->msg_param = 0;
450  } else {
451  pButton->sLabel = pNPCTopics[pNPC->evt_D].pTopic;
452  }
453  } else if (pButton->msg_param == 23) {
454  // __debugbreak(); // learn conditions of this event
455  if (!pNPC->evt_E) {
456  pButton->sLabel.clear();
457  pButton->msg_param = 0;
458  } else {
459  pButton->sLabel = pNPCTopics[pNPC->evt_E].pTopic;
460  }
461  } else if (pButton->msg_param == 13) {
462  if (pNPC->Hired()) {
463  pButton->sLabel = StringPrintf(localization->GetString(408),
464  pNPC->pName); // Release %s
465  } else {
466  pButton->sLabel = localization->GetString(122); // Join
467  }
468  } else {
469  pButton->sLabel.clear();
470  }
471 
474  int num_dead_actors = 0;
475  for (uint i = 0; i < uNumActors; ++i) {
476  if (pActors[i].uAIState == Dead ||
477  pActors[i].uAIState == Removed ||
478  pActors[i].uAIState == Disabled) {
479  ++num_dead_actors;
480  } else {
481  int sumonner_type = PID_TYPE(pActors[i].uSummonerID);
482  if (sumonner_type == OBJECT_Player) ++num_dead_actors;
483  }
484  }
485  if (num_dead_actors == uNumActors) {
486  pButton->sLabel =
487  localization->GetString(658); // Collect Prize
488  }
489  }
490  }
491 
492  // Install Buttons(Установка кнопок)--------
493  int index = 0;
494  int all_text_height = 0;
496  i < pDialogueWindow->pStartingPosActiveItem +
498  ++i) {
499  GUIButton *pButton = pDialogueWindow->GetControl(i);
500  if (!pButton) break;
501  all_text_height +=
502  pFontArrus->CalcTextHeight(pButton->sLabel, window.uFrameWidth, 0);
503  index++;
504  }
505 
506  if (index) {
507  int v45 = (174 - all_text_height) / index;
508  if (v45 > 32) v45 = 32;
509  int v42 = (174 - v45 * index - all_text_height) / 2 - v45 / 2 + 138;
511  i < pDialogueWindow->pNumPresenceButton +
513  ++i) {
514  GUIButton *pButton = pDialogueWindow->GetControl(i);
515  if (!pButton) break;
516  pButton->uY = (unsigned int)(v45 + v42);
517  pTextHeight = pFontArrus->CalcTextHeight(pButton->sLabel,
518  window.uFrameWidth, 0);
519  pButton->uHeight = pTextHeight;
520  v42 = pButton->uY + pTextHeight - 1;
521  pButton->uW = v42;
525  window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor,
526  pButton->sLabel, 3);
527  }
528  }
529  render->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f,
531 }
532 
533 // GenericDialogue
534 
536  unsigned int x, unsigned int y, unsigned int width, unsigned int height,
537  int button, const String &hint
538 )
539  : GUIWindow(WINDOW_GreetingNPC, x, y, width, height, button, hint) {
541  pKeyActionMap->EnterText(0, 15, this);
543 }
544 
547  pKeyActionMap->SetWindowInputStatus(WINDOW_INPUT_CANCELLED);
548 
550 }
551 
553  int pTextHeight; // esi@4
554  GUIWindow BranchlessDlg_window; // [sp+D4h] [bp-58h]@4
555  GUIFont *pFont; // [sp+128h] [bp-4h]@1
556 
557  pFont = pFontArrus;
558  if (current_npc_text.length() > 0 && branchless_dialogue_str.empty())
560 
561  BranchlessDlg_window.uFrameWidth = game_viewport_width;
562  BranchlessDlg_window.uFrameZ = 452;
563  pTextHeight =
565  BranchlessDlg_window.uFrameWidth, 12) +
566  7;
567  if (352 - pTextHeight < 8) {
568  pFont = pFontCreate;
569  pTextHeight =
571  BranchlessDlg_window.uFrameWidth, 12) +
572  7;
573  }
574 
575  render->DrawTextureCustomHeight(8 / 640.0f, (352 - pTextHeight) / 480.0f,
576  ui_leather_mm7, pTextHeight);
577  render->DrawTextureAlphaNew(8 / 640.0f, (347 - pTextHeight) / 480.0f,
580  pFont, 12, 354 - pTextHeight, 0,
582  BranchlessDlg_window.uFrameWidth, 12),
583  0, 0, 0);
584  render->DrawTextureNew(0, 352 / 480.0f, game_ui_statusbar);
585  if (pGUIWindow2->receives_keyboard_input_2 != WINDOW_INPUT_IN_PROGRESS) {
586  if (pGUIWindow2->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) {
587  pGUIWindow2->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
589  sub_4452BB();
590  return;
591  }
592  if (pGUIWindow2->receives_keyboard_input_2 != WINDOW_INPUT_CANCELLED)
593  return;
594  pGUIWindow2->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
596  sub_4452BB();
597  return;
598  }
599  if (pGUIWindow2->ptr_1C == (void *)26) {
600  auto str = StringPrintf("%s %s", GameUI_StatusBar_GetInput().c_str(),
602  pGUIWindow2->DrawText(pFontLucida, 13, 357, 0, str, 0, 0, 0);
604  pFontLucida->GetLineWidth(str) + 13, 357, pFontLucida);
605  return;
606  }
608  pKeyActionMap->SetWindowInputStatus(WINDOW_INPUT_NONE);
610  sub_4452BB();
611  return;
612  }
613 }
614 
615 void sub_4451A8_press_any_key(int a1, int a2, int a4) {
616  if (!pGUIWindow2) {
617  if (pParty->uFlags & 2) {
618  engine->Draw();
619  }
620  pAudioPlayer->StopChannels(-1, -1);
621  pMiscTimer->Pause();
622  pEventTimer->Pause();
623  dword_5C3418 = a1;
624  dword_5C341C = a2;
626  pGUIWindow2 = new GUIWindow_GenericDialogue(0, 0, window->GetWidth(),
627  window->GetHeight(), a4);
628  pGUIWindow2->CreateButton(61, 424, 31, 40, 2, 94, UIMSG_SelectCharacter,
629  1, '1', "");
630  pGUIWindow2->CreateButton(177, 424, 31, 40, 2, 94,
631  UIMSG_SelectCharacter, 2, '2', "");
632  pGUIWindow2->CreateButton(292, 424, 31, 40, 2, 94,
633  UIMSG_SelectCharacter, 3, '3', "");
634  pGUIWindow2->CreateButton(407, 424, 31, 40, 2, 94,
635  UIMSG_SelectCharacter, 4, '4', "");
636  }
637 }
638 
639 void sub_4B3E1E() {
640  __debugbreak();
642  int v1 = 0;
645  pDialogueWindow = new GUIWindow_Dialogue(0, 0, window->GetWidth(),
646  window->GetHeight(), 1);
647  if (pNPCStats->pProfessions[v0->uProfession]
648  .pBenefits) { // *(&pNPCStats->field_13A5C + 5 * v0->uProfession) )
650  480, 160, 140, 28, 1, 0, UIMSG_SelectNPCDialogueOption, 77, 0,
651  localization->GetString(407)); // Details / Подробнее
652  v1 = 1;
653  }
654  pDialogueWindow->CreateButton(480, 30 * v1 + 160, 140, 30, 1, 0,
656  localization->GetString(406)); // Hire Нанять
658 }
659 
661  int npc_event_id; // ecx@10
662  char *v13; // [sp-8h] [bp-18h]@60
663 
665  uDialogueType = newDialogueType;
666  if (!speakingNPC->uFlags) speakingNPC->uFlags = 1;
667  if (newDialogueType == DIALOGUE_PROFESSION_DETAILS) {
669  } else if (newDialogueType == DIALOGUE_76) {
670  if (speakingNPC->Hired()) {
671  if ((signed int)pNPCStats->uNumNewNPCs > 0) {
672  for (uint i = 0; i < (unsigned int)pNPCStats->uNumNewNPCs;
673  ++i) {
674  if (pNPCStats->pNewNPCData[i].uFlags & 0x80 &&
675  !strcmp(speakingNPC->pName,
677  pNPCStats->pNewNPCData[i].uFlags &= 0x7Fu;
678  }
679  }
680  if (pParty->pHirelings[0].pName &&
681  !_stricmp(pParty->pHirelings[0].pName, speakingNPC->pName))
682  memset(&pParty->pHirelings[0], 0, sizeof(NPCData));
683  else if (pParty->pHirelings[1].pName &&
684  !_stricmp(pParty->pHirelings[1].pName, speakingNPC->pName))
685  memset(&pParty->pHirelings[1], 0, sizeof(NPCData));
688  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0);
689  dword_7241C8 = 0;
690  return;
691  }
692  if (pParty->pHirelings[0].pName && pParty->pHirelings[1].pName) {
694  533)); // "I cannot join you, you're party is full"
695  } else {
696  if (speakingNPC->uProfession != 51) {
697  // burglars have no hiring price
698  if (pParty->GetGold() < pNPCStats->pProfessions[speakingNPC->uProfession].uHirePrice) {
699  GameUI_StatusBar_OnEvent(localization->GetString(LSTR_NOT_ENOUGH_GOLD));
701  uDialogueType = 13;
702  if (uActiveCharacter)
703  pPlayers[uActiveCharacter]->PlaySound(
705  if (!dword_7241C8) engine->Draw();
706  dword_7241C8 = 0;
707  return;
708  }
710  pNPCStats->pProfessions[speakingNPC->uProfession]
711  .uHirePrice);
712  }
713  speakingNPC->uFlags |= 0x80u;
714  if (pParty->pHirelings[0].pName) {
715  memcpy(&pParty->pHirelings[1], speakingNPC,
716  sizeof(pParty->pHirelings[1]));
717  v13 = pParty->pHireling2Name;
718  } else {
719  memcpy(&pParty->pHirelings[0], speakingNPC,
720  sizeof(pParty->pHirelings[0]));
721  v13 = pParty->pHireling1Name;
722  }
723  strcpy(v13, speakingNPC->pName);
726  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0);
729  if (uActiveCharacter)
730  pPlayers[uActiveCharacter]->PlaySound(SPEECH_61, 0);
731  }
732  } else if ((int)newDialogueType > DIALOGUE_84 &&
733  (int)newDialogueType <=
734  DIALOGUE_ARENA_SELECT_CHAMPION) { // выбор уровня сложности боя
735  ArenaFight();
736  return;
737  } else if (newDialogueType == DIALOGUE_USE_NPC_ABILITY) {
738  if (UseNPCSkill((NPCProf)speakingNPC->uProfession) == 0) {
739  if (speakingNPC->uProfession != GateMaster) {
740  speakingNPC->bHasUsedTheAbility = 1;
741  }
742  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0);
743  } else {
745  localization->GetString(140)); // "Your packs are already full!"
746  }
747  } else if (newDialogueType == DIALOGUE_13) {
748  if (!speakingNPC->Hired()) {
749  sub_4B3E1E();
751  } else {
752  for (uint i = 0; i < (signed int)pNPCStats->uNumNewNPCs; ++i) {
753  if (pNPCStats->pNewNPCData[i].uFlags & 0x80 &&
754  !strcmp(speakingNPC->pName,
756  pNPCStats->pNewNPCData[i].uFlags &= 0x7Fu;
757  }
758  if (pParty->pHirelings[0].pName &&
759  !_stricmp(pParty->pHirelings[0].pName, speakingNPC->pName))
760  memset(&pParty->pHirelings[0], 0, sizeof(NPCData));
761  else if (pParty->pHirelings[1].pName &&
762  !_stricmp(pParty->pHirelings[1].pName, speakingNPC->pName))
763  memset(&pParty->pHirelings[1], 0, sizeof(NPCData));
766  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0);
767  dword_7241C8 = 0;
768  return;
769  }
770  } else if (newDialogueType >= DIALOGUE_EVT_A &&
771  newDialogueType <= DIALOGUE_EVT_F) {
772  switch (newDialogueType) {
773  case DIALOGUE_EVT_A:
774  npc_event_id = speakingNPC->evt_A;
775  break;
776  case DIALOGUE_EVT_B:
777  npc_event_id = speakingNPC->evt_B;
778  break;
779  case DIALOGUE_EVT_C:
780  npc_event_id = speakingNPC->evt_C;
781  break;
782  case DIALOGUE_EVT_D:
783  npc_event_id = speakingNPC->evt_D;
784  break;
785  case DIALOGUE_EVT_E:
786  npc_event_id = speakingNPC->evt_E;
787  break;
788  case DIALOGUE_EVT_F:
789  npc_event_id = speakingNPC->evt_F;
790  break;
791  }
792  if ((npc_event_id >= 200) && (npc_event_id <= 310)) {
793  _4B3FE5_training_dialogue(npc_event_id); // 200-310
794  } else if ((npc_event_id >= 400) && (npc_event_id <= 410)) { // 400-410
795  dword_F8B1D8 = newDialogueType;
796  DrawJoinGuildWindow(npc_event_id - 400);
797  } else {
798  switch (npc_event_id) {
799  case 139:
800  OracleDialogue();
801  break;
802  case 311:
804  break;
805  case 399:
807  break;
808  default:
810  current_npc_text.clear();
811  EventProcessor(npc_event_id, 0, 1);
812  activeLevelDecoration = nullptr;
813  break;
814  }
815  }
816  }
817  if (!dword_7241C8) engine->Draw();
818  dword_7241C8 = 0;
819 }
UIGame.h
OSWindow.h
uNumDialogueNPCPortraits
int uNumDialogueNPCPortraits
Definition: NPC.cpp:28
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
GUIWindow_GenericDialogue::Release
virtual void Release()
Definition: UIDialogue.cpp:545
PartyAlignment::PartyAlignment_Good
@ PartyAlignment_Good
GUIWindow::DrawText
void DrawText(GUIFont *font, int x, int y, unsigned short uFontColor, const char *str, bool present_time_transparency=false, int max_text_height=0, int uFontShadowColor=0)
Definition: GUIWindow.cpp:694
uNumActors
size_t uNumActors
Definition: Actor.cpp:39
NPCGreeting::pGreeting1
char * pGreeting1
Definition: NPC.h:136
GetNPCData
NPCData * GetNPCData(signed int npcid)
Definition: NPC.cpp:43
ui_leather_mm7
Image * ui_leather_mm7
Definition: GUIWindow.cpp:106
KeyboardActionMapping::EnterText
void EnterText(int a2, int max_string_len, GUIWindow *pWindow)
Definition: Keyboard.cpp:181
DIALOGUE_EVT_D
@ DIALOGUE_EVT_D
Definition: GUIWindow.h:273
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
NPCData::uProfession
unsigned int uProfession
Definition: NPC.h:89
UIDialogue.h
dword_F8B1D8
int dword_F8B1D8
Definition: mm7_data.cpp:777
UIMSG_Escape
@ UIMSG_Escape
Definition: GUIWindow.h:96
PartyAlignment::PartyAlignment_Neutral
@ PartyAlignment_Neutral
NPCProfession::uHirePrice
unsigned int uHirePrice
Definition: NPC.h:115
GUIFont
Definition: GUIFont.h:8
GUIWindow
Definition: GUIWindow.h:433
AssetsManager::GetImage_Solid
Texture * GetImage_Solid(const String &name)
Definition: AssetsManager.cpp:51
DIALOGUE_76
@ DIALOGUE_76
Definition: GUIWindow.h:276
sub_4452BB
void sub_4452BB()
Definition: Engine.cpp:2445
ui_exit_cancel_button_background
Image * ui_exit_cancel_button_background
Definition: GUIWindow.cpp:89
NPCData::uFlags
unsigned int uFlags
Definition: NPC.h:84
SPEECH_61
@ SPEECH_61
Definition: Player.h:107
NPCData::Hired
bool Hired()
Definition: NPC.h:80
DIALOGUE_PROFESSION_DETAILS
@ DIALOGUE_PROFESSION_DETAILS
Definition: GUIWindow.h:277
sub_4451A8_press_any_key
void sub_4451A8_press_any_key(int a1, int a2, int a4)
Definition: UIDialogue.cpp:615
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
gold_transaction_amount
int gold_transaction_amount
Definition: mm7_data.cpp:775
height
EGLSurface EGLint EGLint EGLint EGLint height
Definition: SDL_egl.h:1596
GetGreetType
int GetGreetType(signed int SpeakingNPC_ID)
Definition: NPC.cpp:1322
PartyAlignment::PartyAlignment_Evil
@ PartyAlignment_Evil
Party::hirelingScrollPosition
unsigned __int8 hirelingScrollPosition
Definition: Party.h:268
Actor
Definition: Actor.h:151
pNPCTopics
std::array< NPCTopic, 789 > pNPCTopics
Definition: mm7_data.cpp:740
Party::field_7B5_in_arena_quest
char field_7B5_in_arena_quest
Definition: Party.h:293
engine
std::shared_ptr< Engine > engine
Definition: Engine.cpp:130
ArenaFight
void ArenaFight()
Definition: UIArena.cpp:95
game_viewport_width
unsigned int game_viewport_width
Definition: mm7_data.cpp:194
NPCData::evt_B
unsigned int evt_B
Definition: NPC.h:94
_591094_decoration
struct LevelDecoration * _591094_decoration
Definition: mm7_data.cpp:606
localization
Localization * localization
Definition: Localization.cpp:11
SPEECH_NotEnoughGold
@ SPEECH_NotEnoughGold
Definition: Player.h:84
ui_game_dialogue_option_normal_color
unsigned int ui_game_dialogue_option_normal_color
Definition: UICharacter.cpp:98
Party::uCurrentHour
unsigned int uCurrentHour
Definition: Party.h:275
pNPCPortraits_y
std::array< std::array< int, 6 >, 6 > pNPCPortraits_y
Definition: mm7_data.cpp:290
pDialogue_SpeakingActor
struct Actor * pDialogue_SpeakingActor
Definition: mm7_data.cpp:603
UIMSG_SelectCharacter
@ UIMSG_SelectCharacter
Definition: GUIWindow.h:93
pNPCPortraits_x
std::array< std::array< int, 6 >, 6 > pNPCPortraits_x
Definition: mm7_data.cpp:282
GUIFont::GetLineWidth
unsigned int GetLineWidth(const String &str)
Definition: GUIFont.cpp:278
GUIWindow::Release
virtual void Release()
Definition: GUIWindow.cpp:292
GameUI_StatusBar_ClearInputString
void GameUI_StatusBar_ClearInputString()
Definition: UIStatusBar.cpp:52
GUIFont.h
dword_5C3418
int dword_5C3418
Definition: mm7_data.cpp:634
GUIFont::GetHeight
unsigned int GetHeight() const
Definition: GUIFont.cpp:84
NPCData::evt_E
unsigned int evt_E
Definition: NPC.h:97
DIALOGUE_ARENA_SELECT_CHAMPION
@ DIALOGUE_ARENA_SELECT_CHAMPION
Definition: GUIWindow.h:283
DIALOGUE_EVT_B
@ DIALOGUE_EVT_B
Definition: GUIWindow.h:271
DIALOGUE_18
@ DIALOGUE_18
Definition: GUIWindow.h:269
NPCData::evt_C
unsigned int evt_C
Definition: NPC.h:95
index
GLuint index
Definition: SDL_opengl_glext.h:663
pPlayers
NZIArray< struct Player *, 5 > pPlayers
Definition: Player.cpp:46
pFontCreate
GUIFont * pFontCreate
Definition: GUIFont.cpp:22
GUIWindow::uFrameWidth
unsigned int uFrameWidth
Definition: GUIWindow.h:470
GUIButton
Definition: GUIButton.h:11
GetProfessionActionText
const char * GetProfessionActionText(int a1)
Definition: NPC.cpp:1369
GUIWindow::receives_keyboard_input_2
int receives_keyboard_input_2
Definition: GUIWindow.h:486
GUIWindow::uFrameZ
unsigned int uFrameZ
Definition: GUIWindow.h:472
current_screen_type
enum CURRENT_SCREEN current_screen_type
Definition: GUIWindow.cpp:83
Party::GetPartyFame
unsigned int GetPartyFame()
Definition: Party.cpp:302
Image.h
Dead
@ Dead
Definition: Actor.h:80
dword_A74CDC
int dword_A74CDC
Definition: mm7_data.cpp:762
GUIWindow::pStartingPosActiveItem
int pStartingPosActiveItem
Definition: GUIWindow.h:485
Actor::uAIState
AIState uAIState
Definition: Actor.h:307
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
NPC.h
Events.h
Actor.h
UIHouses.h
DIALOGUE_ARENA_FIGHT_NOT_OVER_YET
@ DIALOGUE_ARENA_FIGHT_NOT_OVER_YET
Definition: GUIWindow.h:285
GUIWindow_GenericDialogue::GUIWindow_GenericDialogue
GUIWindow_GenericDialogue(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const String &hint=String())
Definition: UIDialogue.cpp:535
Localization.h
NPCData::evt_A
unsigned int evt_A
Definition: NPC.h:93
DIALOGUE_13
@ DIALOGUE_13
Definition: GUIWindow.h:268
NPCGreeting::pGreeting2
char * pGreeting2
Definition: NPC.h:137
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
NPCData::evt_D
unsigned int evt_D
Definition: NPC.h:96
pGUIWindow2
GUIWindow * pGUIWindow2
Definition: GUIWindow.cpp:60
NPCStats::uNumNewNPCs
unsigned int uNumNewNPCs
Definition: NPC.h:179
CURRENT_SCREEN::SCREEN_BRANCHLESS_NPC_DIALOG
@ SCREEN_BRANCHLESS_NPC_DIALOG
NPC_EventProcessor
int NPC_EventProcessor(int npc_event_id, int entry_line)
Definition: NPC.cpp:1227
GUIButton.h
pBtn_ExitCancel
GUIButton * pBtn_ExitCancel
Definition: GUIButton.cpp:28
activeLevelDecoration
LevelDecoration * activeLevelDecoration
Definition: Decoration.cpp:10
pParty
Party * pParty
Definition: Party.cpp:30
GameUI_StatusBar_GetInput
String GameUI_StatusBar_GetInput()
Definition: UIStatusBar.cpp:50
pFontArrus
GUIFont * pFontArrus
Definition: GUIFont.cpp:18
GUIWindow::pCurrentPosActiveItem
int pCurrentPosActiveItem
Definition: GUIWindow.h:482
IRender.h
NPCData::pName
char * pName
Definition: NPC.h:82
NPCStats::pNewNPCData
NPCData pNewNPCData[501]
Definition: NPC.h:165
current_npc_text
String current_npc_text
Definition: mm7_data.cpp:780
prev_screen_type
enum CURRENT_SCREEN prev_screen_type
Definition: GUIWindow.cpp:84
GUIWindow::pNumPresenceButton
int pNumPresenceButton
Definition: GUIWindow.h:481
SPEECH_GoodDay
@ SPEECH_GoodDay
Definition: Player.h:68
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
NPCStats::pProfessions
NPCProfession pProfessions[59]
Definition: NPC.h:167
NPCStats::pNPCGreetings
NPCGreeting pNPCGreetings[205]
Definition: NPC.h:175
Party::pHireling2Name
char pHireling2Name[100]
Definition: Party.h:319
Disabled
@ Disabled
Definition: Actor.h:94
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
WINDOW_Dialogue
@ WINDOW_Dialogue
Definition: GUIWindow.h:298
v1
GLfloat GLfloat v1
Definition: SDL_opengl_glext.h:694
KeyboardActionMapping::pPressedKeysBuffer
char pPressedKeysBuffer[257]
Definition: Keyboard.h:66
game_ui_right_panel_frame
Image * game_ui_right_panel_frame
Definition: GUIWindow.cpp:90
width
EGLSurface EGLint EGLint EGLint width
Definition: SDL_egl.h:1596
GUIWindow_Dialogue
Definition: UIDialogue.h:5
ui_game_dialogue_option_highlight_color
unsigned int ui_game_dialogue_option_highlight_color
Definition: UICharacter.cpp:97
Party::TakeGold
static void TakeGold(int amount)
Definition: Party.cpp:292
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
AudioPlayer::StopChannels
void StopChannels(int uStartChannel, int uEndChannel)
Definition: AudioPlayer.cpp:331
GUIFont::CalcTextHeight
unsigned int CalcTextHeight(const String &str, unsigned int width, int x_offset, bool return_on_carriage=false)
Definition: GUIFont.cpp:246
pActors
std::array< Actor, 500 > pActors
Definition: Actor.cpp:38
DrawJoinGuildWindow
void DrawJoinGuildWindow(int pEventCode)
Definition: GUIWindow.cpp:794
Party.h
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
Party::uFlags
unsigned int uFlags
Definition: Party.h:313
branchless_dialogue_str
String branchless_dialogue_str
Definition: mm7_data.cpp:619
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
NPCProf
NPCProf
Definition: NPC.h:5
NPCData::rep
int rep
Definition: NPC.h:87
Actor::sNPC_ID
int16_t sNPC_ID
Definition: Actor.h:287
NPCData::fame
int fame
Definition: NPC.h:86
Timer::Pause
void Pause()
Definition: Time.cpp:19
NPCData
Definition: NPC.h:79
Arena_SelectionFightLevel
void Arena_SelectionFightLevel()
Definition: UIArena.cpp:34
OnSelectNPCDialogueOption
void OnSelectNPCDialogueOption(DIALOGUE_TYPE newDialogueType)
Definition: UIDialogue.cpp:660
pDialogueNPCCount
int pDialogueNPCCount
Definition: NPC.cpp:26
GameUI_StatusBar_OnInput
void GameUI_StatusBar_OnInput(const String &str)
Definition: UIStatusBar.cpp:46
LevelDecoration
Definition: Decoration.h:20
Removed
@ Removed
Definition: Actor.h:86
DIALOGUE_ARENA_ALREADY_WON
@ DIALOGUE_ARENA_ALREADY_WON
Definition: GUIWindow.h:287
KeyboardActionMapping::SetWindowInputStatus
void SetWindowInputStatus(int a2)
Definition: Keyboard.cpp:195
GUIWindow_GenericDialogue
Definition: UIDialogue.h:16
UIArena.h
NPCData::uPortraitID
unsigned int uPortraitID
Definition: NPC.h:83
GUIWindow_GenericDialogue::Update
virtual void Update()
Definition: UIDialogue.cpp:552
pMiscTimer
Timer * pMiscTimer
Definition: Time.cpp:7
GUIButton::uW
unsigned int uW
Definition: GUIButton.h:26
GUIWindow_Dialogue::Update
virtual void Update()
Definition: UIDialogue.cpp:238
GUIWindow::DrawFlashingInputCursor
void DrawFlashingInputCursor(int uX, int uY, GUIFont *a2)
Definition: GUIWindow.cpp:759
NPCData::Location2D
unsigned int Location2D
Definition: NPC.h:88
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
WINDOW_GreetingNPC
@ WINDOW_GreetingNPC
Definition: GUIWindow.h:304
OBJECT_Player
@ OBJECT_Player
Definition: Actor.h:68
Party::CountHirelings
void CountHirelings()
Definition: Party.cpp:57
pDialogueNPCPortraits
std::array< class Image *, 6 > pDialogueNPCPortraits
Definition: NPC.cpp:27
GateMaster
@ GateMaster
Definition: NPC.h:46
Party::pHireling1Name
char pHireling1Name[100]
Definition: Party.h:318
dword_7241C8
int dword_7241C8
Definition: mm7_data.cpp:744
NPCProfession::pDismissText
char * pDismissText
Definition: NPC.h:119
NPCProfession::pJoinText
char * pJoinText
Definition: NPC.h:118
uDialogueType
unsigned int uDialogueType
Definition: mm7_data.cpp:604
CURRENT_SCREEN::SCREEN_NPC_DIALOGUE
@ SCREEN_NPC_DIALOGUE
DIALOGUE_TYPE
DIALOGUE_TYPE
Definition: GUIWindow.h:266
DIALOGUE_ARENA_REWARD
@ DIALOGUE_ARENA_REWARD
Definition: GUIWindow.h:286
NPCData::greet
int greet
Definition: NPC.h:90
GUIButton::msg_param
unsigned int msg_param
Definition: GUIButton.h:30
NPCData::bHasUsedTheAbility
int bHasUsedTheAbility
Definition: NPC.h:100
WINDOW_MainMenu
@ WINDOW_MainMenu
Definition: GUIWindow.h:292
UIStatusBar.h
pKeyActionMap
struct KeyboardActionMapping * pKeyActionMap
Definition: Keyboard.cpp:35
DIALOGUE_EVT_E
@ DIALOGUE_EVT_E
Definition: GUIWindow.h:274
game_ui_statusbar
Image * game_ui_statusbar
Definition: UIGame.cpp:55
CheckBountyRespawnAndAward
void CheckBountyRespawnAndAward()
Definition: GUIWindow.cpp:1763
SPEECH_GoodEvening
@ SPEECH_GoodEvening
Definition: Player.h:69
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
uint
unsigned int uint
Definition: MM7.h:4
uActiveCharacter
unsigned int uActiveCharacter
Definition: mm7_data.cpp:555
Localization::FormatString
String FormatString(unsigned int index,...) const
Definition: Localization.cpp:17
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)
DIALOGUE_ARENA_WELCOME
@ DIALOGUE_ARENA_WELCOME
Definition: GUIWindow.h:284
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
NPCData::joins
int joins
Definition: NPC.h:91
pNPCStats
struct NPCStats * pNPCStats
Definition: NPC.cpp:29
GameUI_StatusBar_OnEvent
void GameUI_StatusBar_OnEvent(const String &str, unsigned int num_seconds)
Definition: UIStatusBar.cpp:33
_4B3FE5_training_dialogue
void _4B3FE5_training_dialogue(int a4)
Definition: GUIWindow.cpp:1673
Localization::GetNpcProfessionName
const char * GetNpcProfessionName(unsigned int index) const
Definition: Localization.h:83
GUIWindow::eWindowType
WindowType eWindowType
Definition: GUIWindow.h:474
ui_game_dialogue_npc_name_color
unsigned int ui_game_dialogue_npc_name_color
Definition: UICharacter.cpp:96
Decoration.h
GUIWindow::ptr_1C
void * ptr_1C
Definition: GUIWindow.h:476
sub_4B3E1E
void sub_4B3E1E()
Definition: UIDialogue.cpp:639
NPCProfession
Definition: NPC.h:107
NPCProfession::pBenefits
char * pBenefits
Definition: NPC.h:116
EventProcessor
void EventProcessor(int uEventID, int targetObj, int canShowMessages, int entry_line)
Definition: Events.cpp:260
game_ui_dialogue_background
Image * game_ui_dialogue_background
Definition: UIGame.cpp:93
DIALOGUE_EVT_F
@ DIALOGUE_EVT_F
Definition: GUIWindow.h:275
GUIWindow::GetControl
GUIButton * GetControl(unsigned int uID)
Definition: GUIWindow.cpp:311
GUIWindow::uFrameX
unsigned int uFrameX
Definition: GUIWindow.h:468
NPCStats::dword_AE336C_LastMispronouncedNameFirstLetter
static int dword_AE336C_LastMispronouncedNameFirstLetter
Definition: NPC.h:193
DIALOGUE_EVT_A
@ DIALOGUE_EVT_A
Definition: GUIWindow.h:270
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
v0
GLfloat v0
Definition: SDL_opengl_glext.h:693
pMessageQueue_50CBD0
struct GUIMessageQueue * pMessageQueue_50CBD0
Definition: GUIWindow.cpp:86
pDialogueWindow
GUIWindow * pDialogueWindow
Definition: GUIWindow.cpp:50
pFontLucida
GUIFont * pFontLucida
Definition: GUIFont.cpp:19
UseNPCSkill
int UseNPCSkill(NPCProf profession)
Definition: NPC.cpp:1378
StringPrintf
String StringPrintf(const char *fmt,...)
Definition: Strings.cpp:9
dword_5C341C
int dword_5C341C
Definition: mm7_data.cpp:635
GUIWindow_Dialogue::Release
virtual void Release()
Definition: UIDialogue.cpp:225
GUIButton::sLabel
String sLabel
Definition: GUIButton.h:36
GUIWindow_Dialogue::GUIWindow_Dialogue
GUIWindow_Dialogue(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const String &hint=String())
Definition: UIDialogue.cpp:126
String
std::string String
Definition: Strings.h:10
Keyboard.h
GameUI_InitializeDialogue
void GameUI_InitializeDialogue(Actor *actor, int bPlayerSaysHello)
Definition: UIDialogue.cpp:25
DIALOGUE_USE_NPC_ABILITY
@ DIALOGUE_USE_NPC_ABILITY
Definition: GUIWindow.h:267
UIMSG_SelectNPCDialogueOption
@ UIMSG_SelectNPCDialogueOption
Definition: GUIWindow.h:118
pEventTimer
Timer * pEventTimer
Definition: Time.cpp:8
_591428_endcap
Image * _591428_endcap
Definition: UIHouses.cpp:52
Party::GetGold
int GetGold() const
Definition: Party.cpp:264
Image::Release
bool Release()
Definition: Image.cpp:335
DIALOGUE_EVT_C
@ DIALOGUE_EVT_C
Definition: GUIWindow.h:272
OracleDialogue
void OracleDialogue()
Definition: GUIWindow.cpp:1693
sDialogue_SpeakingActorNPC_ID
int sDialogue_SpeakingActorNPC_ID
Definition: mm7_data.cpp:605
Party::alignment
PartyAlignment alignment
Definition: Party.h:308
DIALOGUE_84
@ DIALOGUE_84
Definition: GUIWindow.h:279
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52