changeset 86:c83d06692295

Слияние
author Ritor1
date Mon, 22 Oct 2012 09:20:49 +0600
parents 1265125099c7 (diff) 484492a6dd28 (current diff)
children c0cf9393af64
files mm7_4.cpp
diffstat 1 files changed, 56 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_4.cpp	Sun Oct 21 23:26:23 2012 +0600
+++ b/mm7_4.cpp	Mon Oct 22 09:20:49 2012 +0600
@@ -5441,7 +5441,7 @@
   int v105; // ecx@79
   int v106; // edi@81
   unsigned int v107; // ST0C_4@81
-  int pTextY; // ST08_4@81
+  int v108; // ST08_4@81
   int v109; // eax@81
   const char *v110; // ST10_4@82
   int v111; // ST0C_4@82
@@ -5451,7 +5451,7 @@
   int v115; // eax@82
   const char *uRaceName; // [sp+0h] [bp-170h]@39
   char Str1[200]; // [sp+10h] [bp-160h]@14
-  GUIWindow pWindow; // [sp+D8h] [bp-98h]@83
+  GUIWindow v118; // [sp+D8h] [bp-98h]@83
   int v119; // [sp+12Ch] [bp-44h]@18
   size_t v120; // [sp+130h] [bp-40h]@25
   int uY; // [sp+134h] [bp-3Ch]@18
@@ -5468,8 +5468,7 @@
   int uX; // [sp+160h] [bp-10h]@18
   unsigned int v133; // [sp+164h] [bp-Ch]@25
   int v134; // [sp+168h] [bp-8h]@14
-  Player *pPlayer;
-  const char *pSkillName;
+  char *Str; // [sp+16Ch] [bp-4h]@18
 
   uColor1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xD1u, 0xBBu, 0x61u);
   uColorTeal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xF7u, 0xF7u);
@@ -5546,7 +5545,7 @@
   v122 = 5 * v6 + 169;
   v123 = 3 * v6 + 311;
   v129 = 493;
-  pPlayer = pParty->pPlayers;
+  Str = pParty->pPlayers[0].pName;
   v119 = 6 * v6 + 169;
   do
   {
@@ -5555,14 +5554,14 @@
       v134 + 73,
       100,
       0,
-      pClassNames[(unsigned __int8)pPlayer->uClass],
+      pClassNames[(unsigned __int8)Str[17]],
       0,
       0,
       0);
     pRenderer->DrawTextureTransparent(
       v134 + 77,
       50u,
-      pTexture_IC_KNIGHT[pPlayer->uClass/4]);
+      *(&pTexture_IC_KNIGHT + ((unsigned int)(unsigned __int8)Str[17] >> 2)));
     v11 = pGUIWindow_CurrentMenu->field_40;
     if ( v11 && (v12 = pGUIWindow_CurrentMenu->ptr_1C, v12 == v124) )
     {
@@ -5600,7 +5599,7 @@
           if ( v120 && v126 != v120 )
             strcpy(Str, (const char *)pKeyActionMap->pPressedKeysBuffer);
           pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, v134, 0x7Cu, 0, Str, 130, 0);
-          *((short *)pPlayer->pName + 3323) = 1;
+          *((short *)Str + 3323) = 1;
         }
       }
       else
@@ -5621,9 +5620,9 @@
     }
     else
     {
-      pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, v134, 0x7Cu, 0, pPlayer->pName, 130, 0);
-    }
-    uNumRace = pPlayer->GetRace();
+      pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, v134, 0x7Cu, 0, Str, 130, 0);
+    }
+    uNumRace = ((Player *)(Str - 168))->GetRace();
      switch (uNumRace)
     {
       case 0:  uRaceName = pGlobalTXT_LocalizationStrings[99]; break; // "Human"       
@@ -5636,45 +5635,43 @@
     v21 = uColor1;
     v22 = pFontCreate->AlignText_Center(0x96u, Str1);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, v22 + uX - 24, 291, v21, Str1, 0, 0, 0);
-    uNumMight = pPlayer->GetActualMight();
+    uNumMight = ((Player *)(Str - 168))->GetActualMight();
     sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[144], v129, uNumMight);// "Might"
-    LOWORD(v24) = pPlayer->GetStatColor(0);
+    LOWORD(v24) = ((Player *)(Str - 168))->GetStatColor(0);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 169, v24, pTmpBuf, 0, 0, 0);
-    v25 = pPlayer->GetActualIntelligence();
+    v25 = ((Player *)(Str - 168))->GetActualIntelligence();
     sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[116], v129, v25);// "Intellect"
-    LOWORD(v26) = pPlayer->GetStatColor(1u);
+    LOWORD(v26) = ((Player *)(Str - 168))->GetStatColor(1u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v128 + 169, v26, pTmpBuf, 0, 0, 0);
-    v27 = pPlayer->GetActualWillpower();
+    v27 = ((Player *)(Str - 168))->GetActualWillpower();
     sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[163], v129, v27);// "Personality"
-    LOWORD(v28) = pPlayer->GetStatColor(2u);
+    LOWORD(v28) = ((Player *)(Str - 168))->GetStatColor(2u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 2 * v128 + 169, v28, pTmpBuf, 0, 0, 0);
-    v29 = pPlayer->GetActualEndurance();
+    v29 = ((Player *)(Str - 168))->GetActualEndurance();
     sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[75], v129, v29);// "Endurance"
-    LOWORD(v30) = pPlayer->GetStatColor(3u);
+    LOWORD(v30) = ((Player *)(Str - 168))->GetStatColor(3u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, uY, v30, pTmpBuf, 0, 0, 0);
-    v31 = pPlayer->GetActualAccuracy();
+    v31 = ((Player *)(Str - 168))->GetActualAccuracy();
     sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[1], v129, v31);// "Accuracy"
-    LOWORD(v32) = pPlayer->GetStatColor(4u);
+    LOWORD(v32) = ((Player *)(Str - 168))->GetStatColor(4u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 4 * v128 + 169, v32, pTmpBuf, 0, 0, 0);
-    v33 = pPlayer->GetActualSpeed();
+    v33 = ((Player *)(Str - 168))->GetActualSpeed();
     sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[211], v129, v33);// "Speed"
-    LOWORD(v34) = pPlayer->GetStatColor(5u);
+    LOWORD(v34) = ((Player *)(Str - 168))->GetStatColor(5u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v122, v34, pTmpBuf, 0, 0, 0);
-    v35 = pPlayer->GetActualLuck();
+    v35 = ((Player *)(Str - 168))->GetActualLuck();
     sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[136], v129, v35);// "Luck"
-    LOWORD(v36) = pPlayer->GetStatColor(6u);
+    LOWORD(v36) = ((Player *)(Str - 168))->GetStatColor(6u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v119, v36, pTmpBuf, 0, 0, 0);
-    v37 = pPlayer->GetSkillIdxByOrder(0);
-	pSkillName = pSkillNames[v37];
-    v38 = pFontCreate->AlignText_Center(0x96u, pSkillName);
-    sprintf(pTmpBuf, "\t%03u%s", v38, pSkillName);
+    v37 = ((Player *)(Str - 168))->GetSkillIdxByOrder(0);
+    v38 = pFontCreate->AlignText_Center(0x96u, pSkillNames[v37]);
+    sprintf(pTmpBuf, "\t%03u%s", v38);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 311, uColorWhite, pTmpBuf, 0, 0, 0);
-    v39 = pPlayer->GetSkillIdxByOrder(1);
-	pSkillName = pSkillNames[v39];
-    v40 = pFontCreate->AlignText_Center(0x96u, pSkillName);
-    sprintf(pTmpBuf, "\t%03u%s", v40, pSkillName);
+    v39 = ((Player *)(Str - 168))->GetSkillIdxByOrder(1);
+    v40 = pFontCreate->AlignText_Center(0x96u, pSkillNames[v39]);
+    sprintf(pTmpBuf, "\t%03u%s", v40);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, v128 + 311, uColorWhite, pTmpBuf, 0, 0, 0);
-    v41 = pPlayer->GetSkillIdxByOrder(2);
+    v41 = ((Player *)(Str - 168))->GetSkillIdxByOrder(2);
     v42 = pSkillNames[v41];
     v43 = pSkillNames[v41];
     v133 = v41;
@@ -5684,7 +5681,7 @@
     if ( (signed int)v133 >= 37 )
       v45 = uColorTeal;
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 2 * v128 + 311, v45, pTmpBuf, 0, 0, 0);
-    v46 = pPlayer->GetSkillIdxByOrder(3);
+    v46 = ((Player *)(Str - 168))->GetSkillIdxByOrder(3);
     v47 = pSkillNames[v46];
     v48 = pSkillNames[v46];
     v133 = v46;
@@ -5694,13 +5691,13 @@
     if ( (signed int)v133 >= 37 )
       v50 = uColorTeal;
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, v123, v50, pTmpBuf, 0, 0, 0);
-    pPlayer++;
+    Str += 6972;
     v124 = (char *)v124 + 1;
     v134 += 159;
     v129 -= 158;
     uX += 158;
   }
-  while ( (signed int)pPlayer->pName < (signed int)&pParty->pPickedItem.uNumCharges );
+  while ( (signed int)Str < (signed int)&pParty->pPickedItem.uNumCharges );
   strcpy(Str1, pGlobalTXT_LocalizationStrings[41]);// "Class"
   v51 = strlen(Str1) - 1;
   v134 = v51;
@@ -5822,12 +5819,13 @@
     if ( !pParty->pPlayers[0].pActiveSkills[v102 + 3486 * uPlayerCreationUI_SelectedCharacter] )
       v105 = uColorWhite;
     v106 = v134 / 3;
-	v107 = v105;
-	v109 = pFontCreate->AlignText_Center(100u, Str1);
+    v107 = v105;
+    v108 = v128 * v134 % 3 + 417;
+    v109 = pFontCreate->AlignText_Center(100u, Str1);
     pGUIWindow_CurrentMenu->DrawText(
       pFontCreate,
       100 * v106 + v109 + uColorGreen + 17,
-      v128 * (v134 % 3) + 417,
+      v108,
       v107,
       Str1,
       0,
@@ -5847,16 +5845,16 @@
   pGUIWindow_CurrentMenu->DrawText(pFontCreate, v115 + 530, 410, v114, pTmpBuf, 0, 0, 0);
   if ( GameUI_StatusBar_TimedStringTimeLeft > GetTickCount() )
   {
-    pWindow.str_48 = pGlobalTXT_LocalizationStrings[412];// "Create Party cannot be completed unless you have assigned all characters 2 extra skills and have spent all of your bonus points."
+    v118.str_48 = pGlobalTXT_LocalizationStrings[412];// "Create Party cannot be completed unless you have assigned all characters 2 extra skills and have spent all of your bonus points."
     if ( v113 < 0 )
-      pWindow.str_48 = pGlobalTXT_LocalizationStrings[413];// "You can't spend more than 50 points."
-    pWindow.uFrameWidth = 300;
-    pWindow.uFrameHeight = 100;
-    pWindow.uFrameX = 170;
-    pWindow.uFrameY = 140;
-    pWindow.uFrameZ = 469;
-    pWindow.uFrameW = 239;
-    pWindow._415551(0);
+      v118.str_48 = pGlobalTXT_LocalizationStrings[413];// "You can't spend more than 50 points."
+    v118.uFrameWidth = 300;
+    v118.uFrameHeight = 100;
+    v118.uFrameX = 170;
+    v118.uFrameY = 140;
+    v118.uFrameZ = 469;
+    v118.uFrameW = 239;
+    v118._415551(0);
   }
   pRenderer->EndScene();
 }
@@ -5891,15 +5889,15 @@
   uPlayerCreationUI_SkySliderPos = 0;
   uPlayerCreationUI_SelectedCharacter = 0;
   v0 = LOBYTE(pFontCreate->uFontHeight) - 2;
-  pTexture_IC_KNIGHT[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_KNIGHT", TEXTURE_16BIT_PALETTE)];
-  pTexture_IC_KNIGHT[1] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_THIEF", TEXTURE_16BIT_PALETTE)];
-  pTexture_IC_KNIGHT[2] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_MONK", TEXTURE_16BIT_PALETTE)];
-  pTexture_IC_KNIGHT[3] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_PALAD", TEXTURE_16BIT_PALETTE)];
-  pTexture_IC_KNIGHT[4] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_ARCH", TEXTURE_16BIT_PALETTE)];
-  pTexture_IC_KNIGHT[5] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_RANGER", TEXTURE_16BIT_PALETTE)];
-  pTexture_IC_KNIGHT[6] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_CLER", TEXTURE_16BIT_PALETTE)];
-  pTexture_IC_KNIGHT[7] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_DRUID", TEXTURE_16BIT_PALETTE)];
-  pTexture_IC_KNIGHT[8] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_SORC", TEXTURE_16BIT_PALETTE)];
+  pTexture_IC_KNIGHT = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_KNIGHT", TEXTURE_16BIT_PALETTE)];
+  pTexture_IC_THIEF  = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_THIEF", TEXTURE_16BIT_PALETTE)];
+  pTexture_IC_MONK   = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_MONK", TEXTURE_16BIT_PALETTE)];
+  pTexture_IC_PALAD  = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_PALAD", TEXTURE_16BIT_PALETTE)];
+  pTexture_IC_ARCH   = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_ARCH", TEXTURE_16BIT_PALETTE)];
+  pTexture_IC_RANGER = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_RANGER", TEXTURE_16BIT_PALETTE)];
+  pTexture_IC_CLER   = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_CLER", TEXTURE_16BIT_PALETTE)];
+  pTexture_IC_DRUID  = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_DRUID", TEXTURE_16BIT_PALETTE)];
+  pTexture_IC_SORC   = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_SORC", TEXTURE_16BIT_PALETTE)];
   pTexture_MAKETOP   = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("MAKETOP", TEXTURE_16BIT_PALETTE)];
   uX = 0;
   pTexture_MAKESKY = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("MAKESKY", TEXTURE_16BIT_PALETTE)];