hedgewars/uWorld.pas
changeset 2359 76d853f22afa
parent 2357 babe1a55e284
child 2360 d4d545da9dbe
equal deleted inserted replaced
2358:d4a9c309eb14 2359:76d853f22afa
   121 	dec(y);
   121 	dec(y);
   122 	DrawSprite(sprAMBorders, x, y, 1);
   122 	DrawSprite(sprAMBorders, x, y, 1);
   123 	dec(y, 33);
   123 	dec(y, 33);
   124 	DrawSprite(sprAMSlotName, x, y, 0);
   124 	DrawSprite(sprAMSlotName, x, y, 0);
   125 	for i:= cMaxSlotIndex downto 0 do
   125 	for i:= cMaxSlotIndex downto 0 do
   126 		if (Ammo^[i, 0].Count > 0) and (Ammo^[i, 0].AmmoType <> amNothing) then
   126 		if (Ammo^[i, 0].Count > 0) then
   127 			begin
   127 			begin
   128 			if (cScreenHeight - CursorPoint.Y >= y - 33) and (cScreenHeight - CursorPoint.Y < y) then Slot:= i;
   128 			if (cScreenHeight - CursorPoint.Y >= y - 33) and (cScreenHeight - CursorPoint.Y < y) then Slot:= i;
   129 			dec(y, 33);
   129 			dec(y, 33);
   130 			inc(SlotsNum);
   130 			inc(SlotsNum);
   131 			DrawSprite(sprAMSlot, x, y, 0);
   131 			DrawSprite(sprAMSlot, x, y, 0);
   132 			DrawSprite(sprAMSlotKeys, x + 2, y + 1, i);
   132 			DrawSprite(sprAMSlotKeys, x + 2, y + 1, i);
   133 			t:= 0;
   133 			t:= 0;
   134 			while (t <= cMaxSlotAmmoIndex) and (Ammo^[i, t].Count > 0) do
   134 			while (t <= cMaxSlotAmmoIndex) and (Ammo^[i, t].Count > 0) and (Ammo^[i, t].AmmoType <> amNothing) do
   135 				begin
   135 				begin
   136 				l:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
   136 				l:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
   137 
   137 
   138 				if l >= 0 then
   138 				if l >= 0 then
   139 					begin
   139 					begin