changeset 21:5070f4343e0e

17.01.13 (fix Paperdoll body and hands)
author Ritor1
date Fri, 18 Jan 2013 00:00:20 +0600
parents 980c34defdab
children 75d706037de4 a32303569c42
files mm7_5.cpp mm7_data.cpp mm7_data.h
diffstat 3 files changed, 80 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_5.cpp	Thu Jan 17 22:59:03 2013 +0600
+++ b/mm7_5.cpp	Fri Jan 18 00:00:20 2013 +0600
@@ -7285,8 +7285,8 @@
     v230 = pPlayer->pEquipment.uBow;
     v22 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v21 + 5];
     v23 = *(int *)v22;
-    v24 = papredoll_4E4C28 + array_4E4C30[pBodyComplection].equip_x - pItemsTable->pItems[v23].uEquipX;
-    a3b = paperdoll_4E4C2C + array_4E4C30[pBodyComplection].equip_y - pItemsTable->pItems[v23].uEquipY;
+    v24 = pPaperdoll_BodyX + array_4E4C30[pBodyComplection].equip_x - pItemsTable->pItems[v23].uEquipX;
+    a3b = pPaperdoll_BodyY + array_4E4C30[pBodyComplection].equip_y - pItemsTable->pItems[v23].uEquipY;
     v241 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v23].pIconName, TEXTURE_16BIT_PALETTE);
     v25 = *(int *)(v22 + 20);
     if ( !(*(int *)(v22 + 20) & 0xF0) )
@@ -7344,8 +7344,8 @@
 LABEL_74:
               v34 = v33 + 10 * pBodyComplection;
               v35 = paperdoll_array_511828[0][v34];
-              a2c = papredoll_4E4C28 + paperdoll_array_4E5570[0][v34][0];// TODO indexing
-              v36 = paperdoll_4E4C2C + paperdoll_array_4E5570[0][v34][1];
+              a2c = pPaperdoll_BodyX + paperdoll_array_4E5570[0][v34][0];// TODO indexing
+              v36 = pPaperdoll_BodyY + paperdoll_array_4E5570[0][v34][1];
               v37 = *(int *)(v32 + 20);
               a3c = v36;
               if ( !(v37 & 0xF0) )
@@ -7365,7 +7365,7 @@
                   pRenderer->_4A612A(a2c, a3c, v42, v231);
 LABEL_93:
                 v240 = 4 * uPlayerID_ - 4;
-                pRenderer->DrawTextureTransparent(papredoll_4E4C28, paperdoll_4E4C2C,
+                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;// потом тело
                 if ( !v43 )
@@ -7395,8 +7395,8 @@
                           goto LABEL_127;
 LABEL_106:
                         v46 = 17 * pBodyComplection + v45;
-                        a2d = papredoll_4E4C28 + paperdoll_array_4E4E30[0][v46][0];// TODO indexing
-                        v47 = paperdoll_4E4C2C + paperdoll_array_4E4E30[0][v46][1];
+                        a2d = pPaperdoll_BodyX + paperdoll_array_4E4E30[0][v46][0];// TODO indexing
+                        v47 = pPaperdoll_BodyY + paperdoll_array_4E4E30[0][v46][1];
                         v48 = paperdoll_array_511290[0][v46][0];
                         v49 = *(int *)(v44 + 20);
                         a3d = v47;
@@ -7435,16 +7435,16 @@
                           v58 = *(int *)v57;
                           if ( *(int *)v57 == 529 )
                           {
-                            a3e = paperdoll_4E4C2C + paredoll_array_4E54B8[pBodyComplection][1];
-                            a2e = papredoll_4E4C28 + paredoll_array_4E54B8[pBodyComplection][0];
+                            a3e = pPaperdoll_BodyY + paredoll_array_4E54B8[pBodyComplection][1];
+                            a2e = pPaperdoll_BodyX + paredoll_array_4E54B8[pBodyComplection][0];
                             v59 = papredoll_flying_feet[v244];
                           }
                           else
                           {
                             if ( v58 == 512 )
                             {
-                              a3e = paperdoll_4E4C2C + paredoll_array_4E54B8[pBodyComplection][3];
-                              a2e = papredoll_4E4C28 + paredoll_array_4E54B8[pBodyComplection][2];
+                              a3e = pPaperdoll_BodyY + paredoll_array_4E54B8[pBodyComplection][3];
+                              a2e = pPaperdoll_BodyX + paredoll_array_4E54B8[pBodyComplection][2];
                               v59 = dword_511638[pBodyComplection][5];
                             }
                             else
@@ -7459,8 +7459,8 @@
                               else
                               {
                                 v61 = v60 + 7 * pBodyComplection;
-                                a3e = paperdoll_4E4C2C + dword_4E5490[0][v61][1];
-                                a2e = papredoll_4E4C28 + dword_4E5490[0][v61][0];
+                                a3e = pPaperdoll_BodyY + dword_4E5490[0][v61][1];
+                                a2e = pPaperdoll_BodyX + dword_4E5490[0][v61][0];
                                 v59 = dword_511638[0][v60 + 6 * pBodyComplection];
                               }
                             }
@@ -7497,8 +7497,8 @@
                             if ( !v69 || (v70 = *(int *)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v69 + 5],
                                   pItemsTable->pItems[v70].uEquipType != 1)
                               && (pItemsTable->pItems[v70].uSkillType != 4 || v217->pEquipment.uOffHand) )
-                              pRenderer->DrawTextureTransparent(papredoll_4E4C28 + dword_4E5AE0[2 * pBodyComplection],
-                                paperdoll_4E4C2C + dword_4E5AE0[2 * pBodyComplection + 1],
+                              pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[2 * pBodyComplection],
+                                pPaperdoll_BodyY + pPaperdoll_LeftHand[2 * 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;
                             if ( v71 )
@@ -7523,8 +7523,8 @@
                               {
 LABEL_168:
                                 v74 = 7 * pBodyComplection + v73;
-                                a2f = papredoll_4E4C28 + dword_4E57F0[0][v74][0];
-                                a3f = paperdoll_4E4C2C + dword_4E57F0[0][v74][1];
+                                a2f = pPaperdoll_BodyX + dword_4E57F0[0][v74][0];
+                                a3f = pPaperdoll_BodyY + dword_4E57F0[0][v74][1];
                                 if ( IsDwarf != 1 || v73 == 5 )
                                   v75 = stru_511718.texids[v74];
                                 else
@@ -7599,8 +7599,8 @@
                               v83 = *(int *)&v68->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v82 + 5];
                               if ( pItemsTable->pItems[v83].uEquipType == 1
                                 || pItemsTable->pItems[v83].uSkillType == 4 && !v68->pEquipment.uOffHand )
-                                pRenderer->DrawTextureTransparent(papredoll_4E4C28 + pPaperdollLeftHand[uPlayerID_a],
-                                  paperdoll_4E4C2C + pPaperdollLeftHand[uPlayerID_a + 1],
+                                pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[uPlayerID_a],
+                                  pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[uPlayerID_a + 1],
                                   (Texture *)(*(unsigned int *)((char *)papredoll_dlaus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlaus + v240)] : 0));
                             }
                             v84 = v68->pEquipment.uBody;
@@ -7655,9 +7655,9 @@
                                               v115 = v114 + 10 * pBodyComplection;
                                               v116 = dword_511788[v115];
                                               v115 *= 8;
-                                              v117 = papredoll_4E4C28 + *(int *)((char *)&dword_4E56B0 + v115);
-                                              a2h = papredoll_4E4C28 + *(int *)((char *)&dword_4E56B0 + v115);
-                                              a3h = paperdoll_4E4C2C + *(int *)((char *)&dword_4E56B4 + v115);
+                                              v117 = pPaperdoll_BodyX + *(int *)((char *)&dword_4E56B0 + v115);
+                                              a2h = pPaperdoll_BodyX + *(int *)((char *)&dword_4E56B0 + v115);
+                                              a3h = pPaperdoll_BodyY + *(int *)((char *)&dword_4E56B4 + v115);
                                               if ( v116 == pIcons_LOD->FindTextureByName("pending") )
                                               {
 LABEL_292:
@@ -7668,8 +7668,8 @@
                                                   v122 = papredoll_dbrds[v244];
                                                   if ( v122 != pIcons_LOD->FindTextureByName("Pending") )
                                                     pRenderer->DrawTextureTransparent(
-                                                      papredoll_4E4C28 + dword_4E5AD0[2 * v244 - 24],
-                                                      paperdoll_4E4C2C + dword_4E5AD4[2 * v244 - 24],
+                                                      pPaperdoll_BodyX + dword_4E5AD0[2 * v244 - 24],
+                                                      pPaperdoll_BodyY + dword_4E5AD4[2 * v244 - 24],
                                                       (Texture *)(v122 != -1 ? (int)&pIcons_LOD->pTextures[v122] : 0));
                                                 }
                                                 v123 = v68->pEquipment.uHelm;
@@ -7706,8 +7706,8 @@
                                                   v125 = v192;
 LABEL_312:
                                                   v126 = 2 * (v125 + 16 * pBodyComplection);
-                                                  a2j = papredoll_4E4C28 + dword_4E58D0[v126];
-                                                  a3i = paperdoll_4E4C2C + dword_4E58D4[v126];
+                                                  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];
                                                   else
@@ -7785,10 +7785,10 @@
                                                   v227 = v135;
                                                   v136 = *(int *)v135;
                                                   v137 = *(int *)v135;
-                                                  a2k = papredoll_4E4C28
+                                                  a2k = pPaperdoll_BodyX
                                                       + array_4E4C30[pBodyComplection].field_8
                                                       - pItemsTable->pItems[v137].uEquipX;
-                                                  a3j = paperdoll_4E4C2C
+                                                  a3j = pPaperdoll_BodyY
                                                       + array_4E4C30[pBodyComplection].field_C
                                                       - pItemsTable->pItems[v137].uEquipY;
                                                   if ( v136 == 64 )
@@ -7835,10 +7835,10 @@
                                                     {
                                                       v245 = 0;
 LABEL_362:
-                                                      v150 = papredoll_4E4C28
+                                                      v150 = pPaperdoll_BodyX
                                                            + array_4E4C30[pBodyComplection].field_0
                                                            - pItemsTable->pItems[v148].uEquipX;
-                                                      a3k = paperdoll_4E4C2C
+                                                      a3k = pPaperdoll_BodyY
                                                           + LODWORD(array_4E4C30[pBodyComplection].field_4)
                                                           - pItemsTable->pItems[v148].uEquipY;
                                                       goto LABEL_370;
@@ -7927,9 +7927,9 @@
                                                                   255);
 LABEL_391:
                                                                 if ( v245 )
-                                                                  pRenderer->DrawTextureTransparent(papredoll_4E4C28
+                                                                  pRenderer->DrawTextureTransparent(pPaperdoll_BodyX
                                                                   + pPaperdollLeftEmptyHand[uPlayerID_a],
-                                                                    paperdoll_4E4C2C + pPaperdollLeftEmptyHand[uPlayerID_a + 1],
+                                                                    pPaperdoll_BodyY + pPaperdollLeftEmptyHand[uPlayerID_a + 1],
                                                                     (Texture *)(*(unsigned int *)((char *)papredoll_dlhs
                                                                                                 + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhs + v240)] : 0));
                                                                 goto LABEL_393;
@@ -8070,16 +8070,16 @@
                                       {
                                         v93 = 2 * v91;
                                         v94 = paperdoll_array_511290[0][v92][1];
-                                        a2g = papredoll_4E4C28 + dword_4E5050[v93];
+                                        a2g = pPaperdoll_BodyX + dword_4E5050[v93];
                                         v95 = dword_4E5050[v93 + 1];
                                       }
                                       else
                                       {
                                         v94 = v223;
-                                        a2g = papredoll_4E4C28 + dword_4E5270[2 * v91];
+                                        a2g = pPaperdoll_BodyX + dword_4E5270[2 * v91];
                                         v95 = dword_4E5270[2 * v91 + 1];
                                       }
-                                      a3g = paperdoll_4E4C2C + v95;
+                                      a3g = pPaperdoll_BodyY + v95;
                                       if ( v94 == pIcons_LOD->FindTextureByName("pending") )
                                         goto LABEL_258;
                                       if ( *(int *)(v242 + 516) & 0xF0 )
@@ -8157,12 +8157,12 @@
                                       v68 = v217;
                                       goto LABEL_259;
                                     }
-                                    v103 = papredoll_4E4C28 + dword_4E5050[2 * v102];
-                                    v104 = paperdoll_4E4C2C + dword_4E5050[2 * v102 + 1];
+                                    v103 = pPaperdoll_BodyX + dword_4E5050[2 * v102];
+                                    v104 = pPaperdoll_BodyY + dword_4E5050[2 * v102 + 1];
                                     v224 = *(int *)(v242 + 516);
                                     v105 = *(int *)(v242 + 516) & 0xF0;
-                                    a2g = papredoll_4E4C28 + dword_4E5050[2 * v102];
-                                    a3g = paperdoll_4E4C2C + dword_4E5050[2 * v102 + 1];
+                                    a2g = pPaperdoll_BodyX + dword_4E5050[2 * v102];
+                                    a3g = pPaperdoll_BodyY + dword_4E5050[2 * v102 + 1];
                                     if ( !v105 )
                                     {
                                       v109 = v94 + 1;
@@ -8433,21 +8433,17 @@
     v26 = pIcons_LOD;
     goto LABEL_48;
   }
-  a3 = paperdoll_4E4C2C;
-  a2 = papredoll_4E4C28;
+  a3 = pPaperdoll_BodyY;
+  a2 = pPaperdoll_BodyX;
   v240 = 4 * uPlayerID_ - 4;
-  pRenderer->DrawTextureTransparent(
-    papredoll_4E4C28,
-    paperdoll_4E4C2C,
+  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));
     //(Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? 72
     //                                                                    * *(unsigned int *)((char *)papredoll_dbods
     //                                                                                      + v240)
     //                                                                    + 7145548 : 0));
   if ( !bRingsShownInCharScreen )
-    pRenderer->_4A612A(
-      a2,
-      a3,
+    pRenderer->_4A612A(a2, a3,
       //(Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? 72
       //                                                                    * *(unsigned int *)((char *)papredoll_dbods
       //                                                                                      + v240)
@@ -8459,9 +8455,7 @@
   if ( !v6
     || (v7 = *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v6 + 5], pItemsTable->pItems[v7].uEquipType != 1)
     && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayer->pEquipment.uOffHand) )
-    pRenderer->DrawTextureTransparent(
-      papredoll_4E4C28 + dword_4E5AE0[2 * v5],
-      paperdoll_4E4C2C + dword_4E5AE0[2 * v5 + 1],
+    pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[2 * v5], pPaperdoll_BodyY + pPaperdoll_LeftHand[2 * v5 + 1],
       (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0));
       //(Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? 72
       //                                                                    * *(unsigned int *)((char *)papredoll_dlads
@@ -8476,9 +8470,9 @@
     v218 = v9;
     v11 = *(int *)v9;
     v12 = *(int *)v9;
-    v13 = papredoll_4E4C28 + array_4E4C30[v5].field_8 - pItemsTable->pItems[v12].uEquipX;
+    v13 = pPaperdoll_BodyX + array_4E4C30[v5].field_8 - pItemsTable->pItems[v12].uEquipX;
     a2a = v13;
-    a3a = paperdoll_4E4C2C + *(int *)((char *)&array_4E4C30[0].field_C + v10) - pItemsTable->pItems[v12].uEquipY;
+    a3a = pPaperdoll_BodyY + *(int *)((char *)&array_4E4C30[0].field_C + v10) - pItemsTable->pItems[v12].uEquipY;
     if ( v11 == 64 )
       v166 = "item64v1";
     else
@@ -8552,9 +8546,8 @@
       pRenderer->_4A612A(a2a, a3a, v20, v229);
   }
 LABEL_393:
-  pRenderer->DrawTextureTransparent(
-    papredoll_4E4C28 + pPaperdollRightHand[uPlayerID_a],
-    paperdoll_4E4C2C + pPaperdollRightHand[uPlayerID_a + 1],
+  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));
     //(Texture *)(*(unsigned int *)((char *)papredoll_drhs + v240) != -1 ? 72
     //                                                                   * *(unsigned int *)((char *)papredoll_drhs + v240)
@@ -8565,9 +8558,8 @@
     v162 = *(int *)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v161 + 5];
     if ( pItemsTable->pItems[v162].uEquipType == 1
       || pItemsTable->pItems[v162].uSkillType == 4 && !v217->pEquipment.uOffHand )
-      pRenderer->DrawTextureTransparent(
-        papredoll_4E4C28 + pPaperdollLeftHand[uPlayerID_a],
-        paperdoll_4E4C2C + pPaperdollLeftHand[uPlayerID_a + 1],
+      pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[uPlayerID_a],
+        pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[uPlayerID_a + 1],
         (Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhus + v240)] : 0));
         //(Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? 72
         //                                                                    * *(unsigned int *)((char *)papredoll_dlhus
@@ -8575,13 +8567,9 @@
         //                                                                    + 7145548 : 0));
   }
   if ( !bRingsShownInCharScreen )
-    pRenderer->DrawTextureTransparent(
-      0x25Bu,
-      0x12Bu,
+    pRenderer->DrawTextureTransparent(0x25Bu, 0x12Bu,
       (Texture *)(uTextureID_MAGNIF_B != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_MAGNIF_B] : 0));
-  pRenderer->DrawTextureTransparent(
-    0x1D4u,
-    0,
+  pRenderer->DrawTextureTransparent(0x1D4u, 0,
     (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0));
 }
 
--- a/mm7_data.cpp	Thu Jan 17 22:59:03 2013 +0600
+++ b/mm7_data.cpp	Fri Jan 18 00:00:20 2013 +0600
@@ -644,8 +644,8 @@
 char aInvalidDevic_0[777]; // idb
 char aEWorkMsdevMm_3[777]; // idb
 char aErrorNoMouseFo[22]; // weak
-int papredoll_4E4C28; // weak
-int paperdoll_4E4C2C; // weak
+int pPaperdoll_BodyX = 481;
+int pPaperdoll_BodyY = 0;
 int paperdoll_array_4E4E30[4][17][2];
 int dword_4E5050[8];
 int dword_4E5270[8];
@@ -659,9 +659,27 @@
 int dword_4E58D4[777]; // weak
 int dword_4E5AD0[777]; // weak
 int dword_4E5AD4[777]; // weak
-int dword_4E5AE0[8];
-int pPaperdollLeftHand[8];
-int pPaperdollRightHand[8];
+int pPaperdoll_LeftHand[8] =
+{
+  0x67, 0x6A,
+  0x65, 0x6C,
+  0x74, 0x8D,
+  0x74, 0x93,
+};
+int pPaperdoll_SecondLeftHand[8] =
+{
+  0x1A, 0x6B,
+  0x28, 0x6D,
+  0x19, 0x8D,
+  0x20, 0x92,
+};
+int pPaperdoll_RightHand[8] = //fist
+{
+  0x1E, 0x90,
+  0x22, 0x9E,
+  0x19, 0xBA,
+  0x1F, 0xB8,
+};
 int pPaperdollLeftEmptyHand[8];
 int dword_4E5C1C[6];
 int dword_4E5C34[6];
--- a/mm7_data.h	Thu Jan 17 22:59:03 2013 +0600
+++ b/mm7_data.h	Fri Jan 18 00:00:20 2013 +0600
@@ -630,8 +630,8 @@
 extern char aInvalidDevic_0[]; // idb
 extern char aEWorkMsdevMm_3[]; // idb
 extern char aErrorNoMouseFo[22]; // weak
-extern int papredoll_4E4C28; // weak
-extern int paperdoll_4E4C2C; // weak
+extern int pPaperdoll_BodyX; // weak
+extern int pPaperdoll_BodyY; // weak
 extern int paperdoll_array_4E4E30[4][17][2];
 extern int dword_4E5050[8];
 extern int dword_4E5270[8];
@@ -645,9 +645,9 @@
 extern int dword_4E58D4[]; // weak
 extern int dword_4E5AD0[]; // weak
 extern int dword_4E5AD4[]; // weak
-extern int dword_4E5AE0[8];
-extern int pPaperdollLeftHand[8];
-extern int pPaperdollRightHand[8];
+extern int pPaperdoll_LeftHand[8];
+extern int pPaperdoll_SecondLeftHand[8];
+extern int pPaperdoll_RightHand[8];
 extern int pPaperdollLeftEmptyHand[8];
 extern int dword_4E5C1C[6];
 extern int dword_4E5C34[6];