diff mm7_5.cpp @ 332:e8fcde8ba3fc

m
author Ritor1
date Wed, 20 Feb 2013 20:50:22 +0600
parents f16ac5e65438
children 405d0c4dd1b3
line wrap: on
line diff
--- a/mm7_5.cpp	Tue Feb 19 22:37:58 2013 +0600
+++ b/mm7_5.cpp	Wed Feb 20 20:50:22 2013 +0600
@@ -7021,11 +7021,7 @@
 //----- (0043CC7C) --------------------------------------------------------
 void __fastcall CharacterUI_DrawPaperdoll(unsigned int uPlayerID)
 {
-  Player **ppPlayer; // esi@1
   Player *pPlayer; // ebx@1
-  enum CHARACTER_RACE pRace; // edi@1
-  signed int pSex; // eax@1
-  int v5; // edi@4
   unsigned int v6; // ecx@9
   int v7; // ecx@10
   unsigned int v8; // eax@14
@@ -7041,22 +7037,22 @@
   int v18; // edi@30
   char *v19; // eax@30
   Texture *v20; // edi@31
-  unsigned int v21; // eax@37
+  int pBowNum; // eax@37
   int v22; // edi@38
   int v23; // eax@38
-  int v24; // ebx@38
+  int pX; // ebx@38
   int v25; // eax@38
   LODFile_IconsBitmaps *v26; // ecx@42
   Texture *v27; // edi@51
   double v28; // st7@51
   char v29; // zf@54
   char *v30; // eax@54
-  unsigned int v31; // eax@59
+  int pCloakNum; // eax@59
   int v32; // edx@60
   int v33; // eax@65
   int v34; // eax@74
   int v35; // ebx@74
-  unsigned int v36; // ecx@74
+  int pY2; // ecx@74
   int v37; // eax@74
   LODFile_IconsBitmaps *v38; // ecx@78
   Texture *v39; // edi@85
@@ -7215,8 +7211,7 @@
   signed int v192; // [sp-4h] [bp-50h]@304
   unsigned int a3; // [sp+10h] [bp-3Ch]@7
   int a3a; // [sp+10h] [bp-3Ch]@15
-  int a3b; // [sp+10h] [bp-3Ch]@38
-  unsigned int a3c; // [sp+10h] [bp-3Ch]@74
+  int pY; // [sp+10h] [bp-3Ch]@38
   unsigned int a3d; // [sp+10h] [bp-3Ch]@106
   int a3e; // [sp+10h] [bp-3Ch]@129
   int a3f; // [sp+10h] [bp-3Ch]@168
@@ -7228,7 +7223,7 @@
   signed int a2; // [sp+14h] [bp-38h]@7
   unsigned int a2a; // [sp+14h] [bp-38h]@15
   Texture *a2b; // [sp+14h] [bp-38h]@49
-  int a2c; // [sp+14h] [bp-38h]@74
+  int pX2; // [sp+14h] [bp-38h]@74
   int a2d; // [sp+14h] [bp-38h]@106
   int a2e; // [sp+14h] [bp-38h]@129
   int a2f; // [sp+14h] [bp-38h]@168
@@ -7237,9 +7232,7 @@
   Texture *a2i; // [sp+14h] [bp-38h]@284
   int a2j; // [sp+14h] [bp-38h]@312
   int a2k; // [sp+14h] [bp-38h]@336
-  Player *v217; // [sp+18h] [bp-34h]@1
   int v218; // [sp+1Ch] [bp-30h]@15
-  int v219; // [sp+1Ch] [bp-30h]@60
   int v220; // [sp+1Ch] [bp-30h]@94
   int v221; // [sp+1Ch] [bp-30h]@128
   int v222; // [sp+1Ch] [bp-30h]@161
@@ -7250,8 +7243,6 @@
   int v227; // [sp+1Ch] [bp-30h]@336
   int v228; // [sp+1Ch] [bp-30h]@359
   int v229; // [sp+20h] [bp-2Ch]@15
-  int v230; // [sp+20h] [bp-2Ch]@38
-  int v231; // [sp+20h] [bp-2Ch]@60
   int v232; // [sp+20h] [bp-2Ch]@94
   int v233; // [sp+20h] [bp-2Ch]@128
   int v234; // [sp+20h] [bp-2Ch]@161
@@ -7264,54 +7255,43 @@
   unsigned int v241; // [sp+2Ch] [bp-20h]@38
   int v242; // [sp+2Ch] [bp-20h]@197
   unsigned int v243; // [sp+2Ch] [bp-20h]@370
-  int v244; // [sp+34h] [bp-18h]@6
+  int pFaceNum; // [sp+34h] [bp-18h]@6
   signed int v245; // [sp+34h] [bp-18h]@361
-  unsigned int uPlayerID_; // [sp+38h] [bp-14h]@1
   int uPlayerID_a; // [sp+38h] [bp-14h]@9
   signed int IsDwarf; // [sp+40h] [bp-Ch]@4
   int v249; // [sp+40h] [bp-Ch]@358
-  signed int v250; // [sp+44h] [bp-8h]@1
-
-  ppPlayer = &pPlayers[uPlayerID];
-  pPlayer = *ppPlayer;
-  uPlayerID_ = uPlayerID;
-  v217 = *ppPlayer;
+
+  pPlayer = pPlayers[uPlayerID];
   pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
-  pRace = pPlayer->GetRace();
-  pSex = pPlayer->GetSexByVoice();
-  v250 = pSex;
-  if ( pRace && pRace != 1 && pRace != 2 )
+  if ( pPlayer->GetRace() && pPlayer->GetRace() != 1 && pPlayer->GetRace() != 2 )
   {
     IsDwarf = 1;
-    v5 = (pSex != 0) + 2;
+    pBodyComplection = (pPlayer->GetSexByVoice() != 0) + 2;
   }
   else
   {
     IsDwarf = 0;
-    v5 = pSex != 0;
-  }
-  pBodyComplection = v5;
-  v244 = (*ppPlayer)->uFace;
+    pBodyComplection = pPlayer->GetSexByVoice() != 0;
+  }
+  pFaceNum = pPlayer->uFace;
   pRenderer->ResetClip();
   pRenderer->DrawTextureIndexed(0x1D3u, 0, (Texture *)(uTextureID_BACKDOLL != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BACKDOLL] : 0));//Подложка
-  if ( !IsPlayerWearingWatersuit[uPlayerID_] )
-  {
-    v21 = pPlayer->pEquipment.uBow; //сначала рисуется лук
-    if ( !v21 )
+  if ( !IsPlayerWearingWatersuit[uPlayerID] )// не носит водолазный костюм
+  {
+    pBowNum = pPlayer->pEquipment.uBow; //сначала рисуется лук
+    if ( !pBowNum )
       goto LABEL_59;
-    v230 = pPlayer->pEquipment.uBow;
-    v22 = (int)&v217->pInventoryItems[v21-1];
+    v22 = (int)&pPlayer->pInventoryItems[pBowNum-1];
     v23 = *(int *)v22;
-    v24 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[v23].uEquipX;
-    a3b = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[v23].uEquipY;
+    pX = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[v23].uEquipX;
+    pY = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[v23].uEquipY;
     v241 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v23].pIconName, TEXTURE_16BIT_PALETTE);
     v25 = *(int *)(v22 + 20);
     if ( !(*(int *)(v22 + 20) & 0xF0) )
     {
       if ( v25 & 2 )
       {
-        v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
-        pRenderer->_4A6776(v24, a3b, v27);
+        pRenderer->_4A6776(pX, pY, (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0));
       }
       else
       {
@@ -7320,24 +7300,22 @@
         if ( v29 )
         {
           v27 = (Texture *)(v241 != -1 ? (int)v30 : 0);
-          pRenderer->DrawTransparentGreenShade(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0));
+          pRenderer->DrawTransparentGreenShade(pX, pY, (Texture *)(v241 != -1 ? (int)v30 : 0));
         }
         else
         {
           v27 = (Texture *)(v241 != -1 ? (int)v30 : 0);
-          pRenderer->DrawTextureTransparent(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0));
+          pRenderer->DrawTextureTransparent(pX, pY, (Texture *)(v241 != -1 ? (int)v30 : 0));
         }
       }
 LABEL_57:
       if ( !bRingsShownInCharScreen )
-        pRenderer->_4A612A(v24, a3b, v27, v230);
+        pRenderer->_4A612A(pX, pY, v27, pBowNum);
 LABEL_59:
-      v31 = v217->pEquipment.uCloak;// потом плащ
-      if ( !v31 )
+      pCloakNum = pPlayer->pEquipment.uCloak;// потом плащ
+      if ( !pCloakNum )
         goto LABEL_93;
-      v231 = v217->pEquipment.uCloak;
-      v32 = (int)&v217->pInventoryItems[v31-1];
-      v219 = v32;
+      v32 = (int)&pPlayer->pInventoryItems[pCloakNum-1];
       if ( *(int *)v32 != 525 )
       {
         switch ( *(int *)v32 )
@@ -7361,34 +7339,33 @@
 LABEL_74:
               v34 = v33 + 10 * pBodyComplection;
               v35 = paperdoll_array_511828[0][v34];//Texture_Cloak
-              a2c = pPaperdoll_BodyX + paperdoll_Cloak[0][v34][0];
-              v36 = pPaperdoll_BodyY + paperdoll_Cloak[0][v34][1];
+              pX2 = pPaperdoll_BodyX + paperdoll_Cloak[0][v34][0];
+              pY2 = pPaperdoll_BodyY + paperdoll_Cloak[0][v34][1];
               v37 = *(int *)(v32 + 20);
-              a3c = v36;
               if ( !(v37 & 0xF0) )
               {
                 v41 = v35 + 1;
                 if ( v37 & 2 )
                 {
                   v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0);
-                  pRenderer->_4A6776(a2c, v36, v42);
+                  pRenderer->_4A6776(pX2, pY2, v42);
                 }
                 else
                 {
                   v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0);
-                  pRenderer->DrawTextureTransparent(a2c, v36, v42);
+                  pRenderer->DrawTextureTransparent(pX2, pY2, v42);
                 }
                 if ( !bRingsShownInCharScreen )
-                  pRenderer->_4A612A(a2c, a3c, v42, v231);
+                  pRenderer->_4A612A(pX2, pY2, v42, pCloakNum);
 LABEL_93:
-                v240 = 4 * uPlayerID_ - 4;
+                v240 = 4 * uPlayerID - 4;
                 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,
                   (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0));
-                v43 = v217->pEquipment.uBody;// потом тело
+                v43 = pPlayer->pEquipment.uBody;// потом тело
                 if ( !v43 )
                   goto LABEL_127;
-                v232 = v217->pEquipment.uBody;
-                v44 = (int)&v217->pInventoryItems[v43-1];
+                v232 = pPlayer->pEquipment.uBody;
+                v44 = (int)&pPlayer->pInventoryItems[v43-1];
                 v220 = v44;
                 if ( *(int *)v44 != 504 )
                 {
@@ -7443,18 +7420,18 @@
                           if ( !bRingsShownInCharScreen )
                             pRenderer->_4A612A(a2d, a3d, v54, v232);
 LABEL_127:
-                          v56 = v217->pEquipment.field_20;
+                          v56 = pPlayer->pEquipment.field_20;
                           if ( !v56 )
                             goto LABEL_155;
-                          v233 = v217->pEquipment.field_20;
-                          v57 = (int)&v217->pInventoryItems[v56-1];
+                          v233 = pPlayer->pEquipment.field_20;
+                          v57 = (int)&pPlayer->pInventoryItems[v56-1];
                           v221 = v57;
                           v58 = *(int *)v57;
                           if ( *(int *)v57 == 529 )
                           {
                             a3e = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][5][1];
                             a2e = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][5][0];
-                            v59 = papredoll_flying_feet[v244];
+                            v59 = papredoll_flying_feet[pFaceNum];
                           }
                           else
                           {
@@ -7508,19 +7485,19 @@
                             if ( !bRingsShownInCharScreen )
                               pRenderer->_4A612A(a2e, a3e, v67, v233);
 LABEL_155:
-                            v68 = v217;
-                            v69 = v217->pEquipment.uMainHand;
+                            v68 = pPlayer;
+                            v69 = pPlayer->pEquipment.uMainHand;
                             uPlayerID_a = 2 * pBodyComplection;
-                            if ( !v69 || (v70 = *(int *)&v217->pInventoryItems[v69-1], pItemsTable->pItems[v70].uEquipType != 1)
-                              && (pItemsTable->pItems[v70].uSkillType != 4 || v217->pEquipment.uOffHand) )
+                            if ( !v69 || (v70 = *(int *)&pPlayer->pInventoryItems[v69-1], pItemsTable->pItems[v70].uEquipType != 1)
+                              && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayer->pEquipment.uOffHand) )
                               pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0],
                                 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
                                 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0));
-                            v71 = v217->pEquipment.uBelt;
+                            v71 = pPlayer->pEquipment.uBelt;
                             if ( v71 )
                             {
-                              v234 = v217->pEquipment.uBelt;
-                              v72 = (int)&v217->pInventoryItems[v71-1];
+                              v234 = pPlayer->pEquipment.uBelt;
+                              v72 = (int)&pPlayer->pInventoryItems[v71-1];
                               v222 = v72;
                               if ( *(int *)v72 == 524 )
                               {
@@ -7545,8 +7522,8 @@
                                   v75 = stru_511718.texids[v74];
                                 else
                                   v75 = stru_511718.texids[v73 + 7 * (pBodyComplection - 2)];
-                                v76 = *(int *)&v217->field_1F5[36 * v71 + 15];
-                                if ( !(*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) )
+                                v76 = *(int *)&pPlayer->field_1F5[36 * v71 + 15];
+                                if ( !(*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) )
                                 {
                                   v79 = v75 + 1;
                                   v80 = (char *)&pIcons_LOD->pTextures[v75];
@@ -7570,12 +7547,12 @@
                                   }
                                   if ( !bRingsShownInCharScreen )
                                     pRenderer->_4A612A(a2f, a3f, v81, v234);
-                                    v68 = v217;
+                                    v68 = pPlayer;
                                     goto LABEL_192;
                                 }
-                                if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) != 16 )
+                                if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) != 16 )
                                 {
-                                  if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 32 )
+                                  if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) == 32 )
                                   {
                                     v172 = "sp28a";
                                     v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)];
@@ -7588,10 +7565,10 @@
                                     }
                                     v78 = (double)GetTickCount() * 0.1;
                                     pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255);
-                                    v68 = v217;
+                                    v68 = pPlayer;
                                     goto LABEL_192;
                                   }
-                                  if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 64 )
+                                  if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) == 64 )
                                   {
                                     v172 = "sp30a";
                                     v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)];
@@ -7604,10 +7581,10 @@
                                     }
                                     v78 = (double)GetTickCount() * 0.1;
                                     pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255);
-                                    v68 = v217;
+                                    v68 = pPlayer;
                                     goto LABEL_192;
                                   }
-                                  if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 128 )
+                                  if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) == 128 )
                                   {
                                     v172 = "sp91a";
                                     v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)];
@@ -7620,7 +7597,7 @@
                                     }
                                     v78 = (double)GetTickCount() * 0.1;
                                     pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255);
-                                    v68 = v217;
+                                    v68 = pPlayer;
                                     goto LABEL_192;
                                   }
                                 }
@@ -7635,7 +7612,7 @@
                                 }
                                 v78 = (double)GetTickCount() * 0.1;
                                 pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255);
-                                v68 = v217;
+                                v68 = pPlayer;
                                 goto LABEL_192;
                               }
                             }
@@ -7708,21 +7685,21 @@
                                               if ( v116 == pIcons_LOD->FindTextureByName("pending") )
                                               {
 LABEL_292:
-                                                v68 = v217;
+                                                v68 = pPlayer;
 LABEL_293:
-                                                if ( v244 == 12 || v244 == 13 )
+                                                if ( pFaceNum == 12 || pFaceNum == 13 )
                                                 {
-                                                  v122 = papredoll_dbrds[v244];
+                                                  v122 = papredoll_dbrds[pFaceNum];
                                                   if ( v122 != pIcons_LOD->FindTextureByName("Pending") )
-                                                    pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * v244 - 24],
-                                                      pPaperdoll_BodyY + pPaperdoll_Beards[2 * v244 - 23],
+                                                    pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pFaceNum - 24],
+                                                      pPaperdoll_BodyY + pPaperdoll_Beards[2 * pFaceNum - 23],
                                                       (Texture *)(v122 != -1 ? (int)&pIcons_LOD->pTextures[v122] : 0));
                                                 }
                                                 v123 = v68->pEquipment.uHelm;
                                                 if ( !v123 )
                                                   goto LABEL_335;
                                                 v237 = v123;
-                                                v124 = (int)&v217->pInventoryItems[v123-1];
+                                                v124 = (int)&pPlayer->pInventoryItems[v123-1];
                                                 v226 = v124;
                                                 if ( *(int *)v124 != 521 )
                                                 {
@@ -7754,7 +7731,7 @@
                                                   a2j = pPaperdoll_BodyX + dword_4E58D0[v126];
                                                   a3i = pPaperdoll_BodyY + dword_4E58D4[v126];
                                                   if ( IsDwarf != 1 || *(int *)v124 != 92 )
-                                                    v127 = stru_511698.texids[v125 + 16 * v250];
+                                                    v127 = stru_511698.texids[v125 + 16 * pPlayer->GetSexByVoice()];
                                                   else
                                                     v127 = papredoll_dbrds[11];
                                                   v128 = *(int *)(v124 + 20);
@@ -7848,11 +7825,11 @@
                                                   if ( !bRingsShownInCharScreen )
                                                     pRenderer->_4A612A(a2j, a3i, v133, v237);
 LABEL_335:
-                                                  v134 = v217->pEquipment.uMainHand;
+                                                  v134 = pPlayer->pEquipment.uMainHand;
                                                   if ( !v134 )
                                                     goto LABEL_358;
-                                                  v238 = v217->pEquipment.uMainHand;
-                                                  v135 = (int)&v217->pInventoryItems[v134-1];
+                                                  v238 = pPlayer->pEquipment.uMainHand;
+                                                  v135 = (int)&pPlayer->pInventoryItems[v134-1];
                                                   v227 = v135;
                                                   v136 = *(int *)v135;
                                                   v137 = *(int *)v135;
@@ -7889,11 +7866,11 @@
                                                     if ( !bRingsShownInCharScreen )
                                                       pRenderer->_4A612A(a2k, a3j, v144, v238);
 LABEL_358:
-                                                    v145 = v217->pEquipment.uOffHand;
-                                                    v249 = v217->pEquipment.uOffHand;
+                                                    v145 = pPlayer->pEquipment.uOffHand;
+                                                    v249 = pPlayer->pEquipment.uOffHand;
                                                     if ( !v145 )
                                                       goto LABEL_393;
-                                                    v146 = (int)&v217->pInventoryItems[v145-1];
+                                                    v146 = (int)&pPlayer->pInventoryItems[v145-1];
                                                     v228 = v146;
                                                     v147 = *(int *)v146;
                                                     v148 = *(int *)v146;
@@ -8244,7 +8221,7 @@
                                       a3g = pPaperdoll_BodyY + v95;
                                       if ( v94 == pIcons_LOD->FindTextureByName("pending") )
                                       {
-                                        v68 = v217;
+                                        v68 = pPlayer;
                                         goto LABEL_259;
                                       }
                                       if ( *(int *)(v242 + 516) & 0xF0 )
@@ -8267,7 +8244,7 @@
                                             v97 = (double)GetTickCount();
                                             pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
                                               (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
-                                            v68 = v217;
+                                            v68 = pPlayer;
                                             goto LABEL_259;
                                           }
                                           if ( (*(int *)(v242 + 516) & 0xF0) == 64 )
@@ -8286,7 +8263,7 @@
                                             v97 = (double)GetTickCount();
                                             pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
                                               (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
-                                            v68 = v217;
+                                            v68 = pPlayer;
                                             goto LABEL_259;
                                           }
                                           if ( (*(int *)(v242 + 516) & 0xF0) == 128 )
@@ -8305,7 +8282,7 @@
                                             v97 = (double)GetTickCount();
                                             pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
                                               (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
-                                            v68 = v217;
+                                            v68 = pPlayer;
                                             goto LABEL_259;
                                           }
                                         }
@@ -8323,7 +8300,7 @@
                                         v97 = (double)GetTickCount();
                                         pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
                                           (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
-                                        v68 = v217;
+                                        v68 = pPlayer;
                                         goto LABEL_259;
                                       }
                                       v98 = v94 + 1;
@@ -8338,7 +8315,7 @@
                                         v100->_4A6776(v163, v175, v188);
                                         if ( !bRingsShownInCharScreen )
                                           pRenderer->_4A612A(a2g, a3g, v101, v235);
-                                        v68 = v217;
+                                        v68 = pPlayer;
                                         goto LABEL_259;
                                       }
                                       if ( *(char *)(v242 + 516) & 1 )
@@ -8350,7 +8327,7 @@
                                         pRenderer->DrawTextureTransparent(v164, v176, v189);
                                         if ( !bRingsShownInCharScreen )
                                           pRenderer->_4A612A(a2g, a3g, v101, v235);
-                                        v68 = v217;
+                                        v68 = pPlayer;
                                         goto LABEL_259;
                                       }
                                       v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
@@ -8360,14 +8337,14 @@
                                       pRenderer->DrawTransparentGreenShade(v165, v177, v190);
                                       if ( !bRingsShownInCharScreen )
                                         pRenderer->_4A612A(a2g, a3g, v101, v235);
-                                      v68 = v217;
+                                      v68 = pPlayer;
                                       goto LABEL_259;
                                     }
                                     v102 = 17 * pBodyComplection + v90;
                                     v94 = paperdoll_array_511290[0][v102][1];
                                     if ( v94 == pIcons_LOD->FindTextureByName("pending") )
                                     {
-                                      v68 = v217;
+                                      v68 = pPlayer;
                                       goto LABEL_259;
                                     }
                                     v103 = pPaperdoll_BodyX + paperdoll_shoulder[0][v102][0];
@@ -8390,7 +8367,7 @@
                                         v100->_4A6776(v163, v175, v188);
                                         if ( !bRingsShownInCharScreen )
                                           pRenderer->_4A612A(a2g, a3g, v101, v235);
-                                        v68 = v217;
+                                        v68 = pPlayer;
                                         goto LABEL_259;
                                       }
                                       if ( v224 & 1 )
@@ -8403,7 +8380,7 @@
                                         pRenderer->DrawTextureTransparent(v164, v176, v189);
                                         if ( !bRingsShownInCharScreen )
                                           pRenderer->_4A612A(a2g, a3g, v101, v235);
-                                        v68 = v217;
+                                        v68 = pPlayer;
                                         goto LABEL_259;
                                       }
                                       v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
@@ -8414,7 +8391,7 @@
                                       pRenderer->DrawTransparentGreenShade(v165, v177, v190);
                                       if ( !bRingsShownInCharScreen )
                                         pRenderer->_4A612A(a2g, a3g, v101, v235);
-                                      v68 = v217;
+                                      v68 = pPlayer;
                                       goto LABEL_259;
                                     }
                                     v106 = v105 - 16;
@@ -8437,7 +8414,7 @@
                                         v97 = (double)GetTickCount();
                                         pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
                                           (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
-                                        v68 = v217;
+                                        v68 = pPlayer;
                                         goto LABEL_259;
                                       }
                                       v108 = v107 - 32;
@@ -8457,7 +8434,7 @@
                                         v97 = (double)GetTickCount();
                                         pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
                                           (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
-                                        v68 = v217;
+                                        v68 = pPlayer;
                                         goto LABEL_259;
                                       }
                                       if ( v108 == 64 )
@@ -8476,7 +8453,7 @@
                                         v97 = (double)GetTickCount();
                                         pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
                                           (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
-                                        v68 = v217;
+                                        v68 = pPlayer;
                                         goto LABEL_259;
                                       }
                                     }
@@ -8494,7 +8471,7 @@
                                     v97 = (double)GetTickCount();
                                     pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
                                       (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
-                                    v68 = v217;
+                                    v68 = pPlayer;
                                     goto LABEL_259;
                                   }
                                   v186 = 16;
@@ -8679,11 +8656,11 @@
                       if ( dword_50C9A8 <= 0 )
                       {
                         dword_50C9A8 = 0;
-                        *(char *)(v219 + 20) &= 0xFu;
+                        *(char *)(v32 + 20) &= 0xFu;
                         ptr_50C9A4 = 0;
                       }
                       v40 = (double)GetTickCount() * 0.1;
-                      pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
+                      pRenderer->_4A63E6(pX2, pY2, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
                         (signed __int64)v40, 0, 255);
                       goto LABEL_93;
                     }
@@ -8693,11 +8670,11 @@
                     if ( dword_50C9A8 <= 0 )
                     {
                       dword_50C9A8 = 0;
-                      *(char *)(v219 + 20) &= 0xFu;
+                      *(char *)(v32 + 20) &= 0xFu;
                       ptr_50C9A4 = 0;
                     }
                     v40 = (double)GetTickCount() * 0.1;
-                    pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
+                    pRenderer->_4A63E6(pX2, pY2, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
                       (signed __int64)v40, 0, 255);
                     goto LABEL_93;
                   }
@@ -8709,11 +8686,11 @@
                 if ( dword_50C9A8 <= 0 )
                 {
                   dword_50C9A8 = 0;
-                  *(char *)(v219 + 20) &= 0xFu;
+                  *(char *)(v32 + 20) &= 0xFu;
                   ptr_50C9A4 = 0;
                 }
                 v40 = (double)GetTickCount() * 0.1;
-                pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
+                pRenderer->_4A63E6(pX2, pY2, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
                   (signed __int64)v40, 0, 255);
                 goto LABEL_93;
               }
@@ -8724,11 +8701,11 @@
               if ( dword_50C9A8 <= 0 )
               {
                 dword_50C9A8 = 0;
-                *(char *)(v219 + 20) &= 0xFu;
+                *(char *)(v32 + 20) &= 0xFu;
                 ptr_50C9A4 = 0;
               }
               v40 = (double)GetTickCount() * 0.1;
-              pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
+              pRenderer->_4A63E6(pX2, pY2, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
                 (signed __int64)v40, 0, 255);
               goto LABEL_93;
             }
@@ -8765,7 +8742,7 @@
             }
             v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
             v28 = (double)GetTickCount() * 0.1;
-            pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
+            pRenderer->_4A63E6(pX, pY, v27, a2b, (signed __int64)v28, 0, 255);
             goto LABEL_57;
           }
           v168 = "sptext01";
@@ -8779,7 +8756,7 @@
           }
           v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
           v28 = (double)GetTickCount() * 0.1;
-          pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
+          pRenderer->_4A63E6(pX, pY, v27, a2b, (signed __int64)v28, 0, 255);
           goto LABEL_57;
         }
         v168 = "sp30a";
@@ -8795,7 +8772,7 @@
       }
       v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
       v28 = (double)GetTickCount() * 0.1;
-      pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
+      pRenderer->_4A63E6(pX, pY, v27, a2b, (signed __int64)v28, 0, 255);
       goto LABEL_57;
     }
     v26 = pIcons_LOD;
@@ -8810,35 +8787,35 @@
     }
     v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
     v28 = (double)GetTickCount() * 0.1;
-    pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
+    pRenderer->_4A63E6(pX, pY, v27, a2b, (signed __int64)v28, 0, 255);
     goto LABEL_57;;
   }
   a3 = pPaperdoll_BodyY;
   a2 = pPaperdoll_BodyX;
-  v240 = 4 * uPlayerID_ - 4;
+  v240 = 4 * uPlayerID - 4;
   pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,
     (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0));
   if ( !bRingsShownInCharScreen )
     pRenderer->_4A612A(a2, a3,
       (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0),
       pPlayer->pEquipment.uBody);
-  uPlayerID_a = 2 * v5;
+  uPlayerID_a = 2 * pBodyComplection;
   v6 = pPlayer->pEquipment.uMainHand;
   if ( !v6
     || (v7 = *(int *)&pPlayer->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1)
     && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayer->pEquipment.uOffHand) )
-    pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[v5][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[v5][1],
+    pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
       (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0));
   v8 = pPlayer->pEquipment.uMainHand;
   if ( v8 )
   {
     v229 = pPlayer->pEquipment.uMainHand;
-    v9 = (int)&v217->pInventoryItems[v8-1];
-    v10 = v5 << 7;
+    v9 = (int)&pPlayer->pInventoryItems[v8-1];
+    v10 = pBodyComplection << 7;
     v218 = v9;
     v11 = *(int *)v9;
     v12 = *(int *)v9;
-    v13 = pPaperdoll_BodyX + paperdoll_Weapon[v5][1][0] - pItemsTable->pItems[v12].uEquipX;
+    v13 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[v12].uEquipX;
     a2a = v13;
     a3a = pPaperdoll_BodyY + *(int *)((char *)&paperdoll_Weapon[0][1][1] + v10) - pItemsTable->pItems[v12].uEquipY;
     if ( v11 == 64 )
@@ -8941,11 +8918,11 @@
   pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[uPlayerID_a],
     pPaperdoll_BodyY + pPaperdoll_RightHand[uPlayerID_a + 1],
     (Texture *)(*(unsigned int *)((char *)papredoll_drhs + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_drhs + v240)] : 0));
-  v161 = v217->pEquipment.uMainHand;
+  v161 = pPlayer->pEquipment.uMainHand;
   if ( v161 )
   {
-    v162 = *(int *)&v217->pInventoryItems[v161-1];
-    if ( pItemsTable->pItems[v162].uEquipType == 1 || pItemsTable->pItems[v162].uSkillType == 4 && !v217->pEquipment.uOffHand )
+    v162 = *(int *)&pPlayer->pInventoryItems[v161-1];
+    if ( pItemsTable->pItems[v162].uEquipType == 1 || pItemsTable->pItems[v162].uSkillType == 4 && !pPlayer->pEquipment.uOffHand )
       pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[0][uPlayerID_a],
         pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[0][uPlayerID_a + 1],
         (Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhus + v240)] : 0));