diff mm7_5.cpp @ 1057:37498d2cceed

Слияние
author Ritor1
date Thu, 23 May 2013 21:37:22 +0600
parents 010a844ef4a0 d48c762de563
children b79139c3b5c8
line wrap: on
line diff
--- a/mm7_5.cpp	Thu May 23 21:36:57 2013 +0600
+++ b/mm7_5.cpp	Thu May 23 21:37:22 2013 +0600
@@ -457,8 +457,8 @@
           GUIWindow::Create(241, 302, 106, 42, WINDOW_SaveLoadBtn, (int)pBtnLoadSlot, 0);
           continue;
         case UIMSG_SelectLoadSlot:
-          if ( pGUIWindow_CurrentMenu->field_40 == 1 )
-            pKeyActionMap->_459ED1(0);
+          if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS)
+            pKeyActionMap->SetWindowInputStatus(WINDOW_INPUT_NONE);
           if ( pCurrentScreen != SCREEN_SAVEGAME || uLoadGameUI_SelectedSlot != pSaveListPosition + uMessageParam )
           {
             v10 = pSaveListPosition + uMessageParam;
@@ -466,23 +466,6 @@
             {
               pMessageQueue_50CBD0->AddMessage(UIMSG_SaveLoadBtn, 0, 0);
               pMessageQueue_50CBD0->AddMessage(UIMSG_LoadGame, 0, 0);
-              /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
-              {
-                pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_SaveLoadBtn;
-                pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
-                *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
-                //v11 = pMessageQueue_50CBD0->uNumMessages + 1;
-                //v13 = pMessageQueue_50CBD0->uNumMessages + 1 > 40;
-                //v12 = (signed int)pMessageQueue_50CBD0->uNumMessages - 39 < 0;
-                ++pMessageQueue_50CBD0->uNumMessages;
-                if ( v12 ^ v13 )
-                {
-                  pMessageQueue_50CBD0->pMessages[v11].eType = UIMSG_LoadGame;
-                  pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
-                  *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
-                  ++pMessageQueue_50CBD0->uNumMessages;
-                }
-              }*/
             }
             uLoadGameUI_SelectedSlot = v10;
             dword_6BE138 = v10;
@@ -504,9 +487,9 @@
           stru_506E40.Release();
           continue;
         case UIMSG_SaveGame:
-          if ( pGUIWindow_CurrentMenu->field_40 == 1 )
-          {
-            pKeyActionMap->_459ED1(0);
+          if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS)
+          {
+            pKeyActionMap->SetWindowInputStatus(WINDOW_INPUT_NONE);
             strcpy((char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], (const char *)pKeyActionMap->pPressedKeysBuffer);
           }
           DoSavegame(uLoadGameUI_SelectedSlot);
@@ -1655,10 +1638,8 @@
           }
           else
           {
-            start_event_seq_number = dword_5C341C;
-            EventProcessor(dword_5C3418, 0, 1);
-          }
-          start_event_seq_number = 0;
+            EventProcessor(dword_5C3418, 0, 1, dword_5C341C);
+          }
           if ( !_strcmpi(byte_6BE3B0, "d05.blv") )
             pParty->uTimePlayed += 1474560i64;
           continue;
@@ -1666,7 +1647,6 @@
           CloseWindowBackground();
           pVideoPlayer->Unload();
           DialogueEnding();
-          start_event_seq_number = 0;
           viewparams->bRedrawGameUI = true;
           continue;
         case UIMSG_CycleCharacters:
@@ -3186,13 +3166,13 @@
           v119 = 2048;
           if ( (signed int)v118 <= 2048 )
           {
-            dword_576E2C = v118;
+            _576E2C_current_minimap_zoom = v118;
             dword_576E28 = viewparams->field_28;
             break;
           }
           viewparams->field_28 = 11;
           viewparams->uMinimapZoom = v119;
-          dword_576E2C = v119;
+          _576E2C_current_minimap_zoom = v119;
           dword_576E28 = viewparams->field_28;
           break;
         case UIMSG_ClickZoomInBtn:
@@ -3213,7 +3193,7 @@
               v118 = v119;
               viewparams->uMinimapZoom = v119;
             }
-            dword_576E2C = v118;
+            _576E2C_current_minimap_zoom = v118;
             dword_576E28 = viewparams->field_28;
           }
           else
@@ -3464,8 +3444,8 @@
           break;
         case UIMSG_SelectLoadSlot:
             //main menu save/load wnd   clicking on savegame lines
-          if (pGUIWindow_CurrentMenu->field_40 == 1)
-            pKeyActionMap->_459ED1(0);
+          if (pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS)
+            pKeyActionMap->SetWindowInputStatus(WINDOW_INPUT_NONE);
           if ( pCurrentScreen != SCREEN_SAVEGAME || uLoadGameUI_SelectedSlot != pParam + pSaveListPosition )
           {
             //load clicked line
@@ -4760,7 +4740,7 @@
     && (SHIDWORD(pMonster->pActorBuffs[20].uExpireTime) > (signed int)v41
      || LODWORD(pMonster->pActorBuffs[20].uExpireTime) > v41)
     && uDamageAmount != v41 )
-    player->ReceiveDamage(uDamageAmount, a2);
+    player->ReceiveDamage(uDamageAmount, (DAMAGE_TYPE)a2);
   v50 = 24;
   v59 = 20 * v61 / (signed int)pMonster->pMonsterInfo.uHP;
   if ( (player->_48EA46_calc_special_bonus_by_items(24) || hit_will_stun != v41)
@@ -5012,7 +4992,7 @@
 LABEL_43:
     if ( !(dword_6BE368_debug_settings_2 & 0x10) )
     {
-      v24 = v6->ReceiveDamage(v77, v22);
+      v24 = v6->ReceiveDamage(v77, (DAMAGE_TYPE)v22);
       if ( SHIDWORD(v6->pPlayerBuffs[10].uExpireTime) >= 0
         && (SHIDWORD(v6->pPlayerBuffs[10].uExpireTime) > 0 || LODWORD(v6->pPlayerBuffs[10].uExpireTime)) )
       {
@@ -5075,7 +5055,7 @@
     if ( !pParty->bTurnBasedModeOn )
     {
       v35 = v6->GetActualEndurance();
-      v36 = (double)(20 - v6->_48EA1B_get_static_effect(v35)) * flt_6BE3A4_debug_recmod1 * 2.133333333333333;
+      v36 = (double)(20 - v6->GetParameterBonus(v35)) * flt_6BE3A4_debug_recmod1 * 2.133333333333333;
       v6->SetRecoveryTime((signed __int64)v36);
     }
     if ( v77 )
@@ -5197,7 +5177,7 @@
 LABEL_133:
         if ( !(dword_6BE368_debug_settings_2 & 0x10) )
         {
-          v54 = v45->ReceiveDamage(v77, v50);
+          v54 = v45->ReceiveDamage(v77, (DAMAGE_TYPE)v50);
           if ( SHIDWORD(v45->pPlayerBuffs[10].uExpireTime) >= 0 )
           {
             if ( SHIDWORD(v45->pPlayerBuffs[10].uExpireTime) > 0 || LODWORD(v45->pPlayerBuffs[10].uExpireTime) )
@@ -5263,7 +5243,7 @@
         if ( !pParty->bTurnBasedModeOn )
         {
           v65 = v45->GetActualEndurance();
-          v66 = (double)(20 - v45->_48EA1B_get_static_effect(v65))
+          v66 = (double)(20 - v45->GetParameterBonus(v65))
               * flt_6BE3A4_debug_recmod1
               * 2.133333333333333;
           v45->SetRecoveryTime((signed __int64)v66);
@@ -5294,7 +5274,7 @@
       v68 = pParty->pPlayers[uActorID].CalculateRangedDamageTo(0);
       v69 = 0;
     }
-    a4b->ReceiveDamage(v68, v69);
+    a4b->ReceiveDamage(v68, (DAMAGE_TYPE)v69);
     if ( v38 == OBJECT_Player && !qword_A750D8 )
     {
       qword_A750D8 = 256i64;
@@ -5359,28 +5339,14 @@
 //----- (0043AA99) --------------------------------------------------------
 void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz)
 {
-/*  int v7; // ebx@1
-  int v8; // ST14_4@1
-  int v9; // edi@1
-  int anglea; // [sp+20h] [bp+8h]@1
-
-  v7 = sRotX;
-  v8 = sDepth;
-  v9 = sRotY;
-  anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16;
-  *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(sRotY) * (signed __int64)anglea) >> 16);
-  *outy = v.y + ((unsigned __int64)(stru_5C6E00->SinCos(sRotY - stru_5C6E00->uIntegerHalfPi) * (signed __int64)anglea) >> 16);
-  *outz = v.z + ((unsigned __int64)(stru_5C6E00->SinCos(sRotX - stru_5C6E00->uIntegerHalfPi) * (signed __int64)sDepth) >> 16);*/
-
  float cosf_x = cosf(3.14159265f * sRotX / 1024.0f),
        sinf_x = sinf(3.14159265f * sRotX / 1024.0f),
        cosf_y = cosf(3.14159265f * sRotY / 1024.0f),
        sinf_y = sinf(3.14159265f * sRotY / 1024.0f);
- //sDepth = 14000000;
+
  *outx = v.x + ((unsigned __int64)(sinf_y * (signed __int64)((unsigned __int64)(cosf_x * (signed __int64)sDepth)>> 16)));
  *outy = v.y + ((unsigned __int64)(cosf_y * (signed __int64)((unsigned __int64)(cosf_x * (signed __int64)sDepth)>> 16)));
  *outz = v.z + ((unsigned __int64)(sinf_x * (signed __int64)sDepth) >> 16);
-
 }
 
 //----- (0043AB61) --------------------------------------------------------
@@ -9767,149 +9733,6 @@
 }
 
 
-//----- (00411150) --------------------------------------------------------
-void DrawTownPortalScreen()
-{
-  //signed int v0; // edi@1
-  //__int16 v1; // dx@8
-  //POINT *v2; // edi@17
-  int v3; // edi@17
-  //__int16 v4; // dx@24
-  GUIWindow v6; // [sp+Ch] [bp-64h]@1
-  //POINT v7; // [sp+60h] [bp-10h]@17
-  POINT a2; // [sp+68h] [bp-8h]@17
-
-  pRenderer->ClearZBuffer(0, 479);
-  pRenderer->DrawTextureTransparent(8, 8, pTexture_CurrentBook);
-  pRenderer->DrawTextureTransparent(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId));
-
-  v6.uFrameX = game_viewport_x;
-  v6.uFrameY = game_viewport_y;
-  v6.uFrameWidth = game_viewport_width;
-  v6.uFrameHeight = game_viewport_height;
-  v6.uFrameZ = game_viewport_z;
-  v6.uFrameW = game_viewport_w;
-  
-  const uint fountain_bits_lut[] = {PARTY_QUEST_FOUNTAIN_HARMONDALE,
-                                    PARTY_QUEST_FOUNTAIN_PIERPONT,
-                                    PARTY_QUEST_FOUNTAIN_NIGHON,
-                                    PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE,
-                                    PARTY_QUEST_FOUNTAIN_CELESTIA,
-                                    PARTY_QUEST_FOUNTAIN_THE_PIT};
-  for (uint i = 0; i < 6; ++i)
-  {
-
-    if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[i]))
-      pRenderer->DrawMaskToZBuffer(pTownPortalBook_xs[i],
-                                   pTownPortalBook_ys[i],
-                                   pTexture_TownPortalIcons[i], i + 1);
-  }
-
-/*  v0 = 0;
-  do
-  {
-    if ( !v0 )
-    {
-      v1 = 206;
-LABEL_14:
-      if ( !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v1) )
-        goto LABEL_16;
-      goto LABEL_15;
-    }
-    if ( v0 == 1 )
-    {
-      v1 = 208;
-      goto LABEL_14;
-    }
-    if ( v0 == 2 )
-    {
-      v1 = 207;
-      goto LABEL_14;
-    }
-    if ( v0 == 3 )
-    {
-      v1 = 211;
-      goto LABEL_14;
-    }
-    if ( v0 == 4 )
-    {
-      v1 = 209;
-      goto LABEL_14;
-    }
-    if ( v0 == 5 )
-    {
-      v1 = 210;
-      goto LABEL_14;
-    }
-LABEL_15:
-    pRenderer->DrawMaskToZBuffer(
-      pTownPortalBook_xs[v0],
-      pTownPortalBook_ys[v0],
-      *(&pTexture_TownPortalHarmn + v0),
-      v0 + 1);
-LABEL_16:
-    ++v0;
-  }
-  while ( v0 < 6 );*/
-
-  pMouse->GetCursorPos(&a2);
-  //v2 = pMouse->GetCursorPos(&a2);
-  v3 = pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF;
-
-  if (v3)
-  {
-    if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[v3 - 1]))
-      pRenderer->DrawTextureIndexed(pTownPortalBook_xs[v3 - 1], pTownPortalBook_ys[v3 - 1], pTexture_TownPortalIcons[v3 - 1]);
-  }
-  v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
-
-
-/*  if ( !v3 )                                    // Town Portal
-  {
-    v6.DrawTitleText(pBook2Font, 0, 22, 0, pGlobalTXT_LocalizationStrings[10], 3);  // "Town Portal"
-    return;
-  }
-  if ( v3 == 1 )
-  {
-    v4 = 206;
-LABEL_30:
-    if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v4) )
-      goto LABEL_31;
-    v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);  // "Town Portal"
-    return;
-  }
-  if ( v3 == 2 )
-  {
-    v4 = 208;
-    goto LABEL_30;
-  }
-  if ( v3 == 3 )
-  {
-    v4 = 207;
-    goto LABEL_30;
-  }
-  if ( v3 == 4 )
-  {
-    v4 = 211;
-    goto LABEL_30;
-  }
-  if ( v3 == 5 )
-  {
-    v4 = 209;
-    goto LABEL_30;
-  }
-  if ( v3 == 6 )
-  {
-    v4 = 210;
-    goto LABEL_30;
-  }
-LABEL_31:
-  pRenderer->DrawTextureIndexed(word_4E1D3A[v3], pTownPortalBook_xs[v3 + 5], *(&pTex_tab_an_6b__zoom_on + v3));
-  v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);*/
-}
-// 4E1D3A: using guessed type __int16 word_4E1D3A[];
-
-
 //----- (00413FF1) --------------------------------------------------------
 void SetMonthNames()
 {
@@ -9980,17 +9803,6 @@
 
 
 
-
-//----- (004141CA) --------------------------------------------------------
-void ModalWindow(const char *pStr, int a4)
-{
-  pEventTimer->Pause();
-  dword_506F0C[0] = pCurrentScreen;
-  ptr_507BDC = GUIWindow::Create(0, 0, 640, 480, WINDOW_FinalWindow, a4, (int)pStr);
-  pCurrentScreen = SCREEN_PRESS_ESCAPE_MESSAGE;
-}
-// 4E28F8: using guessed type int pCurrentScreen;
-
 //----- (0041420D) --------------------------------------------------------
 void __cdecl sub_41420D_press_esc()
 {
@@ -10014,13 +9826,7 @@
 
   v0 = ptr_507BDC;
   pMessageQueue_50CBD0->AddMessage((UIMessageType)(int)ptr_507BDC->ptr_1C, 0, 0);
-  /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
-  {
-    pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)(int)ptr_507BDC->ptr_1C;
-    pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
-    *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
-    ++pMessageQueue_50CBD0->uNumMessages;
-  }*/
+
   v0->Release();
   ptr_507BDC = 0;
   pCurrentScreen = dword_506F0C[0];
@@ -10223,7 +10029,7 @@
       case WINDOW_50:
       {
         v27 = TargetColor(255, 255, 255);
-        if ( ptr_507BD0->field_40 == 1 )
+        if ( ptr_507BD0->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS)
         {
           ptr_507BD0->DrawMessageBox(0);
           ptr_507BD0->DrawText(pFontCreate, 30, 40, v27, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
@@ -10231,19 +10037,19 @@
           ptr_507BD0->DrawFlashingInputCursor(v31 + 30, 40, pFontCreate);
           continue;
         }
-        if ( ptr_507BD0->field_40 == 2 )
+        if ( ptr_507BD0->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
         {
-          pWindow->field_40 = 0;
+          pWindow->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
           pMessageQueue_50CBD0->AddMessage((UIMessageType)(int)ptr_507BD0->ptr_1C, 0, 0);
           pEventTimer->Resume();
           ptr_507BD0->Release();
-          pCurrentScreen = 0;
-          viewparams->bRedrawGameUI = 1;
+          pCurrentScreen = SCREEN_GAME;
+          viewparams->bRedrawGameUI = true;
           continue;
         }
-        if ( ptr_507BD0->field_40 == 3 )
+        if ( ptr_507BD0->receives_keyboard_input_2 == WINDOW_INPUT_CANCELLED)
         {
-          pWindow->field_40 = 0;
+          pWindow->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
           pEventTimer->Resume();
           ptr_507BD0->Release();
           continue;
@@ -10260,7 +10066,7 @@
           pWindow->Release();
           pEventTimer->Resume();
           pCurrentScreen = 0;
-          viewparams->bRedrawGameUI = 1;
+          viewparams->bRedrawGameUI = true;
           v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
           if ( v26 > 0 )
           {
@@ -10768,7 +10574,7 @@
     {
       v0->RemoveItemAtInventoryIndex(v18);
       v26 = rand();
-      v0->ReceiveDamage(v26 % 11 + 10, 0);
+      v0->ReceiveDamage(v26 % 11 + 10, DMGT_FIRE);
       pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0);
 
       pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0);
@@ -10784,7 +10590,7 @@
       {
         v0->RemoveItemAtInventoryIndex(v18);
         v25 = rand();
-        v0->ReceiveDamage(v25 % 71 + 30, 0);
+        v0->ReceiveDamage(v25 % 71 + 30, DMGT_FIRE);
         v23 = 1;
       }
       else
@@ -10793,7 +10599,7 @@
         {
           v0->RemoveItemAtInventoryIndex(v18);
           v24 = rand();
-          v0->ReceiveDamage(v24 % 201 + 50, 0);
+          v0->ReceiveDamage(v24 % 201 + 50, DMGT_FIRE);
           v23 = 5;
         }
         else
@@ -10910,134 +10716,6 @@
 }
 
 
-//----- (00416B01) --------------------------------------------------------
-void GameUI_DrawNPCPopup(void *_this)//PopupWindowForBenefitAndJoinText
-{
-  int v1; // edi@2
-  int v2; // ecx@2
-  NPCData *v3; // eax@2
-  NPCData *v4; // esi@7
-  NPCData *v5; // eax@16
-  NPCData *v6; // esi@16
-  const CHAR *v7; // eax@18
-  unsigned int v8; // eax@25
-  unsigned int v9; // eax@25
-  const char *v10; // ST14_4@26
-  char *v11; // esi@26
-  const char *v12; // ST18_4@27
-  unsigned __int16 v13; // ax@28
-  char *v14; // eax@28
-  GUIWindow a1; // [sp+Ch] [bp-60h]@23
-  int a2; // [sp+60h] [bp-Ch]@16
-  void *v17; // [sp+64h] [bp-8h]@1
-  LPCSTR lpsz; // [sp+68h] [bp-4h]@6
-
-  v17 = _this;
-  if ( bNoNPCHiring != 1 )
-  {
-    v1 = 0;
-    v2 = 0;
-    v3 = pParty->pHirelings;
-    /*do
-    {
-      if ( v3->pName )
-        pTmpBuf[v1++] = v2;
-      ++v3;
-      ++v2;
-    }
-    while ( (signed int)v3 < (signed int)&pParty->pPickedItem );*/
-    for (int i = 0; i < 2; ++i)
-    {
-     if (pParty->pHirelings[i].pName)
-        pTmpBuf[v1++] = i;
-    }
-    lpsz = 0;
-    if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
-    {
-      /*v4 = pNPCStats->pNewNPCData;
-      do
-      {
-        if ( v4->uFlags & 0x80
-          && (!pParty->pHirelings[0].pName || strcmp(v4->pName, pParty->pHirelings[0].pName))
-          && (!pParty->pHirelings[1].pName || strcmp(v4->pName, pParty->pHirelings[1].pName)) )
-          pTmpBuf[v1++] = (char)lpsz + 2;
-        ++lpsz;
-        ++v4;
-      }
-      while ( (signed int)lpsz < (signed int)pNPCStats->uNumNewNPCs );*/
-      for (int i = 0; i < pNPCStats->uNumNewNPCs; ++i)
-      {
-        if (pNPCStats->pNewNPCData[i].Hired())
-        {
-          if (!pParty->pHirelings[0].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[0].pName))
-          {
-            if (!pParty->pHirelings[1].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[1].pName))
-              pTmpBuf[v1++] = i + 2;
-          }
-        }
-      }
-    }
-    if ( (signed int)((char *)v17 + (unsigned __int8)pParty->field_709) < v1 )
-    {
-      sDialogue_SpeakingActorNPC_ID = -1 - (unsigned __int8)pParty->field_709 - (int)v17;
-      v5 = GetNewNPCData(sDialogue_SpeakingActorNPC_ID, (int)&a2);
-      v6 = v5;
-      if ( v5 )
-      {
-        if ( a2 == 57 )
-          v7 = pNPCTopics[512].pText; // Baby dragon
-        else
-          v7 = (const CHAR *)pNPCStats->pProfessions[v5->uProfession].pBenefits;
-        lpsz = v7;
-        if ( !v7 )
-        {
-          lpsz = (LPCSTR)pNPCStats->pProfessions[v5->uProfession].pJoinText;
-          if ( !lpsz )
-            lpsz = "";
-        }
-        a1.Hint = 0;
-        a1.uFrameX = 38;
-        a1.uFrameY = 60;
-        a1.uFrameWidth = 276;
-        a1.uFrameZ = 313;
-        a1.uFrameHeight = pFontArrus->CalcTextHeight(lpsz, &a1, 0, 0)
-                        + 2 * LOBYTE(pFontArrus->uFontHeight)
-                        + 24;
-        if ( (signed int)a1.uFrameHeight < 130 )
-          a1.uFrameHeight = 130;
-        a1.uFrameWidth = 400;
-        a1.uFrameZ = a1.uFrameX + 399;
-        a1.DrawMessageBox(0);
-        sprintf(pTmpBuf2, "NPC%03d", v6->uPortraitID);
-        v8 = pIcons_LOD->LoadTexture(pTmpBuf2, TEXTURE_16BIT_PALETTE);
-        pRenderer->DrawTextureIndexed(
-          a1.uFrameX + 22,
-          a1.uFrameY + 36,
-          (Texture *)(v8 != -1 ? &pIcons_LOD->pTextures[v8] : 0));
-        v9 = v6->uProfession;
-        if ( v9 )
-        {
-          v10 = v6->pName;
-          v11 = pTmpBuf;
-          sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v10, aNPCProfessionNames[v9]);
-        }
-        else
-        {
-          v12 = v6->pName;
-          v11 = pTmpBuf;
-          strcpy(pTmpBuf, v12);
-        }
-        v13 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
-        a1.DrawTitleText(pFontArrus, 0, 0xCu, v13, v11, 3u);
-        a1.uFrameWidth -= 24;
-        a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
-        v14 = BuilDialogueString((char *)lpsz, uActiveCharacter - 1, 0, 0, 0, 0);
-        a1.DrawText(pFontArrus, 100, 36, 0, v14, 0, 0, 0);
-      }
-    }
-  }
-}
-
 
 
 
@@ -11197,26 +10875,6 @@
   }
 }
 
-//----- (004178C4) --------------------------------------------------------
-void __cdecl sub_4178C4()
-{
-  if ( pArcomageGame->bGameInProgress == 1 )
-  {
-    if (pAsyncMouse)
-      pArcomageGame->stru1.field_0 = 7;
-  }
-}
-
-//----- (004178E1) --------------------------------------------------------
-void __cdecl sub_4178E1()
-{
-  if ( pArcomageGame->bGameInProgress == 1 )
-  {
-    if (pAsyncMouse)
-      pArcomageGame->stru1.field_0 = 8;
-  }
-}
-
 //----- (004178FE) --------------------------------------------------------
 unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2)
 {