changeset 57:8af333180755

Слияние
author Ritor1
date Mon, 21 Jan 2013 20:22:10 +0600
parents 7082a3f95e7c (current diff) 5629105aa178 (diff)
children 764abc86ce90
files mm7_5.cpp
diffstat 9 files changed, 108 insertions(+), 110 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Mon Jan 21 20:21:45 2013 +0600
+++ b/Actor.cpp	Mon Jan 21 20:22:10 2013 +0600
@@ -2489,7 +2489,7 @@
 
   v1 = uActiveCharacter;
   v7 = uActorID;
-  pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552];
+  pPlayer = &pParty->pPlayers[uActiveCharacter-1];//(Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552];
   result = pPlayer->CanAct();
   if ( result )
   {
--- a/GUIFont.cpp	Mon Jan 21 20:21:45 2013 +0600
+++ b/GUIFont.cpp	Mon Jan 21 20:22:10 2013 +0600
@@ -97,7 +97,7 @@
 void GUIFont::DrawTextLine(unsigned int uDefaultColor, signed int uX, signed int uY, const char *Str, int a6)
 {
   size_t v6; // ebx@1
-  GUIFont *v7; // esi@1
+  GUIFont *pFont; // esi@1
   signed int v8; // edi@3
   unsigned __int8 v9; // cl@4
   int v10; // eax@5
@@ -116,7 +116,7 @@
 
   v6 = 0;
   v21 = uDefaultColor;
-  v7 = this;
+  pFont = this;
   if ( Str )
   {
     v21 = ui_current_text_color;
@@ -126,7 +126,7 @@
       v8 = uX;
       do
       {
-        if ( v7->IsCharValid(v9 = Str[v6]) )
+        if ( pFont->IsCharValid(v9 = Str[v6]) )
         {
           v10 = v9;
           v11 = v9 - 9;
@@ -141,20 +141,20 @@
               if ( v13 != 1 )
               {
                 v14 = 3 * v10 + 9;
-                v15 = *((int *)&v7->cFirstChar + v14);
-                uXa = *((int *)&v7->cFirstChar + v14);
+                v15 = *((int *)&pFont->cFirstChar + v14);
+                uXa = *((int *)&pFont->cFirstChar + v14);
                 if ( v15 )
                 {
                   if ( (signed int)v6 > 0 )
-                    v8 += v7->pMetrics[v10].uLeftSpacing;
+                    v8 += pFont->pMetrics[v10].uLeftSpacing;
                   v16 = v21;
-                  v17 = (unsigned __int8 *)((char *)&v7[1] + v7->field_C20[v10]);
+                  v17 = (unsigned __int8 *)((char *)&pFont[1] + pFont->field_C20[v10]);
                   if ( !v21 )
                     v16 = -1;
-                  pRenderer->DrawText(v8, uY, v17, v15, LOBYTE(v7->uFontHeight), v7->pFontPalettes[0], v16, 0);
+                  pRenderer->DrawText(v8, uY, v17, v15, pFont->uFontHeight, pFont->pFontPalettes[0], v16, 0);
                   v8 += uXa;
                   if ( (signed int)v6 < (signed int)v20 )
-                    v8 += v7->pMetrics[(unsigned __int8)Str[v6]].uRightSpacing;
+                    v8 += pFont->pMetrics[(unsigned __int8)Str[v6]].uRightSpacing;
                 }
               }
             }
--- a/GameUIs.cpp	Mon Jan 21 20:21:45 2013 +0600
+++ b/GameUIs.cpp	Mon Jan 21 20:22:10 2013 +0600
@@ -98,7 +98,7 @@
     if ( v4 )
       fread(&pSavegameHeader[i], 0x64, 1, v4);
     if ( !_strcmpi(pSavegameList->pSavesNames[i], pGlobalTXT_LocalizationStrings[613]) )// "AutoSave.MM7"
-      strcpy(pSavegameList->pSavesNames[i], pGlobalTXT_LocalizationStrings[16]);// "Autosave"
+      strcpy(pSavegameHeader[i].pName, pGlobalTXT_LocalizationStrings[16]);// "Autosave"
     v5 = pLODFile.FindContainer("image.pcx", true);
     if ( !v5 )
     {
--- a/Player.cpp	Mon Jan 21 20:21:45 2013 +0600
+++ b/Player.cpp	Mon Jan 21 20:22:10 2013 +0600
@@ -604,7 +604,7 @@
   v4 = a2;//102
   v5 = 0;
   pSoundId = 0;
-  v6 = &SoundSetAction[8 * v4];//byte_4ED280 &byte_4ED3D8[4 * v4]
+  v6 = &SoundSetAction[8 * v4];//byte_4ED280 &byte_4ED3D8[4 * v4] ???
   if ( uVoicesVolumeMultiplier )
   {
     v7 = 0;
@@ -6959,7 +6959,7 @@
   unsigned int thisa; // [sp+28h] [bp-4h]@22
 
   thisb = this;
-  v3 = (Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552];
+  v3 = &pParty->pPlayers[a2-1];//(Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552];
   v73 = 1;
   if ( pParty->bTurnBasedModeOn == 1 && (pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3) )
     return;
@@ -6987,7 +6987,7 @@
         }
         v69 = 2;
 LABEL_111:
-        ((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->Heal(v69);
+        pParty->pPlayers[a2-1].Heal(v69);//((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->Heal(v69);
       }
 LABEL_112:
       v3->PlaySound(36, 0);
@@ -7160,7 +7160,7 @@
         v33 = HIDWORD(v3->pConditions[15]);
         v34 = LODWORD(v3->pConditions[16]);
         v35 = HIDWORD(v3->pConditions[16]);
-        memset(&stru_AA1058[3].pSounds[6972 * a2 + 40552], 0, 0xA0u);
+        memset(&pParty->pPlayers[a2-1],0,0xA0u);//memset(&stru_AA1058[3].pSounds[6972 * a2 + 40552], 0, 0xA0u);
         HIDWORD(v3->pConditions[14]) = v31;
         LODWORD(v3->pConditions[15]) = v32;
         HIDWORD(v3->pConditions[15]) = v33;
@@ -7531,7 +7531,7 @@
         pMouse->RemoveHoldingItem();
         return;
       }
-      if ( ((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
+      if ( pParty->pPlayers[a2-1].CanAct() )//if ( ((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
       {
         sub_467F48(pParty->pPickedItem.uItemID);
         v65 = 0;
@@ -7575,7 +7575,7 @@
       pAudioPlayer->PlaySound(v37, v39, v41, v43, v45, v48, v52, v61);
       return;
     }
-    if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
+    if ( !pParty->pPlayers[a2-1].CanAct() )//if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
     {
       v66 = aCharacterConditionNames[v3->GetMajorConditionIdx()];
       v57 = pGlobalTXT_LocalizationStrings[382];
@@ -7687,7 +7687,7 @@
   }
   if ( pCurrentScreen == 23 )
     return;
-  if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
+  if ( !pParty->pPlayers[a2-1].CanAct() )//if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
     goto LABEL_89;
   if ( bUnderwater == 1 )
   {
--- a/mm7_1.cpp	Mon Jan 21 20:21:45 2013 +0600
+++ b/mm7_1.cpp	Mon Jan 21 20:22:10 2013 +0600
@@ -206,7 +206,7 @@
   v85 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem;
   v86 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0);
   v79 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
-  pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * v1 + 40552];
+  pPlayer = &pParty->pPlayers[v1-1];//(Player *)&stru_AA1058[3].pSounds[6972 * v1 + 40552];
   v3 = pIcons_LOD->LoadTexture("fr_skill", TEXTURE_16BIT_PALETTE);
   pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? (int)&pIcons_LOD->pTextures[v3] : 0));
   v4 = v79;
@@ -214,7 +214,7 @@
     v4 = 65535;
   sprintf(
     pTmpBuf,
-    "%s ",
+    "%s \f%05d%s\f00000\r177%s: \f%05d%d\f00000",
     pGlobalTXT_LocalizationStrings[206],        // Skills for
     a5,
     pPlayer->pName,
@@ -409,7 +409,7 @@
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 248, v27, a5, pTmpBuf, 0, 0, 0);
   v28 = pGUIWindow_CurrentMenu;
   v72 = 0;
-  v82 = dword_4E2A18;
+  v82 = pArmorSkills;
   do
   {
     v29 = 0;
@@ -623,8 +623,8 @@
   sprintf(
     Source,
     pGlobalTXT_LocalizationStrings[429],
-    &stru_AA1058[3].pSounds[6972 * v1 + 40720],
-    pClassNames[stru_AA1058[3].pSounds[6972 * v1 + 40737]]);
+	&pParty->pPlayers[v1-1].pName,//&stru_AA1058[3].pSounds[6972 * v1 + 40720],
+	&pClassNames[pParty->pPlayers[v1-1].uClass]);//&pClassNames[stru_AA1058[3].pSounds[6972 * v1 + 40737]]);
   strcat(pTmpBuf, Source);
   strcat(pTmpBuf, "\xC" "00000");
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0);
--- a/mm7_5.cpp	Mon Jan 21 20:21:45 2013 +0600
+++ b/mm7_5.cpp	Mon Jan 21 20:22:10 2013 +0600
@@ -546,8 +546,8 @@
           else
           {
             pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu);
-            if ( strcmp((const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pGlobalTXT_LocalizationStrings[72]) )// "Empty"
-              strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot);
+            if ( strcmp((const char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], pGlobalTXT_LocalizationStrings[72]) )// "Empty"
+              strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader[uLoadGameUI_SelectedSlot]);
             pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer);
           }
           continue;
@@ -5651,9 +5651,9 @@
   int v40; // eax@77
   int v41; // eax@77
   int v42; // eax@78
-  char *v43; // eax@81
+  Player *v43; // eax@81
   Actor *v44; // esi@82
-  char *v45; // edi@84
+  Player *v45; // edi@84
   unsigned __int16 v46; // ax@84
   int v47; // ebx@105
   int v48; // eax@107
@@ -5900,18 +5900,18 @@
     v44 = &pActors[v39];
     if ( a4 == -1 )
       a4 = stru_50C198.which_player_would_attack(v44);
-    v45 = (char *)&pParty->pPlayers[a4];
+    v45 = &pParty->pPlayers[a4];
     v77 = Actor::_43B3E0_CalcDamage(v44, v74);
     v46 = v37->uItemType;
     if ( v37->uItemType == 545 )
     {
-      LOBYTE(v51) = ((Player *)v45)->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
+      LOBYTE(v51) = v45->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
       v52 = v51;
       if ( (signed int)SkillToMastery(v51) >= 4 && rand() % 100 < (v52 & 0x3F) )
       {
-        sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[637], v45 + 168);
+		  sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[637], v45->pName);
         ShowStatusBarString(pTmpBuf, 2u);
-        ((Player *)v45)->PlaySound(6, 0);
+        v45->PlaySound(6, 0);
         return;
       }
     }
@@ -5929,29 +5929,29 @@
         && v46 != 540 )
         goto LABEL_115;
     }
-    if ( !stru_50C198.ActorHitOrMiss(v44, (Player *)v45) )
+    if ( !stru_50C198.ActorHitOrMiss(v44, v45) )
       return;
-    if ( *((_QWORD *)v45 + 782) > 0i64 )
+    if ( (signed __int64)v45->pPlayerBuffs[13].uExpireTime > 0 )
       v77 >>= 1;
-    if ( ((Player *)v45)->HasEnchantedItemEquipped(36) )
+    if ( v45->HasEnchantedItemEquipped(36) )
       v77 >>= 1;
-    if ( ((Player *)v45)->HasEnchantedItemEquipped(69) )
+    if ( v45->HasEnchantedItemEquipped(69) )
       v77 >>= 1;
-    if ( ((Player *)v45)->HasItemEquipped(EQUIP_ARMOUR)
-      && *(int *)&v45[36 * *((int *)v45 + 1621) + 496] == 504 )
+    if ( v45->HasItemEquipped(EQUIP_ARMOUR)
+		&& *(_DWORD *)&v45->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v45->pEquipment.uBody + 5] == 504 )
       v77 >>= 1;
     v75 = 0;
-    v47 = (int)(v45 + 6472);
+	v47 = (int)&v45->pEquipment;
     do
     {
-      if ( ((Player *)v45)->HasItemEquipped((ITEM_EQUIP_TYPE)v75) )
+      if ( v45->HasItemEquipped((ITEM_EQUIP_TYPE)v75) )
       {
         v48 = *(int *)&v45[36 * *(int *)v47 + 496];
         if ( v48 == 520 )
           v77 >>= 1;
         if ( v48 == 531 )
           v77 >>= 1;
-        if ( ((Player *)v45)->GetEquippedItemEquipType(v75) == 4 && SkillToMastery(*((short *)v45 + 140)) == 4 )
+        if ( v45->GetEquippedItemEquipType(v75) == 4 && SkillToMastery(v45->pActiveSkills[8]) == 4 )
           v77 >>= 1;
       }
       ++v75;
@@ -5990,10 +5990,10 @@
 LABEL_133:
         if ( !(dword_6BE368_debug_settings_2 & 0x10) )
         {
-          v54 = ((Player *)v45)->ReceiveDamage(v77, v50);
-          if ( *((int *)v45 + 1553) >= 0 )
-          {
-            if ( *((int *)v45 + 1553) > 0 || *((int *)v45 + 1552) )
+          v54 = v45->ReceiveDamage(v77, v50);
+          if ( SHIDWORD(v45->pPlayerBuffs[10].uExpireTime) >= 0 )
+          {
+            if ( SHIDWORD(v45->pPlayerBuffs[10].uExpireTime) > 0 || LODWORD(v45->pPlayerBuffs[10].uExpireTime) )
             {
               v55 = v44->uAIState;
               if ( v55 != 5 )
@@ -6040,7 +6040,7 @@
                       v64 = 51;
                       if ( rand() % 100 < 20 )
                         v64 = ((signed int)v44->pMonsterInfo.uHP >= 100) + 1;
-                      ((Player *)v45)->PlaySound(v64, 0);
+                      v45->PlaySound(v64, 0);
                     }
                   }
                 }
@@ -6052,14 +6052,14 @@
           && !(dword_6BE368_debug_settings_2 & 0x10)
           && v44->pMonsterInfo.uSpecialAttack
           && rand() % 100 < v44->pMonsterInfo.uLevel * v44->pMonsterInfo.uSpecialAttackType )
-          ((Player *)v45)->_48DCF6(v44->pMonsterInfo.uSpecialAttack, v44);
+          v45->_48DCF6(v44->pMonsterInfo.uSpecialAttack, v44);
         if ( !pParty->bTurnBasedModeOn )
         {
-          v65 = ((Player *)v45)->GetActualEndurance();
-          v66 = (double)(20 - ((Player *)v45)->_48EA1B_get_static_effect(v65))
+          v65 = v45->GetActualEndurance();
+          v66 = (double)(20 - v45->_48EA1B_get_static_effect(v65))
               * flt_6BE3A4_debug_recmod1
               * 2.133333333333333;
-          ((Player *)v45)->SetRecoveryTime((signed __int64)v66);
+          v45->SetRecoveryTime((signed __int64)v66);
         }
         return;
       }
@@ -6073,12 +6073,12 @@
 LABEL_80:
   if ( a4 != -1 )
   {
-    v43 = (char *)&pParty->pPlayers[a4];
+    v43 = &pParty->pPlayers[a4];
 LABEL_168:
-    a4b = (Player *)v43;
+    a4b = v43;
     if ( v38 != 4 || v37->field_48 != 100 )
     {
-      v70 = ((Player *)v43)->GetMaxHealth();
+      v70 = v43->GetMaxHealth();
       v68 = _43AFE3_calc_spell_damage(v37->field_48, v37->field_4C, v37->field_50, v70);
       v69 = LOBYTE(pSpellStats->pInfos[v37->field_48].uSchool);
     }
@@ -6110,7 +6110,7 @@
   while ( a4a <= 4 );
   if ( v74 )
   {
-    v43 = &stru_AA1058[3].pSounds[6972 * *(&v72 + rand() % v74) + 40552];
+    v43 = &pParty->pPlayers[*(&v72+rand()%v74)-1];//&stru_AA1058[3].pSounds[6972 * *(&v72 + rand() % v74) + 40552];
     goto LABEL_168;
   }
 }
@@ -16446,9 +16446,9 @@
     pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1;
     pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1;
     pColor = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFF, 0xFF, 0x9B);
-    sprintf(pTmpBuf, pStr, pColor, format_4E2D80);//sprintfex   -   sprintfex(pTmpBuf, format_4E2D80, v25, pStr)
-    pWindow.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf, 3);
-    pWindow.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, pHint, 0, 0, 0);
+    sprintf(pTmpBuf, format_4E2D80, pColor, pStr);
+    pWindow.DrawText(pFontCreate, 0, 0, 0, pTmpBuf, 3, 0, 0); //DrawTitleText
+    pWindow.DrawText(pFontSmallnum, 1, pFontLucida->uFontHeight, 0, pHint, 0, 0, 0);
   }
 LABEL_132:
   dword_507BF0_is_there_popup_onscreen = 1;
@@ -17378,18 +17378,18 @@
   int v137; // [sp+1Ch] [bp-4h]@27
   int v138; // [sp+1Ch] [bp-4h]@33
 
-  pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * uPlayerID + 40552];
+  pPlayer = &pParty->pPlayers[uPlayerID-1];//(Player *)&stru_AA1058[3].pSounds[6972 * uPlayerID + 40552];
   v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE);
-  pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0));
+  pRenderer->DrawTextureIndexed(8, 8, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0));
   v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
   sprintf(pTmpBuf, format_4E2DC8, v3);
-  sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]);
+  sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]);//^Pi[%s] %s
   strcat(pTmpBuf, pTmpBuf2);
   if ( pPlayer->uSkillPoints )
     v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
   else
     v4 = 0xFFFFu;
-  sprintf(pTmpBuf2, "\xC" "00000\xD" "180%s: \xC%05d%d\xC" "00000\n\n\n", pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints);
+  sprintf(pTmpBuf2, "\xC" "00000\xD" "180%s: \xC%05d%d\xC" "00000\n\n\n", pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints);//Skill points
   strcat(pTmpBuf, pTmpBuf2);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0);
   v5 = pPlayer->GetBaseStrength();
@@ -17397,7 +17397,7 @@
   v7 = pPlayer->GetBaseStrength();
   v8 = pPlayer->GetActualMight();
   v9 = UI_GetHealthManaStringColor(v8, v7);
-  sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[144], v9, v6, v5);
+  sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144], v9, v6, v5);//Might
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0);
   v10 = LOBYTE(pFontArrus->uFontHeight) + 51;
   v11 = pPlayer->GetBaseIntelligence();
@@ -17405,7 +17405,7 @@
   v13 = pPlayer->GetBaseIntelligence();
   v14 = pPlayer->GetActualIntelligence();
   v15 = UI_GetHealthManaStringColor(v14, v13);
-  sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[116], v15, v12, v11);
+  sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116], v15, v12, v11);//Intellect
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
   v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2;
   v17 = pPlayer->GetBaseWillpower();
@@ -17413,7 +17413,7 @@
   v19 = pPlayer->GetBaseWillpower();
   v20 = pPlayer->GetActualWillpower();
   v21 = UI_GetHealthManaStringColor(v20, v19);
-  sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[163], v21, v18, v17);
+  sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163], v21, v18, v17);//
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0);
   v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2;
   v23 = pPlayer->GetBaseEndurance();
@@ -17421,7 +17421,7 @@
   v25 = pPlayer->GetBaseEndurance();
   v26 = pPlayer->GetActualEndurance();
   v27 = UI_GetHealthManaStringColor(v26, v25);
-  sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[75], v27, v24, v23);
+  sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75], v27, v24, v23);//
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0);
   v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2;
   v29 = pPlayer->GetBaseAccuracy();
@@ -17429,7 +17429,7 @@
   v31 = pPlayer->GetBaseAccuracy();
   v32 = pPlayer->GetActualAccuracy();
   v33 = UI_GetHealthManaStringColor(v32, v31);
-  sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[1], v33, v30, v29);
+  sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1], v33, v30, v29);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0);
   v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2;
   v35 = pPlayer->GetBaseSpeed();
@@ -17437,7 +17437,7 @@
   v37 = pPlayer->GetBaseSpeed();
   v38 = pPlayer->GetActualSpeed();
   v39 = UI_GetHealthManaStringColor(v38, v37);
-  sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[211], v39, v36, v35);
+  sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211], v39, v36, v35);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0);
   v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2;
   v41 = pPlayer->GetBaseLuck();
@@ -17445,22 +17445,22 @@
   v43 = pPlayer->GetBaseLuck();
   v44 = pPlayer->GetActualLuck();
   v45 = UI_GetHealthManaStringColor(v44, v43);
-  sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[136], v45, v42, v41);
+  sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136], v45, v42, v41);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0);
-  a2 = "%s";
+  a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n";
   v46 = v40 + 2 * LOBYTE(pFontArrus->uFontHeight) + 5;
   if ( pPlayer->GetMaxHealth() >= 1000 )
-    a2 = (const char *)&unk_4E2EB8;
+    a2 = "%s\f%05u\r388%d\f00000 / %d\n";
   v47 = pPlayer->GetMaxHealth();
   v48 = pPlayer->sHealth;
   v49 = pPlayer->GetMaxHealth();
   v50 = UI_GetHealthManaStringColor(pPlayer->sHealth, v49);
   sprintf(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0);
-  a2a = "%s";
+  a2a = "%s\f%05u\r424%d\f00000 /\t185%d\n";
   uY = LOBYTE(pFontArrus->uFontHeight) + v46 - 2;
   if ( pPlayer->GetMaxMana() >= 1000 )
-    a2a = (const char *)&unk_4E2EB8;
+    a2a = "%s\f%05u\r388%d\f00000 / %d\n";
   v51 = pPlayer->GetMaxMana();
   v52 = pPlayer->sMana;
   v53 = pPlayer->GetMaxMana();
@@ -17473,13 +17473,13 @@
   v58 = pPlayer->GetBaseAC();
   v59 = pPlayer->GetActualAC();
   v60 = UI_GetHealthManaStringColor(v59, v58);
-  sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[12], v60, v57, v56);
+  sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12], v60, v57, v56);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0);
   v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2;
   v62 = pPlayer->GetMajorConditionIdx();
   v63 = aCharacterConditionNames[v62];
   v64 = GetConditionDrawColor(v62);
-  sprintf(pTmpBuf, "%s: ", pGlobalTXT_LocalizationStrings[47], v64, v63);
+  sprintf(pTmpBuf, "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], v64, v63);
   pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v61, 0, pTmpBuf, 226, 0);
   v65 = LOBYTE(pFontArrus->uFontHeight) + v61 - 1;
   v66 = pPlayer->uQuickSpell;
@@ -17494,9 +17494,9 @@
   v70 = pPlayer->GetBaseAge();
   v71 = pPlayer->GetActualAge();
   v72 = UI_GetHealthManaStringColor(v71, v70);
-  sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[5], v72, v69, v68);
+  sprintf(pTmpBuf, "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5], v72, v69, v68);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0);
-  a2b = "%s";
+  a2b = "%s\f%05u\t100%d\f00000 / %d\n";
   uYa = LOBYTE(pFontArrus->uFontHeight) + 48;
   if ( pPlayer->GetBaseLevel() > 99 )
     a2b = format_4E2E68;
@@ -17515,7 +17515,7 @@
   v79 = LODWORD(pPlayer->uExperience);
   v80 = v78;
   v81 = pPlayer->GetExperienceDisplayColor();
-  sprintf(pTmpBuf, "%s\r180", v80, v81, v79);
+  sprintf(pTmpBuf, "%s\r180\f%05d%lu\f00000\n\n", v80, v81, v79);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYb, 0, pTmpBuf, 0, 0, 0);
   v82 = uYb + 2 * LOBYTE(pFontArrus->uFontHeight);
   v83 = pPlayer->GetActualAttack(0);
@@ -17805,11 +17805,11 @@
   int a2; // [sp+10h] [bp-14h]@1
   int v12; // [sp+14h] [bp-10h]@8
   int v13; // [sp+14h] [bp-10h]@19
-  unsigned int *v14; // [sp+18h] [bp-Ch]@8
-  unsigned int *v15; // [sp+18h] [bp-Ch]@14
-  unsigned int *v16; // [sp+18h] [bp-Ch]@19
-  unsigned int *v17; // [sp+18h] [bp-Ch]@25
-  unsigned short *v18; // [sp+1Ch] [bp-8h]@8
+  int *v14; // [sp+18h] [bp-Ch]@8
+  int *v15; // [sp+18h] [bp-Ch]@14
+  int *v16; // [sp+18h] [bp-Ch]@19
+  int *v17; // [sp+18h] [bp-Ch]@25
+  Player *v18; // [sp+1Ch] [bp-8h]@8
   int a5; // [sp+20h] [bp-4h]@8
 
   a2 = 0;
@@ -17834,13 +17834,13 @@
   }
   v12 = 0;
   a5 = pGUIWindow_CurrentMenu->uNumControls;
-  v18 = &pParty->pPlayers[v0-1].pActiveSkills[0];	  //&stru_AA1058[3].pSounds[6972 * v0 + 40552];
+  v18 = &pParty->pPlayers[v0-1];	  //&stru_AA1058[3].pSounds[6972 * v0 + 40552];
   v2 = pFontLucida;
-  v14 = (unsigned int *)dword_4E2A2C;
+  v14 = dword_4E2A2C;
   v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
   do
   {
-    if ( v18[*v14 + 132] & 0x3F )//crash
+    if ( v18->pActiveSkills[*v14] & 0x3F )//crash
     {
       v4 = LOBYTE(v2->uFontHeight);
       v3 = v3 + v4 - 3;
@@ -17851,14 +17851,14 @@
     }
     ++v14;
   }
-  while ( (signed int)v14 < (signed int)dword_4E2A50 );
+  while ( v14 <= &dword_4E2A2C[8] );
   if ( !v12 )
     v3 = v3 + LOBYTE(v2->uFontHeight) - 3;
-  v15 = (unsigned int *)_4E2A80_skills;
+  v15 = _4E2A80_skills;
   v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6;
   do
   {
-    if ( v18[ *v15 + 132] & 0x3F && a2 < 15 )
+    if ( v18->pActiveSkills[*v15] & 0x3F && a2 < 15 )
     {
       v6 = LOBYTE(v2->uFontHeight);
       v5 = v5 + v6 - 3;
@@ -17868,13 +17868,13 @@
     }
     ++v15;
   }
-  while ( (signed int)v15 <= (signed int)_4E2A80_skills[8] );
+  while ( v15 <= &_4E2A80_skills[8] );
   v13 = 0;
-  v16 = (unsigned int *)dword_4E2A18;
+  v16 = pArmorSkills;
   v7 = 2 * LOBYTE(v2->uFontHeight) + 13;
   do
   {
-    if ( v18[ *v16 + 132] & 0x3F )
+    if ( v18->pActiveSkills[*v16] & 0x3F )
     {
       v8 = LOBYTE(v2->uFontHeight);
       v7 = v7 + v8 - 3;
@@ -17885,14 +17885,14 @@
     }
     ++v16;
   }
-  while ( (signed int)v16 < (signed int)dword_4E2A2C );
+  while ( v16 <= &pArmorSkills[4] );
   if ( !v13 )
     v7 = v7 + LOBYTE(v2->uFontHeight) - 3;
-  v17 = (unsigned int *)dword_4E2A50;
+  v17 = dword_4E2A50;
   v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6;
   do
   {
-    if ( v18[ *v17 + 132] & 0x3F )
+    if ( v18->pActiveSkills[*v17] & 0x3F )
     {
       v10 = LOBYTE(v2->uFontHeight);
       v9 = v9 + v10 - 3;
@@ -17902,7 +17902,7 @@
     }
     ++v17;
   }
-  while ( (signed int)v17 < (signed int)_4E2A80_skills );
+  while ( v17 <= &dword_4E2A50[11] );
   if ( a2 )
     pGUIWindow_CurrentMenu->_41D08F(a2, 1, 0, a5);
 }
\ No newline at end of file
--- a/mm7_6.cpp	Mon Jan 21 20:21:45 2013 +0600
+++ b/mm7_6.cpp	Mon Jan 21 20:22:10 2013 +0600
@@ -7856,8 +7856,8 @@
 
   v0 = uActiveCharacter;
   v27 = 6972 * uActiveCharacter;
-  v1 = (Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552];
-  result = ((Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552])->CanAct();
+  v1 = &pParty->pPlayers[uActiveCharacter-1];//(Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552];
+  result = pParty->pPlayers[uActiveCharacter-1].CanAct();//((Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552])->CanAct();
   if ( result )
   {
     pStru277->_427D48(v0);
--- a/mm7_data.cpp	Mon Jan 21 20:21:45 2013 +0600
+++ b/mm7_data.cpp	Mon Jan 21 20:22:10 2013 +0600
@@ -478,7 +478,7 @@
 __int16 RightClickPortraitXmin[4];
 __int16 RightClickPortraitXmax[4];
 void *off_4E2A12; // weak
-int dword_4E2A18[5]={ 9, 10, 11, 8, 30};
+int pArmorSkills[5]={ 9, 10, 11, 8, 30};
 int dword_4E2A2C[9]={3, 5, 2, 6, 4, 0, 1, 31, 7};
 int dword_4E2A50[12]={35, 33, 24, 21, 32, 36, 29, 25, 22, 26, 23, 34};
 int _4E2A80_skills[9]={12, 13, 14, 15, 16, 17, 18, 19, 20};
@@ -524,26 +524,25 @@
 char ascii_4E2D5C[7];
 char aMakingItemNumb[777]; // idb
 char aNpc03d[777]; // idb
-char format_4E2D80[16];
+const char *format_4E2D80 = "\f%05d%s\f00000\n";
 char format_4E2D90[8];
 char aS03d03dS000_0[777]; // idb
 char aS03d03dS000[777]; // idb
-char format_4E2DC8[8];
+const char *format_4E2DC8 = "\f%05d";
 char aS[777]; // idb
 char aLuSLuS[777]; // idb
 char byte_4E2DE8; // idb
 char asc_4E2DFC[3]; // idb
-char format_4E2E00[2]; // idb
-char format_4E2E10[28]; // weak
+const char *format_4E2E00 = "%s\f%05u\xD\r180%s\n"; // idb
+const char *format_4E2E10 = "%s\f%05u\t110%d\f00000 / %d\n";
 char aS100S_0[777]; // idb
 char aS100S[777]; // idb
 char aS100D[777]; // idb
 char aS180[6]; // idb
-char format_4E2E68[28]; // weak
+const char *format_4E2E68 = "%s\f%05u\t180%d\f00000 / %d\d";
 char aS_6[2]; // idb
 char aSS_0[777]; // idb
 char aS_5[4]; // idb
-_UNKNOWN unk_4E2EB8; // weak
 char string_4E3294[8];
 char Format[777]; // idb
 char aMem03i_txt[777]; // idb
--- a/mm7_data.h	Mon Jan 21 20:21:45 2013 +0600
+++ b/mm7_data.h	Mon Jan 21 20:22:10 2013 +0600
@@ -464,7 +464,7 @@
 extern __int16 RightClickPortraitXmin[4];
 extern __int16 RightClickPortraitXmax[4];
 extern void *off_4E2A12; // weak
-extern int dword_4E2A18[5];
+extern int pArmorSkills[5];
 extern int dword_4E2A2C[9];
 extern int dword_4E2A50[12];
 extern int _4E2A80_skills[9];
@@ -510,26 +510,25 @@
 extern char ascii_4E2D5C[7];
 extern char aMakingItemNumb[]; // idb
 extern char aNpc03d[]; // idb
-extern char format_4E2D80[16];
+extern const char *format_4E2D80;
 extern char format_4E2D90[8];
 extern char aS03d03dS000_0[]; // idb
 extern char aS03d03dS000[]; // idb
-extern char format_4E2DC8[8];
+extern const char *format_4E2DC8;
 extern char aS[]; // idb
 extern char aLuSLuS[]; // idb
 extern char byte_4E2DE8; // idb
 extern char asc_4E2DFC[3]; // idb
-extern char format_4E2E00[2]; // idb
-extern char format_4E2E10[28]; // weak
+extern const char *format_4E2E00; // idb
+extern const char *format_4E2E10; // format text of resistance in Stats screen
 extern char aS100S_0[]; // idb
 extern char aS100S[]; // idb
 extern char aS100D[]; // idb
 extern char aS180[6]; // idb
-extern char format_4E2E68[28]; // weak
+extern const char *format_4E2E68; // format 2 text of resistance in Stats screen
 extern char aS_6[2]; // idb
 extern char aSS_0[]; // idb
 extern char aS_5[4]; // idb
-extern _UNKNOWN unk_4E2EB8; // weak
 extern char string_4E3294[8];
 extern char Format[]; // idb
 extern char aMem03i_txt[]; // idb