hedgewars/uGearsRender.pas
changeset 14736 8563cc40fc1e
parent 14663 fb73852e6f4d
child 14749 533ac9774279
equal deleted inserted replaced
14735:2d859d34e6f6 14736:8563cc40fc1e
    51                                 end;
    51                                 end;
    52                 rounded: array[0..MAXROPEPOINTS + 2] of TVertex2f;
    52                 rounded: array[0..MAXROPEPOINTS + 2] of TVertex2f;
    53                 end;
    53                 end;
    54 
    54 
    55 implementation
    55 implementation
    56 uses uRender, uUtils, uVariables, uAmmos, Math, uVisualGearsList;
    56 uses uRender, uRenderUtils, uUtils, uVariables, uAmmos, Math, uVisualGearsList;
    57 
    57 
    58 procedure DrawRopeLinesRQ(Gear: PGear);
    58 procedure DrawRopeLinesRQ(Gear: PGear);
    59 var n: LongInt;
    59 var n: LongInt;
    60 begin
    60 begin
    61 with RopePoints do
    61 with RopePoints do
   301                 ty:= max(ViewTopY + t, ty);
   301                 ty:= max(ViewTopY + t, ty);
   302             end;
   302             end;
   303 
   303 
   304         dAngle := DxDy2Angle(int2hwfloat(ty - oy), int2hwfloat(tx - ox)) + 90;
   304         dAngle := DxDy2Angle(int2hwfloat(ty - oy), int2hwfloat(tx - ox)) + 90;
   305 
   305 
       
   306         if (IsTooDarkToRead(HH^.Team^.Clan^.Color)) then
       
   307             DrawSpriteRotatedF(sprFingerBackInv, tx, ty, RealTicks div 32 mod 16, 1, dAngle)
       
   308         else
       
   309             DrawSpriteRotatedF(sprFingerBack, tx, ty, RealTicks div 32 mod 16, 1, dAngle);
   306         Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   310         Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   307         DrawSpriteRotatedF(sprFinger, tx, ty, RealTicks div 32 mod 16, 1, dAngle);
   311         DrawSpriteRotatedF(sprFinger, tx, ty, RealTicks div 32 mod 16, 1, dAngle);
   308         untint;
   312         untint;
   309         end;
   313         end;
   310 
   314 
  1257     else if Gear^.AmmoType = amIceGun then
  1261     else if Gear^.AmmoType = amIceGun then
  1258         DrawTextureRotatedF(SpritesData[sprSnowDust].Texture, 1/(1+(RealTicks shr 8) mod 5), 0, 0, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, (RealTicks shr 2) mod 8, 1, 22, 22, (RealTicks shr 3) mod 360)
  1262         DrawTextureRotatedF(SpritesData[sprSnowDust].Texture, 1/(1+(RealTicks shr 8) mod 5), 0, 0, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, (RealTicks shr 2) mod 8, 1, 22, 22, (RealTicks shr 3) mod 360)
  1259     else
  1263     else
  1260         begin
  1264         begin
  1261         if CurrentHedgehog <> nil then
  1265         if CurrentHedgehog <> nil then
       
  1266             begin
       
  1267             if (IsTooDarkToRead(CurrentHedgehog^.Team^.Clan^.Color)) then
       
  1268                 DrawSpriteRotatedF(sprTargetPBackInv, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360)
       
  1269             else
       
  1270                 DrawSpriteRotatedF(sprTargetPBack, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
  1262             Tint(CurrentHedgehog^.Team^.Clan^.Color shl 8 or $FF);
  1271             Tint(CurrentHedgehog^.Team^.Clan^.Color shl 8 or $FF);
       
  1272             end;
  1263         DrawSpriteRotatedF(sprTargetP, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
  1273         DrawSpriteRotatedF(sprTargetP, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
  1264         if CurrentHedgehog <> nil then
  1274         if CurrentHedgehog <> nil then
  1265             untint;
  1275             untint;
  1266         end;
  1276         end;
  1267 
  1277