# HG changeset patch # User nemo # Date 1320614467 18000 # Node ID ef2804785a4ea0ea13feff5552dad227fa182343 # Parent 25cfd9f4a5674a3af6a5c16749ed39f5aca05222 Might as well make the air attack team coloured too diff -r 25cfd9f4a567 -r ef2804785a4e hedgewars/uGearsRender.pas --- 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; diff -r 25cfd9f4a567 -r ef2804785a4e hedgewars/uVariables.pas --- 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; diff -r 25cfd9f4a567 -r ef2804785a4e share/hedgewars/Data/Graphics/Airplane.png Binary file share/hedgewars/Data/Graphics/Airplane.png has changed