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.
--- 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);