comparison Actor.cpp @ 1761:5be18330f9a3

m
author Ritor1
date Tue, 01 Oct 2013 09:33:29 +0600
parents 8251e59fd7c1
children 20223822fabc
comparison
equal deleted inserted replaced
1754:421c29d4ab3e 1761:5be18330f9a3
44 44
45 45
46 46
47 47
48 //----- (0041AF52) -------------------------------------------------------- 48 //----- (0041AF52) --------------------------------------------------------
49 void Actor::DrawHealthBar(Actor *a1, GUIWindow *a2) 49 void Actor::DrawHealthBar(Actor *actor, GUIWindow *window)
50 { 50 {
51 unsigned int v2; // eax@1 51 //unsigned int v2; // eax@1
52 GUIWindow *v3; // edi@1 52 //GUIWindow *v3; // edi@1
53 unsigned int v4; // esi@1 53 unsigned int v4; // esi@1
54 signed int v5; // ebx@4 54 //signed int v5; // ebx@4
55 double v6; // st7@5 55 //double v6; // st7@5
56 unsigned int v7; // eax@6 56 //unsigned int v7; // eax@6
57 unsigned int v8; // ebx@10 57 unsigned int v8; // ebx@10
58 unsigned int v9; // [sp+14h] [bp-Ch]@4 58 unsigned int v9; // [sp+14h] [bp-Ch]@4
59 unsigned int v10; // [sp+1Ch] [bp-4h]@4 59 unsigned int v10; // [sp+1Ch] [bp-4h]@4
60 60
61 v2 = a1->pMonsterInfo.uHP; 61 //v2 = actor->pMonsterInfo.uHP;
62 v3 = a2; 62 //v3 = window;
63 v4 = 25; 63 v4 = 25;
64 if ( (signed int)v2 > 25 ) 64 if ( (signed int)actor->pMonsterInfo.uHP > 25 )
65 { 65 {
66 v4 = 200; 66 v4 = 200;
67 if ( (signed int)v2 < 200 ) 67 if ( (signed int)actor->pMonsterInfo.uHP < 200 )
68 v4 = a1->pMonsterInfo.uHP; 68 v4 = actor->pMonsterInfo.uHP;
69 } 69 }
70 v5 = a1->sCurrentHP; 70 //v5 = actor->sCurrentHP;
71 v10 = v4; 71 v10 = v4;
72 v9 = uTextureID_mhp_grn; 72 v9 = uTextureID_mhp_grn;
73 if ( v5 < (signed int)v2 ) 73 if ( actor->sCurrentHP < (signed int)actor->pMonsterInfo.uHP )
74 { 74 {
75 v6 = (double)(signed int)v2; 75 //v6 = (double)(signed int)actor->pMonsterInfo.uHP;
76 v10 = (signed __int64)((double)(signed int)v4 / (double)(signed int)v2 * (double)a1->sCurrentHP); 76 v10 = (signed __int64)((double)(signed int)v4 / (double)(signed int)actor->pMonsterInfo.uHP * (double)actor->sCurrentHP);
77 if ( v5 <= (signed int)(signed __int64)(0.34 * v6) ) 77 if ( actor->sCurrentHP <= (signed int)(signed __int64)(0.34 * (double)(signed int)actor->pMonsterInfo.uHP) )
78 { 78 {
79 v7 = uTextureID_mhp_red; 79 //v7 = uTextureID_mhp_red;
80 v9 = v7; 80 v9 = uTextureID_mhp_red;
81 } 81 }
82 else if ( v5 <= (signed int)(signed __int64)(v6 * 0.67) ) 82 else if ( actor->sCurrentHP <= (signed int)(signed __int64)((double)(signed int)actor->pMonsterInfo.uHP * 0.67) )
83 { 83 {
84 v7 = uTextureID_mhp_yel; 84 //v7 = uTextureID_mhp_yel;
85 v9 = v7; 85 v9 = uTextureID_mhp_yel;
86 } 86 }
87 } 87 }
88 v8 = a2->uFrameX + (signed int)(a2->uFrameWidth - v4) / 2; 88 v8 = window->uFrameX + (signed int)(window->uFrameWidth - v4) / 2;
89 89
90 pRenderer->SetTextureClipRect(v8, a2->uFrameY + 32, v8 + v4, a2->uFrameY + 52); 90 pRenderer->SetTextureClipRect(v8, window->uFrameY + 32, v8 + v4, window->uFrameY + 52);
91 pRenderer->DrawTextureIndexed(v8, v3->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_bd)); 91 pRenderer->DrawTextureIndexed(v8, window->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_bd));
92 pRenderer->SetTextureClipRect(v8, v3->uFrameY + 32, v8 + v10, v3->uFrameY + 52); 92 pRenderer->SetTextureClipRect(v8, window->uFrameY + 32, v8 + v10, window->uFrameY + 52);
93 pRenderer->DrawTextureIndexed(v8, v3->uFrameY + 34, pIcons_LOD->GetTexture(v9)); 93 pRenderer->DrawTextureIndexed(v8, window->uFrameY + 34, pIcons_LOD->GetTexture(v9));
94 94
95 pRenderer->ResetTextureClipRect(); 95 pRenderer->ResetTextureClipRect();
96 pRenderer->DrawTextureIndexed(v8 - 5, v3->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_capl)); 96 pRenderer->DrawTextureIndexed(v8 - 5, window->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_capl));
97 pRenderer->DrawTextureIndexed(v8 + v4, v3->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_capr)); 97 pRenderer->DrawTextureIndexed(v8 + v4, window->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_capr));
98 } 98 }
99 99
100 //----- (00448A40) -------------------------------------------------------- 100 //----- (00448A40) --------------------------------------------------------
101 void Actor::ToggleFlag(signed int uActorID, unsigned int uFlag, int bToggle) 101 void Actor::ToggleFlag(signed int uActorID, unsigned int uFlag, int bToggle)
102 { 102 {