hedgewars/uGearsRender.pas
branchqmlfrontend
changeset 10748 dc587913987c
parent 10683 31a0e7efa17a
child 10789 acbf69e2e5cf
equal deleted inserted replaced
10616:20a2d5e6930a 10748:dc587913987c
   166 end;
   166 end;
   167 
   167 
   168 procedure DrawRope(Gear: PGear);
   168 procedure DrawRope(Gear: PGear);
   169 var roplen, i: LongInt;
   169 var roplen, i: LongInt;
   170 begin
   170 begin
       
   171     if Gear^.Hedgehog^.Gear = nil then exit;
   171     if (cReducedQuality and rqSimpleRope) <> 0 then
   172     if (cReducedQuality and rqSimpleRope) <> 0 then
   172         DrawRopeLinesRQ(Gear)
   173         DrawRopeLinesRQ(Gear)
   173     else
   174     else
   174         begin
   175         begin
   175         roplen:= 0;
   176         roplen:= 0;
  1202                     DrawSpriteRotatedF(sprAirplane, x, y, 1, Gear^.Tag, 0);
  1203                     DrawSpriteRotatedF(sprAirplane, x, y, 1, Gear^.Tag, 0);
  1203                     end;
  1204                     end;
  1204          gtAirBomb: DrawSpriteRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
  1205          gtAirBomb: DrawSpriteRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
  1205         gtTeleport: begin
  1206         gtTeleport: begin
  1206                     HHGear:= Gear^.Hedgehog^.Gear;
  1207                     HHGear:= Gear^.Hedgehog^.Gear;
  1207                     if ((Gear^.State and gstAnimation) <> 0) then
  1208                     if HHGear <> nil then
  1208                         DrawSpriteRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0);
  1209                         begin
  1209                     DrawSpriteRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0);
  1210                         if ((Gear^.State and gstAnimation) <> 0) then
       
  1211                             DrawSpriteRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0);
       
  1212                         DrawSpriteRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0)
       
  1213                         end
  1210                     end;
  1214                     end;
  1211         gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12);
  1215         gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12);
  1212           gtTarget: begin
  1216           gtTarget: begin
  1213                     Tint($FF, $FF, $FF, round($FF * Gear^.Timer / 1000));
  1217                     Tint($FF, $FF, $FF, round($FF * Gear^.Timer / 1000));
  1214                     DrawSprite(sprTarget, x - 16, y - 16, 0);
  1218                     DrawSprite(sprTarget, x - 16, y - 16, 0);