hedgewars/uWorld.pas
changeset 7013 54db061b5710
parent 6999 486db9d26e4b
child 7016 8b34f46e10c1
equal deleted inserted replaced
7012:8ca19b467e2f 7013:54db061b5710
   445                     begin
   445                     begin
   446                     STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
   446                     STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
   447                     AMFrame:= LongInt(Ammo^[i,t].AmmoType) - 1;
   447                     AMFrame:= LongInt(Ammo^[i,t].AmmoType) - 1;
   448                     if STurns >= 0 then //weapon not usable yet, draw grayed out with turns remaining
   448                     if STurns >= 0 then //weapon not usable yet, draw grayed out with turns remaining
   449                         begin
   449                         begin
   450                         DrawSprite2Surf(sprAMAmmosBW, amSurface, x + AMSlotPadding, 
   450                         DrawSpriteFrame2Surf(sprAMAmmosBW, amSurface, x + AMSlotPadding, 
   451                                                                  y + AMSlotPadding, AMFrame);
   451                                                                  y + AMSlotPadding, AMFrame);
   452                         if STurns < 100 then
   452                         if STurns < 100 then
   453                             DrawSprite2Surf(sprTurnsLeft, amSurface, 
   453                             DrawSpriteFrame2Surf(sprTurnsLeft, amSurface, 
   454 			    	    x + AMSlotSize-16, 
   454                                 x + AMSlotSize-16, 
   455 				    y + AMSlotSize + 1 - 16, STurns);
   455                                 y + AMSlotSize + 1 - 16, STurns);
   456                         end
   456                         end
   457                     else //draw colored version
   457                     else //draw colored version
   458                         begin
   458                         begin
   459                         DrawSprite2Surf(sprAMAmmos, amSurface, x + AMSlotPadding, 
   459                         DrawSpriteFrame2Surf(sprAMAmmos, amSurface, x + AMSlotPadding, 
   460                                                                y + AMSlotPadding, AMFrame);
   460                                                                y + AMSlotPadding, AMFrame);
   461                         end;
   461                         end;
   462 {$IFDEF USE_LANDSCAPE_AMMOMENU}
   462 {$IFDEF USE_LANDSCAPE_AMMOMENU}
   463 	    inc(y, AMSlotSize + 1); //the plus one is for the border
   463 	    inc(y, AMSlotSize + 1); //the plus one is for the border
   464 {$ELSE}
   464 {$ELSE}
   477 DrawLine2Surf(amSurface, i * (AMSlotSize+1)+1, BORDERSIZE, i * (AMSlotSize+1)+1, AMRect.h + BORDERSIZE - AMSlotSize - 2,160,160,160);            
   477 DrawLine2Surf(amSurface, i * (AMSlotSize+1)+1, BORDERSIZE, i * (AMSlotSize+1)+1, AMRect.h + BORDERSIZE - AMSlotSize - 2,160,160,160);            
   478 for i:= 1 to SlotsNumY -1 do
   478 for i:= 1 to SlotsNumY -1 do
   479 DrawLine2Surf(amSurface, BORDERSIZE, i * (AMSlotSize+1)+1, AMRect.w + BORDERSIZE, i * (AMSlotSize+1)+1,160,160,160);
   479 DrawLine2Surf(amSurface, BORDERSIZE, i * (AMSlotSize+1)+1, AMRect.w + BORDERSIZE, i * (AMSlotSize+1)+1,160,160,160);
   480 
   480 
   481 //draw outer border
   481 //draw outer border
   482 DrawSprite2Surf(sprAMCorners, amSurface, 0                    , 0                    , 0);
   482 DrawSpriteFrame2Surf(sprAMCorners, amSurface, 0                    , 0                    , 0);
   483 DrawSprite2Surf(sprAMCorners, amSurface, AMRect.w + BORDERSIZE, AMRect.y             , 1);
   483 DrawSpriteFrame2Surf(sprAMCorners, amSurface, AMRect.w + BORDERSIZE, AMRect.y             , 1);
   484 DrawSprite2Surf(sprAMCorners, amSurface, AMRect.x             , AMRect.h + BORDERSIZE, 2);
   484 DrawSpriteFrame2Surf(sprAMCorners, amSurface, AMRect.x             , AMRect.h + BORDERSIZE, 2);
   485 DrawSprite2Surf(sprAMCorners, amSurface, AMRect.w + BORDERSIZE, AMRect.h + BORDERSIZE, 3);
   485 DrawSpriteFrame2Surf(sprAMCorners, amSurface, AMRect.w + BORDERSIZE, AMRect.h + BORDERSIZE, 3);
   486 
   486 
   487 for i:=0 to BORDERSIZE-1 do
   487 for i:=0 to BORDERSIZE-1 do
   488 begin
   488 begin
   489 DrawLine2Surf(amSurface, BORDERSIZE, i, AMRect.w + BORDERSIZE, i,160,160,160);//top
   489 DrawLine2Surf(amSurface, BORDERSIZE, i, AMRect.w + BORDERSIZE, i,160,160,160);//top
   490 DrawLine2Surf(amSurface, BORDERSIZE, AMRect.h+BORDERSIZE+i, AMRect.w + BORDERSIZE, AMRect.h+BORDERSIZE+i,160,160,160);//bottom
   490 DrawLine2Surf(amSurface, BORDERSIZE, AMRect.h+BORDERSIZE+i, AMRect.w + BORDERSIZE, AMRect.h+BORDERSIZE+i,160,160,160);//bottom