changeset 1684:f84b8b2a875c

Fixing a few warnings in Players.cpp
author Grumpy7
date Fri, 20 Sep 2013 10:51:42 +0200
parents 96d567a7d15f
children 2a309997c42f
files Player.cpp Player.h UI/UICharacter.cpp UI/UiGame.cpp
diffstat 4 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Player.cpp	Fri Sep 20 10:34:07 2013 +0200
+++ b/Player.cpp	Fri Sep 20 10:51:42 2013 +0200
@@ -130,7 +130,7 @@
  {100, 100,  40, 10},   //Speed
  {100, 100, 100, 100}}; //Luck
 
-signed int pAgeingTable[4] = {50, 100, 150, 0xFFFF};
+unsigned int pAgeingTable[4] = {50, 100, 150, 0xFFFF};
 
 std::array<unsigned int, 18> pConditionImportancyTable = {{16, 15, 14, 17, 13, 2, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 1, 0}};
 
@@ -1533,7 +1533,7 @@
 }
 
 //----- (0048CCF5) --------------------------------------------------------
-int Player::GetActualAttack(int a2)
+int Player::GetActualAttack( bool a2 )
 {
   int v3; // eax@1
   int v4; // edi@1
@@ -1704,7 +1704,7 @@
   }
   else
   {
-    v3 = GetActualAttack(1);
+    v3 = GetActualAttack(true);
   }
   return v3;
 }
@@ -4419,7 +4419,7 @@
 //----- (004908A8) --------------------------------------------------------
 bool Player::DiscardConditionIfLastsLongerThan(unsigned int uCondition, unsigned __int64 uTime)
 {
-  if ( pConditions[uCondition] && (uTime < pConditions[uCondition]) )
+  if ( pConditions[uCondition] && (uTime < (signed long long)pConditions[uCondition]) )
   {
     pConditions[uCondition] = 0i64;
     return true;
@@ -4506,7 +4506,7 @@
       }
       else
       {
-        thisb->SetRecoveryTime(flt_6BE3A4_debug_recmod1 * 213.3333333333333);
+        thisb->SetRecoveryTime((int)(flt_6BE3A4_debug_recmod1 * 213.3333333333333));
       }
     }
     pMouse->RemoveHoldingItem();
@@ -4801,7 +4801,7 @@
         }
         else
         {
-          thisb->SetRecoveryTime(flt_6BE3A4_debug_recmod1 * 213.3333333333333);
+          thisb->SetRecoveryTime((int)(flt_6BE3A4_debug_recmod1 * 213.3333333333333));
         }
       }
       pMouse->RemoveHoldingItem();
--- a/Player.h	Fri Sep 20 10:34:07 2013 +0200
+++ b/Player.h	Fri Sep 20 10:51:42 2013 +0200
@@ -495,7 +495,7 @@
   int GetActualAccuracy();
   int GetActualSpeed();
   int GetActualLuck();
-  int GetActualAttack(int a2);
+  int GetActualAttack(bool a2);
   int GetMeleeDamageMinimal();
   int GetMeleeDamageMaximal();
   int CalculateMeleeDamageTo(bool ignoreSkillBonus, bool ignoreOffhand, unsigned int uTargetActorID);
--- a/UI/UICharacter.cpp	Fri Sep 20 10:34:07 2013 +0200
+++ b/UI/UICharacter.cpp	Fri Sep 20 10:51:42 2013 +0200
@@ -2109,7 +2109,7 @@
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
   pY += 2 * LOBYTE(pFontArrus->uFontHeight);
-  sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], player->GetActualAttack(0));
+  sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], player->GetActualAttack(false));
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
--- a/UI/UiGame.cpp	Fri Sep 20 10:34:07 2013 +0200
+++ b/UI/UiGame.cpp	Fri Sep 20 10:51:42 2013 +0200
@@ -887,7 +887,7 @@
     pY = pFontHeight + pY;
     if ( !i )
       pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 22, pY, 0, pGlobalTXT_LocalizationStrings[18], 60, 0);//Атака
-    sprintf(pTmpBuf.data(), "%+d", player->GetActualAttack(0));
+    sprintf(pTmpBuf.data(), "%+d", player->GetActualAttack(false));
     pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, pX, pY, 0, pTmpBuf.data(), 84, 0);
     pY = pFontHeight + pY;
     if ( !i )