hedgewars/uGearsRender.pas
changeset 12898 8a40ce061d94
parent 12849 40c410cd6402
child 13096 d78e65c66573
equal deleted inserted replaced
12891:856570ddd409 12898:8a40ce061d94
   637                     begin
   637                     begin
   638                     DrawHedgehog(sx, sy, sign, 0, 4, 0);
   638                     DrawHedgehog(sx, sy, sign, 0, 4, 0);
   639                     defaultPos:= false;
   639                     defaultPos:= false;
   640                     HatVisible:= true
   640                     HatVisible:= true
   641                     end;
   641                     end;
   642                 gtShover:
   642                 gtShover, gtMinigun:
   643                     begin
   643                     begin
   644                     DrawHedgehog(sx, sy, sign, 0, 5, 0);
   644                     DrawHedgehog(sx, sy, sign, 0, 5, 0);
   645                     defaultPos:= false;
   645                     defaultPos:= false;
   646                     HatVisible:= true
   646                     HatVisible:= true
   647                     end
   647                     end
   820                             sx,
   820                             sx,
   821                             sy,
   821                             sy,
   822                             0,
   822                             0,
   823                             sign,
   823                             sign,
   824                             0);
   824                             0);
   825                 amBaseballBat:
   825                 amBaseballBat, amMinigun:
   826                     begin
   826                     begin
   827                     HatVisible:= true;
   827                     HatVisible:= true;
   828                     DrawHedgehog(sx, sy,
   828                     DrawHedgehog(sx, sy,
   829                             sign,
   829                             sign,
   830                             0,
   830                             0,
   848                             sy - 5,
   848                             sy - 5,
   849                             0,
   849                             0,
   850                             sign,
   850                             sign,
   851                             32,
   851                             32,
   852                             32); *)
   852                             32); *)
   853             end;
       
   854 
       
   855             case amt of
       
   856                 amBaseballBat: DrawSpritePivotedF(sprHandBaseball,
       
   857                         sx + 9 * sign,
       
   858                         sy + 2, 0, sign, -8, 1, aangle);
       
   859             end;
   853             end;
   860 
   854 
   861             defaultPos:= false
   855             defaultPos:= false
   862         end;
   856         end;
   863 
   857 
  1023                         32);
  1017                         32);
  1024                     untint
  1018                     untint
  1025                     end
  1019                     end
  1026                 end
  1020                 end
  1027         end;
  1021         end;
       
  1022 
  1028     if (Gear^.State and gstHHDriven) <> 0 then
  1023     if (Gear^.State and gstHHDriven) <> 0 then
  1029         begin
  1024         begin
  1030     (*    if (CurAmmoGear = nil) then
  1025     (*    if (CurAmmoGear = nil) then
  1031             begin
  1026             begin
  1032             amt:= CurrentHedgehog^.CurAmmoType;
  1027             amt:= CurrentHedgehog^.CurAmmoType;
  1034                 amJetpack: DrawSprite(sprJetpack, sx-32, sy-32, 0);
  1029                 amJetpack: DrawSprite(sprJetpack, sx-32, sy-32, 0);
  1035                 end
  1030                 end
  1036             end; *)
  1031             end; *)
  1037         if (CurAmmoGear = nil) then
  1032         if (CurAmmoGear = nil) then
  1038             begin
  1033             begin
  1039             if ((Gear^.State and (gstAttacked or gstAnimation or gstHHJumping)) = 0)
  1034                 if ((Gear^.State and (gstAttacked or gstAnimation or gstHHJumping)) = 0)
  1040             and (Gear^.Message and (gmLeft or gmRight) = 0) then
  1035                 and (Gear^.Message and (gmLeft or gmRight) = 0) then
  1041             begin
  1036                 begin
  1042                 amt:= CurrentHedgehog^.CurAmmoType;
  1037                 amt:= CurrentHedgehog^.CurAmmoType;
  1043                 case amt of
  1038                     case amt of
  1044                     amBaseballBat: DrawSpritePivotedF(sprHandBaseball,
  1039                         amBaseballBat: DrawSpritePivotedF(sprHandBaseball,
  1045                         sx + 9 * sign, sy + 2, 0, sign, -8, 1, aangle);
  1040                             sx + 9 * sign, sy + 2, 0, sign, -8, 1, aangle);
       
  1041                         amMinigun: DrawSpritePivotedF(sprMinigun,
       
  1042                             sx + 20 * sign, sy + 4, 0, sign, -18, -2, aangle);
       
  1043                     end;
  1046                 end;
  1044                 end;
  1047             end;
       
  1048             end
  1045             end
  1049         else
  1046         else
  1050             begin
  1047             begin
  1051             aangle:= Gear^.Angle * 180 / cMaxAngle - 90;
  1048             aangle:= Gear^.Angle * 180 / cMaxAngle - 90;
  1052             case CurAmmoGear^.Kind of
  1049             case CurAmmoGear^.Kind of
  1063                             end;
  1060                             end;
  1064                         if CurAmmoGear^.Tex <> nil then
  1061                         if CurAmmoGear^.Tex <> nil then
  1065                             DrawTextureCentered(sx, sy - 40, CurAmmoGear^.Tex);
  1062                             DrawTextureCentered(sx, sy - 40, CurAmmoGear^.Tex);
  1066                         DrawAltWeapon(Gear, sx, sy)
  1063                         DrawAltWeapon(Gear, sx, sy)
  1067                         end;
  1064                         end;
  1068                 gtShover: DrawSpritePivotedF(sprHandBaseball, sx + 9 * sign, sy + 2, CurAmmoGear^.Tag, sign, -8, 1, aangle);
  1065                 gtShover: DrawSpritePivotedF(sprHandBaseball,
       
  1066                     sx + 9 * sign, sy + 2, CurAmmoGear^.Tag, sign, -8, 1, aangle);
       
  1067                 gtMinigun: DrawSpritePivotedF(sprMinigun,
       
  1068                     sx + 20 * sign, sy + 4, CurAmmoGear^.Tag, sign, -18, -2, aangle);
  1069                 end;
  1069                 end;
  1070             end
  1070             end
  1071         end;
  1071         end;
  1072 
  1072 
  1073     with HH^ do
  1073     with HH^ do