merge
authorkoda
Tue, 07 Feb 2012 02:10:15 +0100
changeset 6646 436289cfebf5
parent 6643 eed176af3cc6 (current diff)
parent 6645 9ff40cf44827 (diff)
child 6647 26e523c8fe88
merge
--- a/hedgewars/uWorld.pas	Tue Feb 07 01:18:29 2012 +0100
+++ b/hedgewars/uWorld.pas	Tue Feb 07 02:10:15 2012 +0100
@@ -305,7 +305,7 @@
                     AMFrame:= LongInt(Ammo^[i,t].AmmoType) - 1;
                     if STurns >= 0 then //weapon not usable yet, draw grayed out with turns remaining
                         begin
-                        DrawSprite2Surf(sprAMAmmosBW, amSurface, x + AMSlotPadding, 
+                        DrawSprite2Surf(sprAMAmmosBW, amSurface, x + AMSlotPadding + 1, 
                                                                  y + AMSlotPadding + 1, AMFrame);
                         if STurns < 100 then
                             DrawSprite2Surf(sprTurnsLeft, amSurface, 
@@ -314,7 +314,7 @@
                         end
                     else //draw colored version
                         begin
-                            DrawSprite2Surf(sprAMAmmos, amSurface, x + AMSlotPadding, 
+                            DrawSprite2Surf(sprAMAmmos, amSurface, x + AMSlotPadding + 1, 
        						       y + AMSlotPadding + 1, AMFrame);
                         end;
 {$IFDEF MOBILE}
@@ -488,7 +488,7 @@
                         STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
                         if (STurns < 0) and (AMShiftX = 0) and (AMShiftY = 0) then
                             DrawSprite(sprAMSlot, 
-                                       AmmoRect.x + BORDERSIZE + (c * (AMSlotSize+1)) + AMSlotPadding -1, 
+                                       AmmoRect.x + BORDERSIZE + (c * (AMSlotSize+1)) + AMSlotPadding, 
                                        AmmoRect.y + BORDERSIZE + (g  * (AMSlotSize+1)) + AMSlotPadding -1, 0);
                         end;
                         inc(g);
@@ -513,7 +513,7 @@
                         STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
                         if (STurns < 0) and (AMShiftX = 0) and (AMShiftY = 0) then
                             DrawSprite(sprAMSlot, 
-                                       AmmoRect.x + BORDERSIZE + (g * (AMSlotSize+1)) + AMSlotPadding -1, 
+                                       AmmoRect.x + BORDERSIZE + (g * (AMSlotSize+1)) + AMSlotPadding, 
                                        AmmoRect.y + BORDERSIZE + (c  * (AMSlotSize+1)) + AMSlotPadding -1, 0);
                         end;
                         inc(g);
@@ -1144,8 +1144,8 @@
             for i:= 0 to cMaxHHIndex do
                 if Hedgehogs[i].Gear <> nil then
                     begin
-                    inc(h,round(Hedgehogs[i].Gear^.Health*(TeamHealthBarWidth/TeamHealth)));
-                    if h < TeamHealthBarWidth-1 then DrawTexture(14 + h, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture);
+                    inc(h,Hedgehogs[i].Gear^.Health);
+                    if h < TeamHealth then DrawTexture(14 + round(h*TeamHealthBarWidth/TeamHealth), cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture);
                     end;
 
         // draw ai kill counter for gfAISurvival