hedgewars/uWorld.pas
changeset 6645 9ff40cf44827
parent 6644 b86a50569238
child 6647 26e523c8fe88
equal deleted inserted replaced
6644:b86a50569238 6645:9ff40cf44827
   303                     begin
   303                     begin
   304                     STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
   304                     STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
   305                     AMFrame:= LongInt(Ammo^[i,t].AmmoType) - 1;
   305                     AMFrame:= LongInt(Ammo^[i,t].AmmoType) - 1;
   306                     if STurns >= 0 then //weapon not usable yet, draw grayed out with turns remaining
   306                     if STurns >= 0 then //weapon not usable yet, draw grayed out with turns remaining
   307                         begin
   307                         begin
   308                         DrawSprite2Surf(sprAMAmmosBW, amSurface, x + AMSlotPadding, 
   308                         DrawSprite2Surf(sprAMAmmosBW, amSurface, x + AMSlotPadding + 1, 
   309                                                                  y + AMSlotPadding + 1, AMFrame);
   309                                                                  y + AMSlotPadding + 1, AMFrame);
   310                         if STurns < 100 then
   310                         if STurns < 100 then
   311                             DrawSprite2Surf(sprTurnsLeft, amSurface, 
   311                             DrawSprite2Surf(sprTurnsLeft, amSurface, 
   312 			    	    x + AMSlotSize-16, 
   312 			    	    x + AMSlotSize-16, 
   313 				    y + AMSlotSize + 1 - 16, STurns);
   313 				    y + AMSlotSize + 1 - 16, STurns);
   314                         end
   314                         end
   315                     else //draw colored version
   315                     else //draw colored version
   316                         begin
   316                         begin
   317                             DrawSprite2Surf(sprAMAmmos, amSurface, x + AMSlotPadding, 
   317                             DrawSprite2Surf(sprAMAmmos, amSurface, x + AMSlotPadding + 1, 
   318        						       y + AMSlotPadding + 1, AMFrame);
   318        						       y + AMSlotPadding + 1, AMFrame);
   319                         end;
   319                         end;
   320 {$IFDEF MOBILE}
   320 {$IFDEF MOBILE}
   321 	    inc(y, AMSlotSize + 1); //the plus one is for the border
   321 	    inc(y, AMSlotSize + 1); //the plus one is for the border
   322 {$ELSE}
   322 {$ELSE}
   486                         Slot:= i;
   486                         Slot:= i;
   487                         Pos:= t;
   487                         Pos:= t;
   488                         STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
   488                         STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
   489                         if (STurns < 0) and (AMShiftX = 0) and (AMShiftY = 0) then
   489                         if (STurns < 0) and (AMShiftX = 0) and (AMShiftY = 0) then
   490                             DrawSprite(sprAMSlot, 
   490                             DrawSprite(sprAMSlot, 
   491                                        AmmoRect.x + BORDERSIZE + (c * (AMSlotSize+1)) + AMSlotPadding -1, 
   491                                        AmmoRect.x + BORDERSIZE + (c * (AMSlotSize+1)) + AMSlotPadding, 
   492                                        AmmoRect.y + BORDERSIZE + (g  * (AMSlotSize+1)) + AMSlotPadding -1, 0);
   492                                        AmmoRect.y + BORDERSIZE + (g  * (AMSlotSize+1)) + AMSlotPadding -1, 0);
   493                         end;
   493                         end;
   494                         inc(g);
   494                         inc(g);
   495                    end;
   495                    end;
   496             end;
   496             end;
   511                         Slot:= i;
   511                         Slot:= i;
   512                         Pos:= t;
   512                         Pos:= t;
   513                         STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
   513                         STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
   514                         if (STurns < 0) and (AMShiftX = 0) and (AMShiftY = 0) then
   514                         if (STurns < 0) and (AMShiftX = 0) and (AMShiftY = 0) then
   515                             DrawSprite(sprAMSlot, 
   515                             DrawSprite(sprAMSlot, 
   516                                        AmmoRect.x + BORDERSIZE + (g * (AMSlotSize+1)) + AMSlotPadding -1, 
   516                                        AmmoRect.x + BORDERSIZE + (g * (AMSlotSize+1)) + AMSlotPadding, 
   517                                        AmmoRect.y + BORDERSIZE + (c  * (AMSlotSize+1)) + AMSlotPadding -1, 0);
   517                                        AmmoRect.y + BORDERSIZE + (c  * (AMSlotSize+1)) + AMSlotPadding -1, 0);
   518                         end;
   518                         end;
   519                         inc(g);
   519                         inc(g);
   520                    end;
   520                    end;
   521             end;
   521             end;