Might as well make the air attack team coloured too
authornemo
Sun, 06 Nov 2011 16:21:07 -0500
changeset 6308 ef2804785a4e
parent 6307 25cfd9f4a567
child 6309 82e846e5d502
Might as well make the air attack team coloured too
hedgewars/uGearsRender.pas
hedgewars/uVariables.pas
share/hedgewars/Data/Graphics/Airplane.png
--- a/hedgewars/uGearsRender.pas	Sun Nov 06 23:36:02 2011 +0300
+++ b/hedgewars/uGearsRender.pas	Sun Nov 06 16:21:07 2011 -0500
@@ -895,15 +895,15 @@
                   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);
+                      DrawRotatedF(sprPlane, x, y, 0, -1, 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)
+                      DrawRotatedF(sprPlane, x, y, 1, -1, DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
                       end
                   else
                       begin
-                      DrawRotatedTextureF(SpritesData[sprPlane].Texture, 1, 0, 0, x, y, 0, 0,  SpritesData[sprPlane].Width, SpritesData[sprPlane].Height, DxDy2Angle(Gear^.dY, Gear^.dX));
+                      DrawRotatedF(sprPlane, x, y, 0, 0, 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))
+                      DrawRotatedF(sprPlane, x, y, 1, 0, DxDy2Angle(Gear^.dY, Gear^.dX))
                       end
                   end;
        gtBall: DrawRotatedf(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle);
@@ -986,8 +986,12 @@
                     DrawSprite(sprParachute, x - 24, y - 48, 0);
                     DrawAltWeapon(Gear, x + 1, y - 3)
                     end;
-       gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 0)
-                                     else DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 1);
+       gtAirAttack: begin
+                    Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF);
+                    DrawRotatedF(sprAirplane, x, y, 0, Gear^.Tag, 0);
+                    Tint($FF, $FF, $FF, $FF);
+                    DrawRotatedF(sprAirplane, x, y, 1, Gear^.Tag, 0);
+                    end;
          gtAirBomb: DrawRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
         gtTeleport: begin
                     HHGear:= Gear^.Hedgehog^.Gear;
--- a/hedgewars/uVariables.pas	Sun Nov 06 23:36:02 2011 +0300
+++ b/hedgewars/uVariables.pas	Sun Nov 06 16:21:07 2011 -0500
@@ -345,7 +345,7 @@
             (FileName:    'AirBomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
             Width:  16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAirBomb
             (FileName:   'Airplane'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
-            Width: 254; Height: 101; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAirplane
+            Width: 256; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAirplane
             (FileName: 'amAirplane'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
             Width:  64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAmAirplane
             (FileName:   'amGirder'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
Binary file share/hedgewars/Data/Graphics/Airplane.png has changed