comparison Actor.cpp @ 1860:3186f469323a

fixing some warnings in actor.cpp
author Grumpy7
date Mon, 14 Oct 2013 03:22:34 +0200
parents f135ff4decbb
children a86c60679949
comparison
equal deleted inserted replaced
1859:f135ff4decbb 1860:3186f469323a
67 else if ( actor->sCurrentHP <= ( 0.67 * actor->pMonsterInfo.uHP) ) 67 else if ( actor->sCurrentHP <= ( 0.67 * actor->pMonsterInfo.uHP) )
68 v9 = uTextureID_mhp_yel; 68 v9 = uTextureID_mhp_yel;
69 else 69 else
70 v9 = uTextureID_mhp_grn; 70 v9 = uTextureID_mhp_grn;
71 71
72 if ( actor->sCurrentHP < actor->pMonsterInfo.uHP ) 72 if ( actor->sCurrentHP < (int)actor->pMonsterInfo.uHP )
73 { 73 {
74 v10 = bar_length / actor->pMonsterInfo.uHP * actor->sCurrentHP; 74 v10 = bar_length / actor->pMonsterInfo.uHP * actor->sCurrentHP;
75 } 75 }
76 76
77 uX = window->uFrameX + (signed int)(window->uFrameWidth - bar_length) / 2; 77 uX = window->uFrameX + (signed int)(window->uFrameWidth - bar_length) / 2;
108 } 108 }
109 109
110 //----- (00448518) -------------------------------------------------------- 110 //----- (00448518) --------------------------------------------------------
111 void __fastcall sub_448518_npc_set_item(int npc, unsigned int item, int a3) 111 void __fastcall sub_448518_npc_set_item(int npc, unsigned int item, int a3)
112 { 112 {
113 for (int i = 0; i < uNumActors; i++) 113 for (uint i = 0; i < uNumActors; i++)
114 { 114 {
115 if (pActors[uNumActors].sNPC_ID == npc) 115 if (pActors[uNumActors].sNPC_ID == npc)
116 { 116 {
117 Actor::GiveItem(i, item, a3); 117 Actor::GiveItem(i, item, a3);
118 } 118 }
208 int v8; // edi@16 208 int v8; // edi@16
209 signed int v10; // ecx@22 209 signed int v10; // ecx@22
210 int v19; // edi@34 210 int v19; // edi@34
211 int v20; // eax@35 211 int v20; // eax@35
212 signed int v23; // eax@41 212 signed int v23; // eax@41
213 double v28; // st6@50 213 int v28; // st6@50
214 int v30; // esi@50 214 int v30; // esi@50
215 int v31; // ST3C_4@51 215 int v31; // ST3C_4@51
216 unsigned int v32; // edi@51 216 unsigned int v32; // edi@51
217 signed int v36; // eax@67 217 signed int v36; // eax@67
218 int v39; // ecx@75 218 int v39; // ecx@75
239 int pitch; // [sp+2Ch] [bp-A4h]@51 239 int pitch; // [sp+2Ch] [bp-A4h]@51
240 int v114; // [sp+48h] [bp-88h]@41 240 int v114; // [sp+48h] [bp-88h]@41
241 SpriteObject a1; // [sp+4Ch] [bp-84h]@1 241 SpriteObject a1; // [sp+4Ch] [bp-84h]@1
242 int v116; // [sp+BCh] [bp-14h]@49 242 int v116; // [sp+BCh] [bp-14h]@49
243 int v118; // [sp+C4h] [bp-Ch]@29 243 int v118; // [sp+C4h] [bp-Ch]@29
244 float v119; // [sp+C8h] [bp-8h]@48 244 int v119; // [sp+C8h] [bp-8h]@48
245 float v120; // [sp+CCh] [bp-4h]@1 245 int v120; // [sp+CCh] [bp-4h]@1
246 int spellnuma; // [sp+D8h] [bp+8h]@29 246 int spellnuma; // [sp+D8h] [bp+8h]@29
247 int spellnumb; // [sp+D8h] [bp+8h]@48 247 int spellnumb; // [sp+D8h] [bp+8h]@48
248 float spellnumc; // [sp+D8h] [bp+8h]@50 248 int spellnumc; // [sp+D8h] [bp+8h]@50
249 int spellnume; // [sp+D8h] [bp+8h]@179 249 int spellnume; // [sp+D8h] [bp+8h]@179
250 int a1a; // [sp+E0h] [bp+10h]@34 250 int a1a; // [sp+E0h] [bp+10h]@34
251 int a1c; // [sp+E0h] [bp+10h]@184 251 int a1c; // [sp+E0h] [bp+10h]@184
252 252
253 253
342 else if (masteryLevel == 4) 342 else if (masteryLevel == 4)
343 v23 = 14; 343 v23 = 14;
344 spellnumb = 0; 344 spellnumb = 0;
345 for ( int i = 0; i < v23; i++) 345 for ( int i = 0; i < v23; i++)
346 { 346 {
347 v28 = (double)spellnumb; 347 v28 = spellnumb;
348 v30 = rand() % 1000; 348 v30 = rand() % 1000;
349 spellnumc = v30 - 2500; 349 spellnumc = v30 - 2500;
350 v120 = v28 * v28; 350 v120 = v28 * v28;
351 v119 = spellnumb * spellnumb; 351 v119 = spellnumb * spellnumb;
352 if ( sqrt(spellnumc * spellnumc + v119 + v120) <= 1.0 ) 352 if ( sqrt((float)(spellnumc * spellnumc + v119 + v120)) <= 1.0 )
353 { 353 {
354 v32 = 0; 354 v32 = 0;
355 pitch = 0; 355 pitch = 0;
356 } 356 }
357 else 357 else
358 { 358 {
359 v31 = (signed __int64)sqrt(v119 + v120); 359 v31 = (signed __int64)sqrt((float)(v119 + v120));
360 v32 = stru_5C6E00->Atan2(spellnumb, (int)v28); 360 v32 = stru_5C6E00->Atan2(spellnumb, (int)v28);
361 pitch = stru_5C6E00->Atan2(v31, (int)spellnumc); 361 pitch = stru_5C6E00->Atan2(v31, (int)spellnumc);
362 } 362 }
363 a1.stru_24.Reset(); 363 a1.stru_24.Reset();
364 a1.uType = stru_4E3ACC[uSpellID].uType; 364 a1.uType = stru_4E3ACC[uSpellID].uType;
583 v61 = (v57->GetParameterBonus(v60) + v59) / 2; 583 v61 = (v57->GetParameterBonus(v60) + v59) / 2;
584 v62 = v57->GetActualLuck(); 584 v62 = v57->GetActualLuck();
585 v63 = v61 + v57->GetParameterBonus(v62) + 30; 585 v63 = v61 + v57->GetParameterBonus(v62) + 30;
586 if ( rand() % v63 < 30 ) 586 if ( rand() % v63 < 30 )
587 { 587 {
588 for (int k = 0; k < v57->pPlayerBuffs.size(); k++) 588 for (uint k = 0; k < v57->pPlayerBuffs.size(); k++)
589 { 589 {
590 v57->pPlayerBuffs[k].Reset(); 590 v57->pPlayerBuffs[k].Reset();
591 } 591 }
592 pOtherOverlayList->_4418B1(11210, i + 99, 0, 65536); 592 pOtherOverlayList->_4418B1(11210, i + 99, 0, 65536);
593 } 593 }
716 0); 716 0);
717 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(actorPtr,0x7E7E7Eu); 717 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(actorPtr,0x7E7E7Eu);
718 pAudioPlayer->PlaySound((SoundID)18060, PID(OBJECT_Actor, uActorID), 0, -1, 0, 0, 0, 0); 718 pAudioPlayer->PlaySound((SoundID)18060, PID(OBJECT_Actor, uActorID), 0, -1, 0, 0, 0, 0);
719 return; 719 return;
720 } 720 }
721
722 } 721 }
723 722
724 723
725 //----- (new func) -------------------------------------------------------- 724 //----- (new func) --------------------------------------------------------
726 unsigned short Actor::GetObjDescId( int spellId ) 725 unsigned short Actor::GetObjDescId( int spellId )