# HG changeset patch # User nemo # Date 1328576672 18000 # Node ID 9ff40cf44827f2593707f83ecf720eef5da87f99 # Parent b86a50569238b32ab6d82595f8638df086a74471 Fixes slot sprite and ammo sprites overlapping left side border. There is still the issue that boxes should be 32px between borders, but right now they are 33px on all but the first row (since the outside border overlaps it by 1px) causing the slot sprite to have 2px of border on the left and 1px of border on the right. diff -r b86a50569238 -r 9ff40cf44827 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Mon Feb 06 19:46:46 2012 -0500 +++ b/hedgewars/uWorld.pas Mon Feb 06 20:04:32 2012 -0500 @@ -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);