changeset 1860:3186f469323a

fixing some warnings in actor.cpp
author Grumpy7
date Mon, 14 Oct 2013 03:22:34 +0200
parents f135ff4decbb
children a86c60679949
files Actor.cpp
diffstat 1 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Mon Oct 14 03:17:25 2013 +0200
+++ b/Actor.cpp	Mon Oct 14 03:22:34 2013 +0200
@@ -69,7 +69,7 @@
   else
     v9 = uTextureID_mhp_grn;
 
-  if ( actor->sCurrentHP < actor->pMonsterInfo.uHP )
+  if ( actor->sCurrentHP < (int)actor->pMonsterInfo.uHP )
   {
     v10 = bar_length / actor->pMonsterInfo.uHP * actor->sCurrentHP;
   }
@@ -110,7 +110,7 @@
 //----- (00448518) --------------------------------------------------------
 void __fastcall sub_448518_npc_set_item(int npc, unsigned int item, int a3)
 {
-  for (int i = 0; i < uNumActors; i++)
+  for (uint i = 0; i < uNumActors; i++)
   {
     if (pActors[uNumActors].sNPC_ID == npc)
     {
@@ -210,7 +210,7 @@
   int v19; // edi@34
   int v20; // eax@35
   signed int v23; // eax@41
-  double v28; // st6@50
+  int v28; // st6@50
   int v30; // esi@50
   int v31; // ST3C_4@51
   unsigned int v32; // edi@51
@@ -241,11 +241,11 @@
   SpriteObject a1; // [sp+4Ch] [bp-84h]@1
   int v116; // [sp+BCh] [bp-14h]@49
   int v118; // [sp+C4h] [bp-Ch]@29
-  float v119; // [sp+C8h] [bp-8h]@48
-  float v120; // [sp+CCh] [bp-4h]@1
+  int v119; // [sp+C8h] [bp-8h]@48
+  int v120; // [sp+CCh] [bp-4h]@1
   int spellnuma; // [sp+D8h] [bp+8h]@29
   int spellnumb; // [sp+D8h] [bp+8h]@48
-  float spellnumc; // [sp+D8h] [bp+8h]@50
+  int spellnumc; // [sp+D8h] [bp+8h]@50
   int spellnume; // [sp+D8h] [bp+8h]@179
   int a1a; // [sp+E0h] [bp+10h]@34
   int a1c; // [sp+E0h] [bp+10h]@184
@@ -344,19 +344,19 @@
       spellnumb = 0;
       for ( int i = 0; i < v23; i++)
       {
-        v28 = (double)spellnumb;
+        v28 = spellnumb;
         v30 = rand() % 1000;
         spellnumc = v30 - 2500;
         v120 = v28 * v28;
         v119 = spellnumb * spellnumb;
-        if ( sqrt(spellnumc * spellnumc + v119 + v120) <= 1.0 )
+        if ( sqrt((float)(spellnumc * spellnumc + v119 + v120)) <= 1.0 )
         {
           v32 = 0;
           pitch = 0;
         }
         else
         {
-          v31 = (signed __int64)sqrt(v119 + v120);
+          v31 = (signed __int64)sqrt((float)(v119 + v120));
           v32 = stru_5C6E00->Atan2(spellnumb, (int)v28);
           pitch = stru_5C6E00->Atan2(v31, (int)spellnumc);
         }
@@ -585,7 +585,7 @@
         v63 = v61 + v57->GetParameterBonus(v62) + 30;
         if ( rand() % v63 < 30 )
         {
-          for (int k = 0; k < v57->pPlayerBuffs.size(); k++)
+          for (uint k = 0; k < v57->pPlayerBuffs.size(); k++)
           {
             v57->pPlayerBuffs[k].Reset();
           }
@@ -718,7 +718,6 @@
       pAudioPlayer->PlaySound((SoundID)18060, PID(OBJECT_Actor, uActorID), 0, -1, 0, 0, 0, 0);
       return;
   }
-
 }