hedgewars/uGearsRender.pas
changeset 10562 3388822b3914
parent 10560 9f09196d92a6
child 10682 1be106f8095a
equal deleted inserted replaced
10560:9f09196d92a6 10562:3388822b3914
   164     end;
   164     end;
   165     DrawRopeLine:= roplen;
   165     DrawRopeLine:= roplen;
   166 end;
   166 end;
   167 
   167 
   168 procedure DrawRope(Gear: PGear);
   168 procedure DrawRope(Gear: PGear);
   169 var roplen: LongInt;
   169 var roplen, i: LongInt;
   170     i: Longword;
       
   171 begin
   170 begin
   172     if (cReducedQuality and rqSimpleRope) <> 0 then
   171     if (cReducedQuality and rqSimpleRope) <> 0 then
   173         DrawRopeLinesRQ(Gear)
   172         DrawRopeLinesRQ(Gear)
   174     else
   173     else
   175         begin
   174         begin
   709                                             oy-256,
   708                                             oy-256,
   710                                             LongInt(topY)+WorldDy,
   709                                             LongInt(topY)+WorldDy,
   711                                             LongInt(rightX)+WorldDx,
   710                                             LongInt(rightX)+WorldDx,
   712                                             cWaterLine+WorldDy,
   711                                             cWaterLine+WorldDy,
   713                                             LongInt(leftX)+WorldDx);
   712                                             LongInt(leftX)+WorldDx);
   714                         if hwRound(Gear^.X) > rightX-256 then
   713                         if hwRound(Gear^.X) > LongInt(rightX) - 256 then
   715                             DrawSpriteClipped(sprGirder,
   714                             DrawSpriteClipped(sprGirder,
   716                                             leftX-(rightX-ox)-256,
   715                                             leftX-(rightX-ox)-256,
   717                                             oy-256,
   716                                             oy-256,
   718                                             LongInt(topY)+WorldDy,
   717                                             LongInt(topY)+WorldDy,
   719                                             LongInt(rightX)+WorldDx,
   718                                             LongInt(rightX)+WorldDx,
  1165                                 end
  1164                                 end
  1166                             end
  1165                             end
  1167                         end;
  1166                         end;
  1168                     if Gear^.Timer < 1833 then
  1167                     if Gear^.Timer < 1833 then
  1169                         begin
  1168                         begin
  1170                         DrawTextureRotatedF(SpritesData[sprPortal].texture, min(abs(1.25 - (Gear^.Timer mod 1333) / 400), 1.25), 0, 0,
  1169                         DrawTextureRotatedF(SpritesData[sprPortal].texture, MinD(abs(1.25 - (Gear^.Timer mod 1333) / 400), 1.25), 0, 0,
  1171                                             x, LongInt(Gear^.Angle) + WorldDy - 16, 4 + Gear^.Tag, 1, 32, 32, 270);
  1170                                             x, LongInt(Gear^.Angle) + WorldDy - 16, 4 + Gear^.Tag, 1, 32, 32, 270);
  1172                         end
  1171                         end
  1173                     end;
  1172                     end;
  1174       gtExplosives: begin
  1173       gtExplosives: begin
  1175                     if ((Gear^.State and gstDrowning) <> 0) then
  1174                     if ((Gear^.State and gstDrowning) <> 0) then