hedgewars/uGearsRender.pas
branchhedgeroid
changeset 6224 42b256eca362
parent 6023 a28be05b20bc
parent 6142 ee0bcee5bf86
child 6328 d14adf1c7721
--- a/hedgewars/uGearsRender.pas	Fri Oct 28 17:41:39 2011 +0200
+++ b/hedgewars/uGearsRender.pas	Fri Oct 28 18:26:17 2011 +0200
@@ -894,10 +894,19 @@
                   else DrawSprite(sprMolotov, x, y, 8);
 
        gtRCPlane: begin
-                  if (Gear^.Tag = -1) then
-                     DrawRotated(sprPlane, x, y, -1,  DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
+                  Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF);
+                  if Gear^.Tag = -1 then
+                      begin
+                      DrawRotatedTextureF(SpritesData[sprPlane].Texture, 1, 0, 0, x, y, 0, -1, SpritesData[sprPlane].Width, SpritesData[sprPlane].Height, DxDy2Angle(Gear^.dX, Gear^.dY) + 90);
+                      Tint($FF, $FF, $FF, $FF);
+                      DrawRotatedTextureF(SpritesData[sprPlane].Texture, 1, 0, 0, x, y, 1, -1, SpritesData[sprPlane].Width, SpritesData[sprPlane].Height, DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
+                      end
                   else
-                     DrawRotated(sprPlane, x, y,0,DxDy2Angle(Gear^.dY, Gear^.dX));
+                      begin
+                      DrawRotatedTextureF(SpritesData[sprPlane].Texture, 1, 0, 0, x, y, 0, 0,  SpritesData[sprPlane].Width, SpritesData[sprPlane].Height, DxDy2Angle(Gear^.dY, Gear^.dX));
+                      Tint($FF, $FF, $FF, $FF);
+                      DrawRotatedTextureF(SpritesData[sprPlane].Texture, 1, 0, 0, x, y, 1, 0,  SpritesData[sprPlane].Width, SpritesData[sprPlane].Height, DxDy2Angle(Gear^.dY, Gear^.dX))
+                      end
                   end;
        gtBall: DrawRotatedf(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle);