hedgewars/uGearsRender.pas
changeset 12124 3374e0f67f39
parent 11887 bbd0cb0564c5
child 12125 1aae30470fa3
equal deleted inserted replaced
12123:4f567f7a08e8 12124:3374e0f67f39
   534                                 untint
   534                                 untint
   535                                 end
   535                                 end
   536                             end;
   536                             end;
   537                     defaultPos:= false
   537                     defaultPos:= false
   538                     end;
   538                     end;
   539                 gtShover: DrawSpriteRotated(sprHandBaseball, hx, hy, sign, aangle + 180);
       
   540                 gtFirePunch:
   539                 gtFirePunch:
   541                     begin
   540                     begin
   542                     DrawHedgehog(sx, sy,
   541                     DrawHedgehog(sx, sy,
   543                             sign,
   542                             sign,
   544                             1,
   543                             1,
   631             end;
   630             end;
   632 
   631 
   633             case CurAmmoGear^.Kind of
   632             case CurAmmoGear^.Kind of
   634                 gtShotgunShot,
   633                 gtShotgunShot,
   635                 gtDEagleShot,
   634                 gtDEagleShot,
   636                 gtSniperRifleShot,
   635                 gtSniperRifleShot:
   637                 gtShover:
       
   638                     begin
   636                     begin
   639                     DrawHedgehog(sx, sy, sign, 0, 4, 0);
   637                     DrawHedgehog(sx, sy, sign, 0, 4, 0);
   640                     defaultPos:= false;
   638                     defaultPos:= false;
   641                     HatVisible:= true
   639                     HatVisible:= true
   642                 end
   640                     end;
       
   641                 gtShover:
       
   642                     begin
       
   643                     DrawHedgehog(sx, sy, sign, 0, 5, 0);
       
   644                     defaultPos:= false;
       
   645                     HatVisible:= true
       
   646                     end
   643             end
   647             end
   644         end else
   648         end else
   645 
   649 
   646         if ((Gear^.State and gstHHJumping) <> 0) then
   650         if ((Gear^.State and gstHHJumping) <> 0) then
   647         begin
   651         begin
   812                             sx,
   816                             sx,
   813                             sy,
   817                             sy,
   814                             0,
   818                             0,
   815                             sign,
   819                             sign,
   816                             0);
   820                             0);
       
   821                 amBaseballBat: DrawHedgehog(sx, sy,
       
   822                             sign,
       
   823                             0,
       
   824                             5,
       
   825                             0);
   817             else
   826             else
   818                 DrawHedgehog(sx, sy,
   827                 DrawHedgehog(sx, sy,
   819                     sign,
   828                     sign,
   820                     0,
   829                     0,
   821                     4,
   830                     4,
   834                             32,
   843                             32,
   835                             32); *)
   844                             32); *)
   836             end;
   845             end;
   837 
   846 
   838             case amt of
   847             case amt of
   839                 amBaseballBat: DrawSpriteRotated(sprHandBaseball,
   848                 amBaseballBat: DrawSpritePivotedF(sprHandBaseball,
   840                         sx - 4 * sign,
   849                         sx + 9 * sign,
   841                         sy + 9, sign, aangle);
   850                         sy - 6, 0, sign, -8, 9, aangle);
   842             end;
   851             end;
   843 
   852 
   844             defaultPos:= false
   853             defaultPos:= false
   845         end;
   854         end;
   846 
   855 
  1017                 amJetpack: DrawSprite(sprJetpack, sx-32, sy-32, 0);
  1026                 amJetpack: DrawSprite(sprJetpack, sx-32, sy-32, 0);
  1018                 end
  1027                 end
  1019             end; *)
  1028             end; *)
  1020         if CurAmmoGear <> nil then
  1029         if CurAmmoGear <> nil then
  1021             begin
  1030             begin
       
  1031             aangle:= Gear^.Angle * 180 / cMaxAngle - 90;
  1022             case CurAmmoGear^.Kind of
  1032             case CurAmmoGear^.Kind of
  1023                 gtJetpack: begin
  1033                 gtJetpack: begin
  1024                         DrawSprite(sprJetpack, sx-32, sy-32, 0);
  1034                         DrawSprite(sprJetpack, sx-32, sy-32, 0);
  1025                         if cWaterLine > hwRound(Gear^.Y) + Gear^.Radius then
  1035                         if cWaterLine > hwRound(Gear^.Y) + Gear^.Radius then
  1026                             begin
  1036                             begin
  1033                             end;
  1043                             end;
  1034                         if CurAmmoGear^.Tex <> nil then
  1044                         if CurAmmoGear^.Tex <> nil then
  1035                             DrawTextureCentered(sx, sy - 40, CurAmmoGear^.Tex);
  1045                             DrawTextureCentered(sx, sy - 40, CurAmmoGear^.Tex);
  1036                         DrawAltWeapon(Gear, sx, sy)
  1046                         DrawAltWeapon(Gear, sx, sy)
  1037                         end;
  1047                         end;
       
  1048                 gtShover: DrawSpritePivotedF(sprHandBaseball, sx + 9 * sign, sy - 6, CurAmmoGear^.Tag, sign, -8, 9, aangle);
  1038                 end;
  1049                 end;
  1039             end
  1050             end
  1040         end;
  1051         end;
  1041 
  1052 
  1042     with HH^ do
  1053     with HH^ do