changeset 83:2d5d13376e91

Merge
author Nomad
date Mon, 29 Oct 2012 00:49:33 +0200
parents f9a33f75bae3 (diff) 517e33e08d93 (current diff)
children b39bdc150e90
files GUIWindow.cpp mm7_1.cpp
diffstat 11 files changed, 98 insertions(+), 148 deletions(-) [+]
line wrap: on
line diff
--- a/GUIWindow.cpp	Sun Oct 28 22:13:41 2012 +0600
+++ b/GUIWindow.cpp	Mon Oct 29 00:49:33 2012 +0200
@@ -145,13 +145,9 @@
 
 
 //----- (0041D3B7) --------------------------------------------------------
-char GUIWindow::_41D3B7()
+char GUIWindow::DrawQuickCharRecord()
 {
-  GUIWindow *v1; // edi@1
   Player *pPlayer; // esi@1
-  int v3; // ecx@1
-  SpellBuff *v4; // eax@1
-  signed int v5; // ebx@1
   int v6; // eax@5
   int v7; // ebx@5
   unsigned int v8; // ecx@5
@@ -163,76 +159,44 @@
   unsigned int v14; // eax@12
   PlayerFrame *v15; // eax@12
   unsigned int v16; // eax@15
-  signed int v17; // ST28_4@15
-  int v18; // ST24_4@15
-  signed int v19; // eax@15
   unsigned int v20; // eax@15
-  int v21; // ST28_4@15
-  int v22; // ST24_4@15
-  int v23; // eax@15
   unsigned int v24; // eax@15
   unsigned int v25; // eax@15
-  char *v26; // ST28_4@15
-  signed int v27; // eax@15
   unsigned __int8 v28; // al@15
   char *v29; // eax@16
-  unsigned int v30; // esi@18
-  SpellBuff *v31; // edx@18
-  char *v32; // edi@18
-  signed int v33; // ecx@19
-  unsigned int v34; // eax@19
   __int64 v35; // ST38_8@22
   int v36; // esi@22
-  const char *v37; // ST1C_4@22
   unsigned int v38; // eax@22
   char *v39; // eax@24
-  SpellBuff *v41; // [sp+14h] [bp-14h]@1
-  GUIFont *a2; // [sp+18h] [bp-10h]@1
-  GUIWindow *a1; // [sp+1Ch] [bp-Ch]@1
   signed int uFramesetID; // [sp+20h] [bp-8h]@9
   int uFramesetIDa; // [sp+20h] [bp-8h]@18
-  const char **v46; // [sp+24h] [bp-4h]@18
+
+  pPlayer = &pParty->pPlayers[(unsigned int)ptr_1C];
+
+  uint numActivePlayerBuffs = 0;
+
+  for (uint i = 0; i < 24; ++i)
+    if (pPlayer->pPlayerBuffs[i].uExpireTime > 0)
+      ++numActivePlayerBuffs;
 
-  v1 = this;
-  a2 = pFontComic;
-  pPlayer = &pParty->pPlayers[(unsigned int)this->ptr_1C];
-  a1 = this;
-  v3 = 0;
-  v4 = pPlayer->pPlayerBuffs;
-  v5 = 24;
-  v41 = pPlayer->pPlayerBuffs;
-  do
-  {
-    if ( (signed __int64)v4->uExpireTime > 0 )
-      ++v3;
-    ++v4;
-    --v5;
-  }
-  while ( v5 );
-  v6 = LOBYTE(pFontArrus->uFontHeight) + 162;
-  v1->uFrameHeight = v6;
-  v7 = (v3 - 1) * LOBYTE(pFontArrus->uFontHeight);
-  v8 = v1->uFrameX;
+  v6 = pFontArrus->uFontHeight + 162;
+  uFrameHeight = v6;
+  v7 = (numActivePlayerBuffs - 1) * pFontArrus->uFontHeight;
+  v8 = uFrameX;
   v9 = v6 + v7;
-  v10 = v1->uFrameWidth;
-  v1->uFrameHeight = v9;
+  v10 = uFrameWidth;
+  uFrameHeight = v9;
   v11 = v10 + v8 - 1;
-  v12 = v1->uFrameY;
-  v1->uFrameZ = v11;
-  v1->uFrameW = v9 + v12 - 1;
-  v1->DrawMessageBox(0);
-  if ( pPlayer->pConditions[16] )
-  {
+  v12 = uFrameY;
+  uFrameZ = v11;
+  uFrameW = v9 + v12 - 1;
+  DrawMessageBox(0);
+  if (pPlayer->Eradicated())
     v13 = pTexture_PlayerFaceEradicated;
-  }
+  else if (pPlayer->Dead())
+    v13 = pTexture_PlayerFaceDead;
   else
   {
-    if ( pPlayer->pConditions[14] )
-    {
-      v13 = pTexture_PlayerFaceDead;
-    }
-    else
-    {
       uFramesetID = pPlayerFrameTable->GetFrameIdBy_field0(pPlayer->uExpressionID);
       if ( !uFramesetID )
         uFramesetID = 1;
@@ -249,31 +213,26 @@
         v15 = pPlayerFrameTable->GetFrameBy_x(uFramesetID, v14);
       }
       pPlayer->field_1AA2 = v15->uTextureID - 1;
-      v13 = (Texture *)A74CEC_player_faces_minus1_indexing[v15->uTextureID + 56 * (unsigned int)v1->ptr_1C];
-    }
+      v13 = pTextures_PlayerFaces[(unsigned int)ptr_1C][v15->uTextureID];
   }
-  pRenderer->DrawTextureTransparent(v1->uFrameX + 24, v1->uFrameY + 24, v13);
+
+  pRenderer->DrawTextureTransparent(uFrameX + 24, uFrameY + 24, v13);
   v16 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
-  sprintf(pTmpBuf, "\xC" "00000\n", v16);
+  sprintf(pTmpBuf, "\xC%05d", v16);
   sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]);
   strcat(pTmpBuf, pTmpBuf2);
   strcat(pTmpBuf, "\xC" "00000\n");
-  v17 = pPlayer->GetMaxHealth();
-  v18 = pPlayer->sHealth;
-  v19 = pPlayer->GetMaxHealth();
-  v20 = sub_4178FE(pPlayer->sHealth, v19);
-  sprintf(pTmpBuf2, "%s : ", pGlobalTXT_LocalizationStrings[108], v20, v18, v17);
+  v20 = UI_GetHealthManaStringColor(pPlayer->sHealth, pPlayer->GetMaxHealth());
+  sprintf(pTmpBuf2, "%s : \x0C" "%05u%d\x0C" "00000 / %d\n", pGlobalTXT_LocalizationStrings[108],
+          v20, pPlayer->sHealth, pPlayer->GetMaxHealth());
   strcat(pTmpBuf, pTmpBuf2);
-  v21 = pPlayer->GetMaxMana();
-  v22 = pPlayer->sMana;
-  v23 = pPlayer->GetMaxMana();
-  v24 = sub_4178FE(pPlayer->sMana, v23);
-  sprintf(pTmpBuf2, "%s : ", pGlobalTXT_LocalizationStrings[212], v24, v22, v21);
+  v24 = UI_GetHealthManaStringColor(pPlayer->sMana, pPlayer->GetMaxMana());
+  sprintf(pTmpBuf2, "%s : \x0C" "%05u%d\x0C" "00000 / %d\n", pGlobalTXT_LocalizationStrings[212],
+          v24, pPlayer->sMana, pPlayer->GetMaxMana());
   strcat(pTmpBuf, pTmpBuf2);
   v25 = pPlayer->GetMajorConditionIdx();
-  v26 = aCharacterConditionNames[v25];
-  v27 = GetConditionDrawColor(v25);
-  sprintf(pTmpBuf2, "%s: ", pGlobalTXT_LocalizationStrings[47], v27, v26);
+  sprintf(pTmpBuf2, "%s: \x0C" "%05d%s\x0C" "00000\n", pGlobalTXT_LocalizationStrings[47],
+          GetConditionDrawColor(v25), aCharacterConditionNames[v25]);
   strcat(pTmpBuf, pTmpBuf2);
   v28 = pPlayer->uQuickSpell;
   if ( v28 )
@@ -282,41 +241,30 @@
     v29 = pGlobalTXT_LocalizationStrings[153];
   sprintf(pTmpBuf2, "%s: %s", pGlobalTXT_LocalizationStrings[172], v29);
   strcat(pTmpBuf, pTmpBuf2);
-  v30 = 0;
-  a1->DrawText(pFontArrus, 120, 22, 0, pTmpBuf, 0, 0, 0);
-  v31 = v41;
+  DrawText(pFontArrus, 120, 22, 0, pTmpBuf, 0, 0, 0);
+
   uFramesetIDa = 0;
-  v32 = &_4E2AD8_ui_colors[1];
-  v46 = (const char **)&aSpellNames[20];
-  do
+  for (uint i = 0; i < 24; ++i)
   {
-    v33 = HIDWORD(v31->uExpireTime);
-    v34 = LODWORD(v31->uExpireTime);
-    if ( v33 >= (signed int)v30 && (v33 > (signed int)v30 || v34 > v30) )
+    auto buff = pPlayer->pPlayerBuffs + i;
+    if (buff->uExpireTime > 0)
     {
-      v35 = __PAIR__(v33, v34) - pParty->uTimePlayed;
-      v36 = uFramesetIDa++ * LOBYTE(a2->uFontHeight) + 134;
-      v37 = *v46;
+      v35 = buff->uExpireTime - pParty->uTimePlayed;
+      v36 = uFramesetIDa++ * pFontComic->uFontHeight + 134;
       v38 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(
-              (unsigned __int8)*(v32 - 1),
-              (unsigned __int8)*v32,
-              (unsigned __int8)v32[1]);
-      a1->DrawText(a2, 52, v36, v38, v37, 0, 0, 0);
-      sub_41D20D_buff_remaining_time_string(v36, a1, v35, a2);
-      v31 = v41;
-      v30 = 0;
+              _4E2AD8_ui_colors[i * 3],
+              _4E2AD8_ui_colors[i * 3 + 1],
+              _4E2AD8_ui_colors[i * 3 + 2]);
+      DrawText(pFontComic, 52, v36, v38, aSpellNames[20 + i], 0, 0, 0);
+      sub_41D20D_buff_remaining_time_string(v36, this, v35, pFontComic);
     }
-    ++v46;
-    ++v31;
-    v32 += 3;
-    v41 = v31;
   }
-  while ( (signed int)v46 < (signed int)&dword_506978 );
+
   v39 = "";
-  if ( uFramesetIDa == v30 )
+  if ( uFramesetIDa == 0 )
     v39 = pGlobalTXT_LocalizationStrings[153];
   sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[450], v39);
-  return a1->DrawText(pFontArrus, 14, 114, v30, pTmpBuf, v30, v30, v30);
+  return DrawText(pFontArrus, 14, 114, 0, pTmpBuf, 0, 0, 0);
 }
 
 //----- (0041D08F) --------------------------------------------------------
--- a/GUIWindow.h	Sun Oct 28 22:13:41 2012 +0600
+++ b/GUIWindow.h	Mon Oct 29 00:49:33 2012 +0200
@@ -72,7 +72,7 @@
   GUIButton *GetControl(unsigned int uID);
   void Release();
   void _41D08F(int a2, int a3, int a4, int a5);
-  char _41D3B7();
+  char DrawQuickCharRecord();
   char _41D73D_draw_buff_tooltip();
 
   static GUIWindow *Create(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, enum WindowType eType, int a4, int a5);
--- a/Indoor.cpp	Sun Oct 28 22:13:41 2012 +0600
+++ b/Indoor.cpp	Mon Oct 29 00:49:33 2012 +0200
@@ -502,8 +502,8 @@
       static_vertices_F7C228[i].vWorldPosition.x = pIndoor->pVertices[pFace->pVertexIDs[i]].x;
       static_vertices_F7C228[i].vWorldPosition.y = pIndoor->pVertices[pFace->pVertexIDs[i]].y;
       static_vertices_F7C228[i].vWorldPosition.z = pIndoor->pVertices[pFace->pVertexIDs[i]].z;
-      static_vertices_F7C228[i].u = (signed)pFace->pVertexUIDs[i];
-      static_vertices_F7C228[i].v = (signed)pFace->pVertexUIDs[i];
+      static_vertices_F7C228[i].u = (signed short)pFace->pVertexUIDs[i];
+      static_vertices_F7C228[i].v = (signed short)pFace->pVertexUIDs[i];
     }
 
     if (!pVertices ||
@@ -2568,10 +2568,10 @@
     pFace->pZInterceptDisplacements = ptr_2AC + j;
 
     j += pFace->uNumVertices + 1;
-    pFace->pVertexUIDs = ptr_2AC + j;
+    pFace->pVertexUIDs = (__int16 *)(ptr_2AC + j);
 
     j += pFace->uNumVertices + 1;
-    pFace->pVertexVIDs = ptr_2AC + j;
+    pFace->pVertexVIDs = (__int16 *)(ptr_2AC + j);
 
     j += pFace->uNumVertices + 1;
       /*v93 = &pFaces[v92];
@@ -3543,7 +3543,7 @@
   int v44; // ecx@36
   int v45; // edi@36
   int v46; // ecx@36
-  unsigned __int16 *v47; // edx@44
+  __int16 *v47; // edx@44
   int v48; // ecx@44
   unsigned int v49; // ecx@46
   unsigned __int16 v50; // ax@48
--- a/Indoor.h	Sun Oct 28 22:13:41 2012 +0600
+++ b/Indoor.h	Mon Oct 29 00:49:33 2012 +0200
@@ -297,11 +297,11 @@
   unsigned __int16 *pXInterceptDisplacements;
   unsigned __int16 *pYInterceptDisplacements;
   unsigned __int16 *pZInterceptDisplacements;
-  unsigned __int16 *pVertexUIDs;
-  unsigned __int16 *pVertexVIDs;
-  unsigned __int16 uFaceExtraID;
-  unsigned __int16 uBitmapID;
-  unsigned __int16 uSectorID;
+  signed __int16   *pVertexUIDs;
+  signed __int16   *pVertexVIDs;
+  unsigned __int16  uFaceExtraID;
+  unsigned __int16  uBitmapID;
+  unsigned __int16  uSectorID;
   __int16 uBackSectorID;
   struct BBox_short_ pBounding;
   PolygonType uPolygonType;
--- a/Player.h	Sun Oct 28 22:13:41 2012 +0600
+++ b/Player.h	Mon Oct 29 00:49:33 2012 +0200
@@ -93,13 +93,16 @@
 {
   PLAYER_CLASS_KNIGHT = 0x0,
   PLAYER_CLASS_THEIF = 0x4,
+  PLAYER_CLASS_BOUNTY_HUNTER = 0x7,
   PLAYER_CLASS_MONK = 0x8,
   PLAYER_CLASS_PALADIN = 0xC,
   PLAYER_CLASS_SHOOTER = 0x10,
   PLAYER_CLASS_RANGER = 0x14,
   PLAYER_CLASS_CLERIC = 0x18,
+  PLAYER_CLASS_PRIEST_OF_MOON = 0x1B,
   PLAYER_CLASS_DRUID = 0x1C,
   PLAYER_CLASS_SORCERER = 0x20,
+  PLAYER_CLASS_LICH = 0x23,
 };
 
 
--- a/mm7_1.cpp	Sun Oct 28 22:13:41 2012 +0600
+++ b/mm7_1.cpp	Mon Oct 29 00:49:33 2012 +0200
@@ -1054,7 +1054,7 @@
         v0);
     sprintf(pTmpBuf, "%d", pPlayer->sHealth);
     v8 = pPlayer->GetMaxHealth();
-    v9 = sub_4178FE(pPlayer->sHealth, v8);
+    v9 = UI_GetHealthManaStringColor(pPlayer->sHealth, v8);
     pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v7, v9, pTmpBuf, 84, v0);
     v10 = v45 + v7;
     if ( v43 == v0 )
@@ -1068,7 +1068,7 @@
         v0);
     sprintf(pTmpBuf, "%d", pPlayer->sMana);
     v11 = pPlayer->GetMaxMana();
-    v12 = sub_4178FE(pPlayer->sMana, v11);
+    v12 = UI_GetHealthManaStringColor(pPlayer->sMana, v11);
     pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v10, v12, pTmpBuf, 84, v0);
     v13 = v45 + v10;
     if ( v43 == v0 )
@@ -1085,7 +1085,7 @@
     v15 = v0;
     v16 = pPlayer->GetBaseAC();
     v17 = pPlayer->GetActualAC();
-    v18 = sub_4178FE(v17, v16);
+    v18 = UI_GetHealthManaStringColor(v17, v16);
     pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v13, v18, pTmpBuf, 84, v15);
     v0 = 0;
     v19 = v45 + v13;
--- a/mm7_2.cpp	Sun Oct 28 22:13:41 2012 +0600
+++ b/mm7_2.cpp	Mon Oct 29 00:49:33 2012 +0200
@@ -9311,7 +9311,7 @@
 }
 
 //----- (00452C49) --------------------------------------------------------
-void __cdecl InitializeGameText()
+void InitializeGameText()
 {
   //char *v0; // ebx@1
   char *v1; // eax@3
@@ -12475,16 +12475,16 @@
 LABEL_240:
           if ( pVideoPlayer->pVideoFrame.pPixels != (unsigned __int16 *)v31 )
             pVideoPlayer->bStopBeforeSchedule = 1;
-          if ( pAsyncMouse == (void *)v31 )
+          if (!pAsyncMouse)
             pMouse->SetMouseClick((unsigned __int16)lParam, lParam >> 16);
-          if ( pGame != (Game *)v31 )
-          {
-            if ( pAsyncMouse != (void *)v31 )
+          if (pGame)
+          {
+            if (pAsyncMouse)
               goto _def_wnd_proc;
             v33 = GetPickDepth();
             pGame->PickMouse(v33, (unsigned __int16)lParam, lParam >> 16, v31, &stru_F93E30, &a4);
           }
-          if ( pAsyncMouse == (void *)v31 )
+          if (!pAsyncMouse)
           {
             sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(0);
             return DefWindowProcA(hWnd, Msg, wParam, v4);
--- a/mm7_5.cpp	Sun Oct 28 22:13:41 2012 +0600
+++ b/mm7_5.cpp	Mon Oct 29 00:49:33 2012 +0200
@@ -15896,6 +15896,7 @@
   {
     if ( pCurrentScreen == 10 )
     {
+      __debugbreak();
       if ( !pPlayers[uActiveCharacter]->CanAct() )
       {
         sprintfex(
@@ -15981,8 +15982,9 @@
         a1.uFrameY = pY + 5;
         goto LABEL_41;
       }
-      if ( (GetCurrentMenuID() & 0x80000000u) == 0 )
+      if (GetCurrentMenuID() > 0)
         goto LABEL_132;
+
       if ( (signed int)pY > (signed int)pViewport->uViewportW )
       {
         a1.ptr_1C = (void *)((signed int)pX / 118);
@@ -15994,7 +15996,7 @@
           a1.uFrameX = 38;
           a1.uFrameY = 60;
           pAudioPlayer->StopChannels(-1, -1);
-          a1._41D3B7();
+          a1.DrawQuickCharRecord();
         }
         goto LABEL_132;
       }
@@ -16401,7 +16403,7 @@
 }
 
 //----- (004178FE) --------------------------------------------------------
-unsigned int __fastcall sub_4178FE(signed int a1, signed int a2)
+unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2)
 {
   unsigned __int16 v2; // dx@2
   unsigned __int16 v3; // cx@2
@@ -17166,7 +17168,7 @@
   v6 = pPlayer->GetActualMight();
   v7 = pPlayer->GetBaseStrength();
   v8 = pPlayer->GetActualMight();
-  v9 = sub_4178FE(v8, v7);
+  v9 = UI_GetHealthManaStringColor(v8, v7);
   sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[144], v9, v6, v5);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0);
   v10 = LOBYTE(pFontArrus->uFontHeight) + 51;
@@ -17174,7 +17176,7 @@
   v12 = pPlayer->GetActualIntelligence();
   v13 = pPlayer->GetBaseIntelligence();
   v14 = pPlayer->GetActualIntelligence();
-  v15 = sub_4178FE(v14, v13);
+  v15 = UI_GetHealthManaStringColor(v14, v13);
   sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[116], v15, v12, v11);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
   v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2;
@@ -17182,7 +17184,7 @@
   v18 = pPlayer->GetActualWillpower();
   v19 = pPlayer->GetBaseWillpower();
   v20 = pPlayer->GetActualWillpower();
-  v21 = sub_4178FE(v20, v19);
+  v21 = UI_GetHealthManaStringColor(v20, v19);
   sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[163], v21, v18, v17);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0);
   v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2;
@@ -17190,7 +17192,7 @@
   v24 = pPlayer->GetActualEndurance();
   v25 = pPlayer->GetBaseEndurance();
   v26 = pPlayer->GetActualEndurance();
-  v27 = sub_4178FE(v26, v25);
+  v27 = UI_GetHealthManaStringColor(v26, v25);
   sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[75], v27, v24, v23);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0);
   v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2;
@@ -17198,7 +17200,7 @@
   v30 = pPlayer->GetActualAccuracy();
   v31 = pPlayer->GetBaseAccuracy();
   v32 = pPlayer->GetActualAccuracy();
-  v33 = sub_4178FE(v32, v31);
+  v33 = UI_GetHealthManaStringColor(v32, v31);
   sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[1], v33, v30, v29);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0);
   v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2;
@@ -17206,7 +17208,7 @@
   v36 = pPlayer->GetActualSpeed();
   v37 = pPlayer->GetBaseSpeed();
   v38 = pPlayer->GetActualSpeed();
-  v39 = sub_4178FE(v38, v37);
+  v39 = UI_GetHealthManaStringColor(v38, v37);
   sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[211], v39, v36, v35);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0);
   v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2;
@@ -17214,7 +17216,7 @@
   v42 = pPlayer->GetActualLuck();
   v43 = pPlayer->GetBaseLuck();
   v44 = pPlayer->GetActualLuck();
-  v45 = sub_4178FE(v44, v43);
+  v45 = UI_GetHealthManaStringColor(v44, v43);
   sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[136], v45, v42, v41);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0);
   a2 = "%s";
@@ -17224,7 +17226,7 @@
   v47 = pPlayer->GetMaxHealth();
   v48 = pPlayer->sHealth;
   v49 = pPlayer->GetMaxHealth();
-  v50 = sub_4178FE(pPlayer->sHealth, v49);
+  v50 = UI_GetHealthManaStringColor(pPlayer->sHealth, v49);
   sprintfex(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0);
   a2a = "%s";
@@ -17234,7 +17236,7 @@
   v51 = pPlayer->GetMaxMana();
   v52 = pPlayer->sMana;
   v53 = pPlayer->GetMaxMana();
-  v54 = sub_4178FE(pPlayer->sMana, v53);
+  v54 = UI_GetHealthManaStringColor(pPlayer->sMana, v53);
   sprintfex(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, v52, v51);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, uY, 0, pTmpBuf, 0, 0, 0);
   v55 = LOBYTE(pFontArrus->uFontHeight) + uY - 2;
@@ -17242,7 +17244,7 @@
   v57 = pPlayer->GetActualAC();
   v58 = pPlayer->GetBaseAC();
   v59 = pPlayer->GetActualAC();
-  v60 = sub_4178FE(v59, v58);
+  v60 = UI_GetHealthManaStringColor(v59, v58);
   sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[12], v60, v57, v56);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0);
   v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2;
@@ -17263,7 +17265,7 @@
   v69 = pPlayer->GetActualAge();
   v70 = pPlayer->GetBaseAge();
   v71 = pPlayer->GetActualAge();
-  v72 = sub_4178FE(v71, v70);
+  v72 = UI_GetHealthManaStringColor(v71, v70);
   sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[5], v72, v69, v68);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0);
   a2b = "%s";
@@ -17274,7 +17276,7 @@
   v74 = pPlayer->GetActualLevel();
   v75 = pPlayer->GetBaseLevel();
   v76 = pPlayer->GetActualLevel();
-  v77 = sub_4178FE(v76, v75);
+  v77 = UI_GetHealthManaStringColor(v76, v75);
   sprintfex(pTmpBuf, a2b, pGlobalTXT_LocalizationStrings[131], v77, v74, v73);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYa, 0, pTmpBuf, 0, 0, 0);
   uYb = uYa + LOBYTE(pFontArrus->uFontHeight) - 2;
@@ -17310,7 +17312,7 @@
   if ( v131 > 99 || v90 > 99 )
     a2c = format_4E2E68;
   v91 = v90;
-  v92 = sub_4178FE(v131, v90);
+  v92 = UI_GetHealthManaStringColor(v131, v90);
   sprintfex(pTmpBuf, a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v91);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYc, 0, pTmpBuf, 0, 0, 0);
   a2d = format_4E2E10;
@@ -17320,7 +17322,7 @@
   if ( v132 > 99 || v93 > 99 )
     a2d = format_4E2E68;
   v94 = v93;
-  v95 = sub_4178FE(v132, v93);
+  v95 = UI_GetHealthManaStringColor(v132, v93);
   sprintfex(pTmpBuf, a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v94);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYd, 0, pTmpBuf, 0, 0, 0);
   a2e = format_4E2E10;
@@ -17330,7 +17332,7 @@
   if ( v133 > 99 || v96 > 99 )
     a2e = format_4E2E68;
   v97 = v96;
-  v98 = sub_4178FE(v133, v96);
+  v98 = UI_GetHealthManaStringColor(v133, v96);
   sprintfex(pTmpBuf, a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v97);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYe, 0, pTmpBuf, 0, 0, 0);
   a2f = format_4E2E10;
@@ -17340,7 +17342,7 @@
   if ( v134 > 99 )
     a2f = format_4E2E68;
   v100 = v99;
-  v101 = sub_4178FE(v134, v99);
+  v101 = UI_GetHealthManaStringColor(v134, v99);
   sprintfex(pTmpBuf, a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v100);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYf, 0, pTmpBuf, 0, 0, 0);
   a2g = format_4E2E10;
@@ -17351,12 +17353,12 @@
   if ( v135 > 99 || v102 > 99 )
     a2g = format_4E2E68;
   v103 = v102;
-  v104 = sub_4178FE(v135, v102);
+  v104 = UI_GetHealthManaStringColor(v135, v102);
   sprintfex(pTmpBuf, a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v103);
   if ( pPlayer->uClass == 35 && v137 == 200 )
   {
     v105 = pGlobalTXT_LocalizationStrings[625];
-    v106 = sub_4178FE(v135, 200);
+    v106 = UI_GetHealthManaStringColor(v135, 200);
     sprintfex(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, v105);
   }
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYg, 0, pTmpBuf, 0, 0, 0);
@@ -17368,12 +17370,12 @@
   if ( v136 > 99 || v107 > 99 )
     a2h = format_4E2E68;
   v108 = v107;
-  v109 = sub_4178FE(v136, v107);
+  v109 = UI_GetHealthManaStringColor(v136, v107);
   sprintfex(pTmpBuf, a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v108);
   if ( pPlayer->uClass == 35 && v138 == 200 )
   {
     v110 = pGlobalTXT_LocalizationStrings[625];
-    v111 = sub_4178FE(v136, 200);
+    v111 = UI_GetHealthManaStringColor(v136, 200);
     sprintfex(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, v110);
   }
   return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYh, 0, pTmpBuf, 0, 0, 0);
--- a/mm7_6.cpp	Sun Oct 28 22:13:41 2012 +0600
+++ b/mm7_6.cpp	Mon Oct 29 00:49:33 2012 +0200
@@ -8922,7 +8922,6 @@
         switch ( inputAction )
         {
           case INPUT_MoveForward:
-            __debugbreak();
             if ( pCurrentScreen )
               break;
             if (!pParty->bTurnBasedModeOn)
--- a/mm7_data.cpp	Sun Oct 28 22:13:41 2012 +0600
+++ b/mm7_data.cpp	Mon Oct 29 00:49:33 2012 +0200
@@ -2492,7 +2492,6 @@
 struct Texture *pTexture_PlayerFaceMask;
 struct Texture *pTexture_PlayerFaceEradicated;
 struct Texture *pTexture_PlayerFaceDead;
-int A74CEC_player_faces_minus1_indexing[777]; // weak
 struct Texture *pTextures_PlayerFaces[4][56];
 int dword_A75070; // weak
 struct Player *pPlayers[5];
--- a/mm7_data.h	Sun Oct 28 22:13:41 2012 +0600
+++ b/mm7_data.h	Mon Oct 29 00:49:33 2012 +0200
@@ -2445,7 +2445,6 @@
 extern struct Texture *pTexture_PlayerFaceMask;
 extern struct Texture *pTexture_PlayerFaceEradicated;
 extern struct Texture *pTexture_PlayerFaceDead;
-extern int A74CEC_player_faces_minus1_indexing[]; // weak
 extern struct Texture *pTextures_PlayerFaces[4][56];
 extern int dword_A75070; // weak
 extern struct Player *pPlayers[5];
@@ -2641,7 +2640,7 @@
 void __thiscall sub_417871(int *pXY);
 void __cdecl sub_4178C4();
 void __cdecl sub_4178E1();
-unsigned int __fastcall sub_4178FE(signed int a1, signed int a2);
+unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2);
 signed int __thiscall GetConditionDrawColor(unsigned int uConditionIdx); // idb
 char __fastcall sub_4179BC_draw_tooltip(const char *a1, const char *a2); // idb
 unsigned int __fastcall sub_417AD4(unsigned int uPlayerClass, enum PLAYER_SKILL_TYPE uPlayerSkillType, signed int a3);