hedgewars/uGearsRender.pas
changeset 6308 ef2804785a4e
parent 6142 ee0bcee5bf86
child 6318 ca12368acc16
equal deleted inserted replaced
6307:25cfd9f4a567 6308:ef2804785a4e
   893 
   893 
   894        gtRCPlane: begin
   894        gtRCPlane: begin
   895                   Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF);
   895                   Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF);
   896                   if Gear^.Tag = -1 then
   896                   if Gear^.Tag = -1 then
   897                       begin
   897                       begin
   898                       DrawRotatedTextureF(SpritesData[sprPlane].Texture, 1, 0, 0, x, y, 0, -1, SpritesData[sprPlane].Width, SpritesData[sprPlane].Height, DxDy2Angle(Gear^.dX, Gear^.dY) + 90);
   898                       DrawRotatedF(sprPlane, x, y, 0, -1, DxDy2Angle(Gear^.dX, Gear^.dY) + 90);
   899                       Tint($FF, $FF, $FF, $FF);
   899                       Tint($FF, $FF, $FF, $FF);
   900                       DrawRotatedTextureF(SpritesData[sprPlane].Texture, 1, 0, 0, x, y, 1, -1, SpritesData[sprPlane].Width, SpritesData[sprPlane].Height, DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
   900                       DrawRotatedF(sprPlane, x, y, 1, -1, DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
   901                       end
   901                       end
   902                   else
   902                   else
   903                       begin
   903                       begin
   904                       DrawRotatedTextureF(SpritesData[sprPlane].Texture, 1, 0, 0, x, y, 0, 0,  SpritesData[sprPlane].Width, SpritesData[sprPlane].Height, DxDy2Angle(Gear^.dY, Gear^.dX));
   904                       DrawRotatedF(sprPlane, x, y, 0, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
   905                       Tint($FF, $FF, $FF, $FF);
   905                       Tint($FF, $FF, $FF, $FF);
   906                       DrawRotatedTextureF(SpritesData[sprPlane].Texture, 1, 0, 0, x, y, 1, 0,  SpritesData[sprPlane].Width, SpritesData[sprPlane].Height, DxDy2Angle(Gear^.dY, Gear^.dX))
   906                       DrawRotatedF(sprPlane, x, y, 1, 0, DxDy2Angle(Gear^.dY, Gear^.dX))
   907                       end
   907                       end
   908                   end;
   908                   end;
   909        gtBall: DrawRotatedf(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle);
   909        gtBall: DrawRotatedf(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle);
   910 
   910 
   911        gtPortal: if ((Gear^.Tag and 1) = 0) // still moving?
   911        gtPortal: if ((Gear^.Tag and 1) = 0) // still moving?
   984            gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16);
   984            gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16);
   985        gtParachute: begin
   985        gtParachute: begin
   986                     DrawSprite(sprParachute, x - 24, y - 48, 0);
   986                     DrawSprite(sprParachute, x - 24, y - 48, 0);
   987                     DrawAltWeapon(Gear, x + 1, y - 3)
   987                     DrawAltWeapon(Gear, x + 1, y - 3)
   988                     end;
   988                     end;
   989        gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 0)
   989        gtAirAttack: begin
   990                                      else DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 1);
   990                     Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF);
       
   991                     DrawRotatedF(sprAirplane, x, y, 0, Gear^.Tag, 0);
       
   992                     Tint($FF, $FF, $FF, $FF);
       
   993                     DrawRotatedF(sprAirplane, x, y, 1, Gear^.Tag, 0);
       
   994                     end;
   991          gtAirBomb: DrawRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
   995          gtAirBomb: DrawRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
   992         gtTeleport: begin
   996         gtTeleport: begin
   993                     HHGear:= Gear^.Hedgehog^.Gear;
   997                     HHGear:= Gear^.Hedgehog^.Gear;
   994                     if not Gear^.Hedgehog^.Unplaced then DrawRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0);
   998                     if not Gear^.Hedgehog^.Unplaced then DrawRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0);
   995                     DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0);
   999                     DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0);