changeset 1762:2b8b748a222a

Слияние
author Ritor1
date Tue, 01 Oct 2013 09:33:38 +0600
parents 5be18330f9a3 (diff) 24e756a50073 (current diff)
children 20223822fabc
files
diffstat 1 files changed, 28 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Mon Sep 30 23:38:28 2013 +0600
+++ b/Actor.cpp	Tue Oct 01 09:33:38 2013 +0600
@@ -46,55 +46,55 @@
 
 
 //----- (0041AF52) --------------------------------------------------------
-void Actor::DrawHealthBar(Actor *a1, GUIWindow *a2)
+void Actor::DrawHealthBar(Actor *actor, GUIWindow *window)
 {
-  unsigned int v2; // eax@1
-  GUIWindow *v3; // edi@1
+  //unsigned int v2; // eax@1
+  //GUIWindow *v3; // edi@1
   unsigned int v4; // esi@1
-  signed int v5; // ebx@4
-  double v6; // st7@5
-  unsigned int v7; // eax@6
+  //signed int v5; // ebx@4
+  //double v6; // st7@5
+  //unsigned int v7; // eax@6
   unsigned int v8; // ebx@10
   unsigned int v9; // [sp+14h] [bp-Ch]@4
   unsigned int v10; // [sp+1Ch] [bp-4h]@4
 
-  v2 = a1->pMonsterInfo.uHP;
-  v3 = a2;
+  //v2 = actor->pMonsterInfo.uHP;
+  //v3 = window;
   v4 = 25;
-  if ( (signed int)v2 > 25 )
+  if ( (signed int)actor->pMonsterInfo.uHP > 25 )
   {
     v4 = 200;
-    if ( (signed int)v2 < 200 )
-      v4 = a1->pMonsterInfo.uHP;
+    if ( (signed int)actor->pMonsterInfo.uHP < 200 )
+      v4 = actor->pMonsterInfo.uHP;
   }
-  v5 = a1->sCurrentHP;
+  //v5 = actor->sCurrentHP;
   v10 = v4;
   v9 = uTextureID_mhp_grn;
-  if ( v5 < (signed int)v2 )
+  if ( actor->sCurrentHP < (signed int)actor->pMonsterInfo.uHP )
   {
-    v6 = (double)(signed int)v2;
-    v10 = (signed __int64)((double)(signed int)v4 / (double)(signed int)v2 * (double)a1->sCurrentHP);
-    if ( v5 <= (signed int)(signed __int64)(0.34 * v6) )
+    //v6 = (double)(signed int)actor->pMonsterInfo.uHP;
+    v10 = (signed __int64)((double)(signed int)v4 / (double)(signed int)actor->pMonsterInfo.uHP * (double)actor->sCurrentHP);
+    if ( actor->sCurrentHP <= (signed int)(signed __int64)(0.34 * (double)(signed int)actor->pMonsterInfo.uHP) )
     {
-      v7 = uTextureID_mhp_red;
-      v9 = v7;
+      //v7 = uTextureID_mhp_red;
+      v9 = uTextureID_mhp_red;
     }
-    else if ( v5 <= (signed int)(signed __int64)(v6 * 0.67) )
+    else if ( actor->sCurrentHP <= (signed int)(signed __int64)((double)(signed int)actor->pMonsterInfo.uHP * 0.67) )
     {
-      v7 = uTextureID_mhp_yel;
-      v9 = v7;
+      //v7 = uTextureID_mhp_yel;
+      v9 = uTextureID_mhp_yel;
     }
   }
-  v8 = a2->uFrameX + (signed int)(a2->uFrameWidth - v4) / 2;
+  v8 = window->uFrameX + (signed int)(window->uFrameWidth - v4) / 2;
 
-  pRenderer->SetTextureClipRect(v8, a2->uFrameY + 32, v8 + v4, a2->uFrameY + 52);
-  pRenderer->DrawTextureIndexed(v8, v3->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_bd));
-  pRenderer->SetTextureClipRect(v8, v3->uFrameY + 32, v8 + v10, v3->uFrameY + 52);
-  pRenderer->DrawTextureIndexed(v8, v3->uFrameY + 34, pIcons_LOD->GetTexture(v9));
+  pRenderer->SetTextureClipRect(v8, window->uFrameY + 32, v8 + v4, window->uFrameY + 52);
+  pRenderer->DrawTextureIndexed(v8, window->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_bd));
+  pRenderer->SetTextureClipRect(v8, window->uFrameY + 32, v8 + v10, window->uFrameY + 52);
+  pRenderer->DrawTextureIndexed(v8, window->uFrameY + 34, pIcons_LOD->GetTexture(v9));
 
   pRenderer->ResetTextureClipRect();
-  pRenderer->DrawTextureIndexed(v8 - 5, v3->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_capl));
-  pRenderer->DrawTextureIndexed(v8 + v4, v3->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_capr));
+  pRenderer->DrawTextureIndexed(v8 - 5, window->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_capl));
+  pRenderer->DrawTextureIndexed(v8 + v4, window->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_capr));
 }
 
 //----- (00448A40) --------------------------------------------------------