changeset 42:7071e4688db6

Слияние
author Ritor1
date Fri, 19 Oct 2012 23:29:04 +0600
parents fd64b06a39a8 (diff) f4450ff595fe (current diff)
children 484492a6dd28
files Player.cpp
diffstat 7 files changed, 124 insertions(+), 135 deletions(-) [+]
line wrap: on
line diff
--- a/Party.cpp	Fri Oct 19 03:36:38 2012 +0200
+++ b/Party.cpp	Fri Oct 19 23:29:04 2012 +0600
@@ -544,9 +544,9 @@
     ::pPlayers[i + 1] = &pPlayers[i];
 
   pPlayers[0].Reset(0);
-  pPlayers[0].Reset(4);
-  pPlayers[0].Reset(24);
-  pPlayers[0].Reset(32);
+  pPlayers[1].Reset(4);
+  pPlayers[2].Reset(24);
+  pPlayers[3].Reset(32);
   pPlayers[0].uFace = 17;
   pPlayers[0].field_1924 = 17;
   pPlayers[0].uVoiceID = 17;
--- a/Player.cpp	Fri Oct 19 03:36:38 2012 +0200
+++ b/Player.cpp	Fri Oct 19 23:29:04 2012 +0600
@@ -6879,33 +6879,44 @@
 __int16 Player::GetStatColor(unsigned int uStat)
 {
   Player *v2; // edi@1
-  __int16 v3; // si@1
-  int v4; // eax@1
+  __int16 uWhite; // si@1
+//  int uStartingHP; // eax@1
   int v5; // edx@1
-  unsigned __int8 v6; // zf@1
-  char v7; // sf@1
+ // unsigned __int8 v6; // zf@1
+ // char v7; // sf@1
   unsigned __int8 v8; // of@1
   __int16 result; // ax@2
-  __int16 v10; // [sp+8h] [bp-8h]@1
-  __int16 v11; // [sp+Ch] [bp-4h]@1
+  __int16 uGreen; // [sp+8h] [bp-8h]@1
+  __int16 uRed; // [sp+Ch] [bp-4h]@1
 
   v2 = this;
-  v11 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0);
-  v10 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
-  v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
-  v4 = stru_4ED7B0.race[0].attr[uStat + 7 * GetRace()].uBaseValue;
-  v8 = __OFSUB__(v5, v4);
-  v6 = v5 == v4;
-  v7 = v5 - v4 < 0;
-  if ( v5 >= v4 )
-  {
-    result = v10;
-    if ( (unsigned __int8)(v7 ^ v8) | v6 )
-      result = v3;
+  uRed = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0);
+  uGreen = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
+  uWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
+  v8 = stru_4ED7B0.race[GetRace()].attr[uStat].uBaseValue;
+
+  int attribute_value = 0;
+  switch (uStat)
+  {
+    case 0:  attribute_value = uMight;        break;
+    case 1:  attribute_value = uIntelligence; break;
+    case 2:  attribute_value = uWillpower;    break;
+    case 3:  attribute_value = uEndurance;    break;
+    case 4:  attribute_value = uSpeed;        break;
+    case 5:  attribute_value = uAccuracy;     break;
+    case 6:  attribute_value = uLuck;         break;
+  };
+
+  v5 = attribute_value;
+  if ( v5 >= v8 )
+  {
+    result = uGreen;
+    if ( v5 == v8 )
+      result = uWhite;
   }
   else
   {
-    result = v11;
+    result = uRed;
   }
   return result;
 }
--- a/Render.cpp	Fri Oct 19 03:36:38 2012 +0200
+++ b/Render.cpp	Fri Oct 19 23:29:04 2012 +0600
@@ -6915,7 +6915,7 @@
   IDirectDrawSurface **v1; // esi@2
 
   if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT
-    || (v1 = (IDirectDrawSurface **)&this->pFrontBuffer2, pVersion->pVersionInfo.dwMajorVersion != 4) )
+    || (v1 = (IDirectDrawSurface **)&this->pFrontBuffer2, pVersion->pVersionInfo.dwMajorVersion >= 5u) )
     v1 = (IDirectDrawSurface **)&this->pFrontBuffer4;
   if ( (*v1)->IsLost() == DDERR_SURFACELOST )
     (*v1)->Restore();
--- a/Texture.cpp	Fri Oct 19 03:36:38 2012 +0200
+++ b/Texture.cpp	Fri Oct 19 23:29:04 2012 +0600
@@ -641,24 +641,22 @@
  uNumPixels=uWidth*uHeight;		  // dword @ 000010
  
  memset(pOutPixels, 0, uNumPixels * sizeof(__int16));
-
-  for (short i=1; i<=15; i++)
-	  {
-	  if ((1<<i)==uWidth)
-		  {
-		  field_18=i;
-		  break;
-		  }
-	  }
-
-  for (short i=1; i<=15; i++)
-	  {
-	  if ((1<<i)==uHeight)
-		  {
-		  field_1A=i;
-		  break;
-		  }
-	  }
+  short i=1;
+  while ( (1<<i) !=uWidth)
+  {
+	  ++i;
+      if (i >= 15)
+	  break;
+  }
+  field_18=i;
+  short i_=1;
+  while ( (1<<i_) !=uHeight)
+  {
+	  ++i_;
+      if (i_ >= 15)
+	  break;
+  }
+  field_1A=i_;
   switch (field_18)
 	  {
   case 2:   field_1C = 3;    break;
@@ -692,9 +690,9 @@
  
  read_offset = 128;
  if (psx_head2.planes != 3)
- 	  return 3;
+ 	  return 0;
   current_line = 0;
-  if ( uWidth > 0 )
+  if ( uHeight > 0 )
   {
    dec_position = pOutPixels;
    do
@@ -706,11 +704,11 @@
     {
      do
      {
-      test_byte = *(pPcx + read_offset);
+      test_byte = pPcx[read_offset];
       ++read_offset;
       if ((test_byte & 0xC0) == 0xC0)
       {	
-	    value = *(pPcx + read_offset);
+	    value = pPcx[read_offset];
        	++read_offset; 
       
        if ((test_byte & 0x3F) > 0)
--- a/Time.cpp	Fri Oct 19 03:36:38 2012 +0200
+++ b/Time.cpp	Fri Oct 19 23:29:04 2012 +0600
@@ -9,7 +9,7 @@
 
 
 
-Timer *pMiscTimer;
+Timer *pMiscTimer = new Timer;
 Timer *pEventTimer;
 
 
--- a/mm7_4.cpp	Fri Oct 19 03:36:38 2012 +0200
+++ b/mm7_4.cpp	Fri Oct 19 23:29:04 2012 +0600
@@ -5334,13 +5334,13 @@
 void __cdecl PlayerCreationUI_Draw()
 {
   Texture *v0; // edi@1
-  const char *v1; // ST10_4@3
+  const char *uTitleText; // ST10_4@3
   int v2; // eax@3
   IconFrame *v3; // eax@3
   int v4; // ecx@7
-  GUIButton *v5; // edi@12
+  GUIButton *uPosActiveItem; // edi@12
   int v6; // esi@14
-  int v7; // eax@14
+  int uNumLet; // eax@14
   char v8; // al@17
   int v9; // ecx@17
   char v10; // sf@17
@@ -5351,12 +5351,12 @@
   char *v15; // ST14_4@24
   size_t v16; // eax@28
   int v17; // eax@33
-  enum CHARACTER_RACE v18; // eax@35
+  enum CHARACTER_RACE uNumRace; // eax@35
   int v19; // eax@36
   int v20; // eax@37
   int v21; // ST0C_4@44
   int v22; // eax@44
-  int v23; // eax@44
+  int uNumMight; // eax@44
   unsigned int v24; // eax@44
   int v25; // eax@44
   unsigned int v26; // eax@44
@@ -5449,7 +5449,7 @@
   signed int v113; // edi@82
   int v114; // ST0C_4@82
   int v115; // eax@82
-  const char *v116; // [sp+0h] [bp-170h]@39
+  const char *uRaceName; // [sp+0h] [bp-170h]@39
   char Str1[200]; // [sp+10h] [bp-160h]@14
   GUIWindow v118; // [sp+D8h] [bp-98h]@83
   int v119; // [sp+12Ch] [bp-44h]@18
@@ -5468,7 +5468,7 @@
   int uX; // [sp+160h] [bp-10h]@18
   unsigned int v133; // [sp+164h] [bp-Ch]@25
   int v134; // [sp+168h] [bp-8h]@14
-  char *Str; // [sp+16Ch] [bp-4h]@18
+  Player *pPlayer;
 
   uColor1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xD1u, 0xBBu, 0x61u);
   uColorTeal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xF7u, 0xF7u);
@@ -5482,11 +5482,11 @@
   if ( (signed int)uPlayerCreationUI_SkySliderPos > 640 )
     uPlayerCreationUI_SkySliderPos = 0;
   pRenderer->DrawTextureTransparent(0, 0, pTexture_MAKETOP);
-  v1 = pGlobalTXT_LocalizationStrings[51];
+  uTitleText = pGlobalTXT_LocalizationStrings[51];
   uPlayerCreationUI_SelectedCharacter = (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38)
                                       / 7;
-  v2 = pFontCChar->AlignText_Center(0x280u, pGlobalTXT_LocalizationStrings[51]);
-  pGUIWindow_CurrentMenu->DrawText(pFontCChar, v2 + 1, 0, 0, v1, 0, 0, 0);
+  v2 = pFontCChar->AlignText_Center(640u, pGlobalTXT_LocalizationStrings[51]);
+  pGUIWindow_CurrentMenu->DrawText(pFontCChar, v2 + 1, 0, 0, uTitleText, 0, 0, 0);
   pRenderer->DrawTextureTransparent(17u, 35u, pPlayerPortraits[(char)pParty->pPlayers[0].uFace]);
   pRenderer->DrawTextureTransparent(176u, 35u, pPlayerPortraits[(char)pParty->pPlayers[1].uFace]);
   pRenderer->DrawTextureTransparent(335u, 35u, pPlayerPortraits[(char)pParty->pPlayers[2].uFace]);
@@ -5514,28 +5514,28 @@
   {
     v4 = 12;
   }
-  pRenderer->DrawTextureTransparent(v4, 0x1Du, &pIcons_LOD->pTextures[v3->uTextureID]);
-  v5 = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->field_2C_focus_id);
-  pRenderer->DrawTextureTransparent(v5->uZ - 4, v5->uY, pTextures_arrowl[uPlayerCreationUI_ArrowAnim + 1]);
-  pRenderer->DrawTextureTransparent(v5->uX - 12, v5->uY, pTextures_arrowr[uPlayerCreationUI_ArrowAnim-- + 1]);
+  pRenderer->DrawTextureTransparent(v4, 29, &pIcons_LOD->pTextures[v3->uTextureID]);
+  uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->field_2C_focus_id);
+  pRenderer->DrawTextureTransparent(uPosActiveItem->uZ - 4, uPosActiveItem->uY, pTextures_arrowl[uPlayerCreationUI_ArrowAnim + 1]);
+  pRenderer->DrawTextureTransparent(uPosActiveItem->uX - 12, uPosActiveItem->uY, pTextures_arrowr[uPlayerCreationUI_ArrowAnim-- + 1]);
   if ( uPlayerCreationUI_ArrowAnim < 0 )
     uPlayerCreationUI_ArrowAnim = 18;
   v6 = LOBYTE(pFontCreate->uFontHeight) - 2;
   v128 = LOBYTE(pFontCreate->uFontHeight) - 2;
   strcpy(Str1, pGlobalTXT_LocalizationStrings[205]);// "Skills"
-  v7 = strlen(Str1) - 1;
-  v134 = v7;
-  if ( v7 >= 0 )
+  uNumLet = strlen(Str1) - 1;
+  v134 = uNumLet;
+  if ( uNumLet >= 0 )
   {
     while ( 1 )
     {
-      v8 = toupper((unsigned __int8)Str1[v7]);
+      v8 = toupper((unsigned __int8)Str1[uNumLet]);
       v9 = v134;
       v10 = v134-- - 1 < 0;
       Str1[v9] = v8;
       if ( v10 )
         break;
-      v7 = v134;
+      uNumLet = v134;
     }
   }
   v134 = 18;
@@ -5545,7 +5545,7 @@
   v122 = 5 * v6 + 169;
   v123 = 3 * v6 + 311;
   v129 = 493;
-  Str = pParty->pPlayers[0].pName;
+  pPlayer = pParty->pPlayers;
   v119 = 6 * v6 + 169;
   do
   {
@@ -5554,14 +5554,14 @@
       v134 + 73,
       100,
       0,
-      pClassNames[(unsigned __int8)Str[17]],
+      pClassNames[(unsigned __int8)pPlayer->uClass],
       0,
       0,
       0);
     pRenderer->DrawTextureTransparent(
       v134 + 77,
       50u,
-      *(&pTexture_IC_KNIGHT + ((unsigned int)(unsigned __int8)Str[17] >> 2)));
+      *(&pTexture_IC_KNIGHT + ((unsigned int)(unsigned __int8)pPlayer->uClass >> 2)));
     v11 = pGUIWindow_CurrentMenu->field_40;
     if ( v11 && (v12 = pGUIWindow_CurrentMenu->ptr_1C, v12 == v124) )
     {
@@ -5599,7 +5599,7 @@
           if ( v120 && v126 != v120 )
             strcpy(Str, (const char *)pKeyActionMap->pPressedKeysBuffer);
           pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, v134, 0x7Cu, 0, Str, 130, 0);
-          *((short *)Str + 3323) = 1;
+          *((short *)pPlayer->pName + 3323) = 1;
         }
       }
       else
@@ -5620,104 +5620,84 @@
     }
     else
     {
-      pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, v134, 0x7Cu, 0, Str, 130, 0);
-    }
-    v18 = ((Player *)(Str - 168))->GetRace();
-    if ( v18 )
-    {
-      v19 = v18 - 1;
-      if ( v19 )
-      {
-        v20 = v19 - 1;
-        if ( v20 )
-        {
-          if ( v20 != 1 )
-            goto LABEL_44;
-          v116 = pGlobalTXT_LocalizationStrings[101];// "Dwarf"
-        }
-        else
-        {
-          v116 = pGlobalTXT_LocalizationStrings[106];// "Goblin"
-        }
-      }
-      else
-      {
-        v116 = pGlobalTXT_LocalizationStrings[103];// "Elf"
-      }
-    }
-    else
-    {
-      v116 = pGlobalTXT_LocalizationStrings[99];// "Human"
-    }
-    strcpy(pTmpBuf, v116);
-LABEL_44:
+      pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, v134, 0x7Cu, 0, pPlayer->pName, 130, 0);
+    }
+    uNumRace = pPlayer->GetRace();
+     switch (uNumRace)
+    {
+      case 0:  uRaceName = pGlobalTXT_LocalizationStrings[99]; break; // "Human"       
+      case 1:  uRaceName = pGlobalTXT_LocalizationStrings[101]; break; // "Dwarf"
+      case 2:  uRaceName = pGlobalTXT_LocalizationStrings[106]; break; // "Goblin"
+	  case 3:  uRaceName = pGlobalTXT_LocalizationStrings[103]; break; // "Elf"   
+    }; 
+	strcpy(pTmpBuf, uRaceName);
     pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, v134 + 72, v128 + 12, 0, pTmpBuf, 130, 0);
     v21 = uColor1;
     v22 = pFontCreate->AlignText_Center(0x96u, Str1);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, v22 + uX - 24, 291, v21, Str1, 0, 0, 0);
-    v23 = ((Player *)(Str - 168))->GetActualMight();
-    sprintfex(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[144], v129, v23);// "Might"
-    LOWORD(v24) = ((Player *)(Str - 168))->GetStatColor(0);
+    uNumMight = pPlayer->GetActualMight();
+    sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[144], v129, uNumMight);// "Might"
+    LOWORD(v24) = pPlayer->GetStatColor(0);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 169, v24, pTmpBuf, 0, 0, 0);
-    v25 = ((Player *)(Str - 168))->GetActualIntelligence();
-    sprintfex(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[116], v129, v25);// "Intellect"
-    LOWORD(v26) = ((Player *)(Str - 168))->GetStatColor(1u);
+    v25 = pPlayer->GetActualIntelligence();
+    sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[116], v129, v25);// "Intellect"
+    LOWORD(v26) = pPlayer->GetStatColor(1u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v128 + 169, v26, pTmpBuf, 0, 0, 0);
-    v27 = ((Player *)(Str - 168))->GetActualWillpower();
-    sprintfex(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[163], v129, v27);// "Personality"
-    LOWORD(v28) = ((Player *)(Str - 168))->GetStatColor(2u);
+    v27 = pPlayer->GetActualWillpower();
+    sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[163], v129, v27);// "Personality"
+    LOWORD(v28) = pPlayer->GetStatColor(2u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 2 * v128 + 169, v28, pTmpBuf, 0, 0, 0);
-    v29 = ((Player *)(Str - 168))->GetActualEndurance();
-    sprintfex(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[75], v129, v29);// "Endurance"
-    LOWORD(v30) = ((Player *)(Str - 168))->GetStatColor(3u);
+    v29 = pPlayer->GetActualEndurance();
+    sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[75], v129, v29);// "Endurance"
+    LOWORD(v30) = pPlayer->GetStatColor(3u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, uY, v30, pTmpBuf, 0, 0, 0);
-    v31 = ((Player *)(Str - 168))->GetActualAccuracy();
-    sprintfex(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[1], v129, v31);// "Accuracy"
-    LOWORD(v32) = ((Player *)(Str - 168))->GetStatColor(4u);
+    v31 = pPlayer->GetActualAccuracy();
+    sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[1], v129, v31);// "Accuracy"
+    LOWORD(v32) = pPlayer->GetStatColor(4u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 4 * v128 + 169, v32, pTmpBuf, 0, 0, 0);
-    v33 = ((Player *)(Str - 168))->GetActualSpeed();
-    sprintfex(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[211], v129, v33);// "Speed"
-    LOWORD(v34) = ((Player *)(Str - 168))->GetStatColor(5u);
+    v33 = pPlayer->GetActualSpeed();
+    sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[211], v129, v33);// "Speed"
+    LOWORD(v34) = pPlayer->GetStatColor(5u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v122, v34, pTmpBuf, 0, 0, 0);
-    v35 = ((Player *)(Str - 168))->GetActualLuck();
-    sprintfex(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[136], v129, v35);// "Luck"
-    LOWORD(v36) = ((Player *)(Str - 168))->GetStatColor(6u);
+    v35 = pPlayer->GetActualLuck();
+    sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[136], v129, v35);// "Luck"
+    LOWORD(v36) = pPlayer->GetStatColor(6u);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v119, v36, pTmpBuf, 0, 0, 0);
-    v37 = ((Player *)(Str - 168))->GetSkillIdxByOrder(0);
+    v37 = pPlayer->GetSkillIdxByOrder(0);
     v38 = pFontCreate->AlignText_Center(0x96u, pSkillNames[v37]);
-    sprintfex(pTmpBuf, "\t%03u%s", v38);
+    sprintf(pTmpBuf, "\t%03u%s", v38);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 311, uColorWhite, pTmpBuf, 0, 0, 0);
-    v39 = ((Player *)(Str - 168))->GetSkillIdxByOrder(1);
+    v39 = pPlayer->GetSkillIdxByOrder(1);
     v40 = pFontCreate->AlignText_Center(0x96u, pSkillNames[v39]);
-    sprintfex(pTmpBuf, "\t%03u%s", v40);
+    sprintf(pTmpBuf, "\t%03u%s", v40);
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, v128 + 311, uColorWhite, pTmpBuf, 0, 0, 0);
-    v41 = ((Player *)(Str - 168))->GetSkillIdxByOrder(2);
+    v41 = pPlayer->GetSkillIdxByOrder(2);
     v42 = pSkillNames[v41];
     v43 = pSkillNames[v41];
     v133 = v41;
     v44 = pFontCreate->AlignText_Center(150u, v42);
-    sprintfex(pTmpBuf, "\t%03u%s", v44, v43);
+    sprintf(pTmpBuf, "\t%03u%s", v44, v43);
     v45 = uColorGreen;
     if ( (signed int)v133 >= 37 )
       v45 = uColorTeal;
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 2 * v128 + 311, v45, pTmpBuf, 0, 0, 0);
-    v46 = ((Player *)(Str - 168))->GetSkillIdxByOrder(3);
+    v46 = pPlayer->GetSkillIdxByOrder(3);
     v47 = pSkillNames[v46];
     v48 = pSkillNames[v46];
     v133 = v46;
     v49 = pFontCreate->AlignText_Center(150u, v47);
-    sprintfex(pTmpBuf, "\t%03u%s", v49, v48);
+    sprintf(pTmpBuf, "\t%03u%s", v49, v48);
     v50 = uColorGreen;
     if ( (signed int)v133 >= 37 )
       v50 = uColorTeal;
     pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, v123, v50, pTmpBuf, 0, 0, 0);
-    Str += 6972;
+    pPlayer++;
     v124 = (char *)v124 + 1;
     v134 += 159;
     v129 -= 158;
     uX += 158;
   }
-  while ( (signed int)Str < (signed int)&pParty->pPickedItem.uNumCharges );
+  while ( (signed int)pPlayer->pName < (signed int)&pParty->pPickedItem.uNumCharges );
   strcpy(Str1, pGlobalTXT_LocalizationStrings[41]);// "Class"
   v51 = strlen(Str1) - 1;
   v134 = v51;
@@ -5859,7 +5839,7 @@
   v112 = pFontCreate->AlignText_Center(0x5Cu, pGlobalTXT_LocalizationStrings[30]);
   pGUIWindow_CurrentMenu->DrawText(pFontCreate, v112 + 533, 394, v111, v110, 0, 0, 0);
   v113 = PlayerCreation_ComputeAttributeBonus();
-  sprintfex(pTmpBuf, "%d", v113);
+  sprintf(pTmpBuf, "%d", v113);
   v114 = uColorWhite;
   v115 = pFontCreate->AlignText_Center(84u, pTmpBuf);
   pGUIWindow_CurrentMenu->DrawText(pFontCreate, v115 + 530, 410, v114, pTmpBuf, 0, 0, 0);
@@ -5938,9 +5918,9 @@
   uControlParam = 1;
   do
   {
-    sprintfex(pTmpBuf, "arrowl%d", uControlParam);
+    sprintf(pTmpBuf, "arrowl%d", uControlParam);
     pTextures_arrowl[uControlParam] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)];
-    sprintfex(pTmpBuf, "arrowr%d", uControlParam);
+    sprintf(pTmpBuf, "arrowr%d", uControlParam);
     v3 = pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE);
     v4 = uControlParam++;
     pTextures_arrowr[v4] = &pIcons_LOD->pTextures[v3];
--- a/mm7_5.cpp	Fri Oct 19 03:36:38 2012 +0200
+++ b/mm7_5.cpp	Fri Oct 19 23:29:04 2012 +0600
@@ -3553,7 +3553,7 @@
               (int)pCreationUI_BtnPressLeft[v25],
               1);
             //v0 = pAudioPlayer;
-            pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0);
+            pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0);
             v22 = (Player *)v23;
             goto LABEL_117;
           }