hedgewars/uGears.pas
changeset 3115 831bd0f7050d
parent 3114 3a3d1ee2ebd0
child 3118 1320933fd651
equal deleted inserted replaced
3114:3a3d1ee2ebd0 3115:831bd0f7050d
   447                 gear^.Radius:= 6;
   447                 gear^.Radius:= 6;
   448                 end;
   448                 end;
   449        gtBirdy: begin
   449        gtBirdy: begin
   450                 gear^.Radius:= 16; // todo: check
   450                 gear^.Radius:= 16; // todo: check
   451                 gear^.Timer:= 500;
   451                 gear^.Timer:= 500;
   452 				        gear^.Health := 2000;
   452                 gear^.Health := 2000;
   453                 gear^.FlightTime := 2;
   453                 gear^.FlightTime := 2;
   454                 end;
   454                 end;
   455 gtBigExplosion: begin
   455 gtBigExplosion: begin
   456                 gear^.Angle:= random(360);
   456                 gear^.Angle:= random(360);
   457                 end;
   457                 end;
   458 		 gtEgg: begin 
   458          gtEgg: begin 
   459                 gear^.Radius:= 4;
   459                 gear^.Radius:= 4;
   460                 gear^.Elasticity:= _0_6;
   460                 gear^.Elasticity:= _0_6;
   461                 gear^.Friction:= _0_96;
   461                 gear^.Friction:= _0_96;
   462                 if gear^.Timer = 0 then gear^.Timer:= 3000
   462                 if gear^.Timer = 0 then gear^.Timer:= 3000
   463                 end;
   463                 end;
  1701     gtBigExplosion: begin
  1701     gtBigExplosion: begin
  1702                     glColor4f(1, 1, 1, 1.0 * (power(2, -5 * (Gear^.Timer-200)/200)));
  1702                     glColor4f(1, 1, 1, 1.0 * (power(2, -5 * (Gear^.Timer-200)/200)));
  1703                     DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -4 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
  1703                     DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -4 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
  1704                     glColor4f(1, 1, 1, 1);
  1704                     glColor4f(1, 1, 1, 1);
  1705                     end;
  1705                     end;
  1706 			   gtEgg: DrawRotated(sprEgg, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
  1706              gtEgg: DrawRotatedTextureF(SpritesData[sprEgg].Texture, 1, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 16, 16, Gear^.DirAngle);
  1707          end;
  1707          end;
  1708       if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(hwRound(Gear^.X) + 8 + WorldDx, hwRound(Gear^.Y) + 8 + WorldDy, Gear^.Tex);
  1708       if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(hwRound(Gear^.X) + 8 + WorldDx, hwRound(Gear^.Y) + 8 + WorldDy, Gear^.Tex);
  1709       Gear:= Gear^.NextGear
  1709       Gear:= Gear^.NextGear
  1710       end;
  1710       end;
  1711 end;
  1711 end;