hedgewars/uVisualGears.pas
changeset 3443 14d12df0d363
parent 3440 dee31c5149e0
child 3447 2f1c2b7215e6
equal deleted inserted replaced
3442:69898c6ede14 3443:14d12df0d363
   379             vgtFlake: if vobVelocity = 0 then
   379             vgtFlake: if vobVelocity = 0 then
   380                         DrawSprite(sprFlake, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   380                         DrawSprite(sprFlake, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   381                     else
   381                     else
   382                         DrawRotatedF(sprFlake, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   382                         DrawRotatedF(sprFlake, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   383             vgtCloud: DrawSprite(sprCloud, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame);
   383             vgtCloud: DrawSprite(sprCloud, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame);
       
   384             
       
   385             vgtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State);
       
   386             vgtEvilTrace: if Gear^.State < 8 then DrawSprite(sprEvilTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State);
   384             end;
   387             end;
   385         Gear:= Gear^.NextGear
   388         Gear:= Gear^.NextGear
   386         end;
   389         end;
   387     1: while Gear <> nil do
   390     1: while Gear <> nil do
   388         begin
   391         begin
   396                                 Tint($FF, $FF, $FF, Gear^.FrameTicks);
   399                                 Tint($FF, $FF, $FF, Gear^.FrameTicks);
   397                             DrawRotatedF(sprFeather, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   400                             DrawRotatedF(sprFeather, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   398                             if Gear^.FrameTicks < 255 then
   401                             if Gear^.FrameTicks < 255 then
   399                                 Tint($FF, $FF, $FF, $FF);
   402                                 Tint($FF, $FF, $FF, $FF);
   400                             end;
   403                             end;
   401                 end;
   404                  end;
   402             case Gear^.Kind of
       
   403                 vgtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State);
       
   404                 vgtEvilTrace: if Gear^.State < 8 then DrawSprite(sprEvilTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State);                
       
   405                 vgtExplosion: DrawSprite(sprExplosion50, hwRound(Gear^.X) - 32 + WorldDx, hwRound(Gear^.Y) - 32 + WorldDy, Gear^.State);
       
   406                 vgtBigExplosion: begin
       
   407                                  Tint($FF, $FF, $FF, floor($FF * (1 - power(Gear^.Timer / 250, 4))));
       
   408                                  DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -10 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
       
   409                                  Tint($FF, $FF, $FF, $FF);
       
   410                                  end;
       
   411             end;
       
   412         Gear:= Gear^.NextGear
   405         Gear:= Gear^.NextGear
   413         end;
   406         end;
   414     2: while Gear <> nil do
   407     2: while Gear <> nil do
   415         begin
   408         begin
       
   409         case Gear^.Kind of
       
   410             vgtExplosion: DrawSprite(sprExplosion50, hwRound(Gear^.X) - 32 + WorldDx, hwRound(Gear^.Y) - 32 + WorldDy, Gear^.State);
       
   411             vgtBigExplosion: begin
       
   412                              Tint($FF, $FF, $FF, floor($FF * (1 - power(Gear^.Timer / 250, 4))));
       
   413                              DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -10 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
       
   414                              Tint($FF, $FF, $FF, $FF);
       
   415                              end;
       
   416             end;
   416         if not cReducedQuality then
   417         if not cReducedQuality then
   417             case Gear^.Kind of
   418             case Gear^.Kind of
   418                 vgtExplPart: DrawSprite(sprExplPart, hwRound(Gear^.X) + WorldDx - 16, hwRound(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   419                 vgtExplPart: DrawSprite(sprExplPart, hwRound(Gear^.X) + WorldDx - 16, hwRound(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   419                 vgtExplPart2: DrawSprite(sprExplPart2, hwRound(Gear^.X) + WorldDx - 16, hwRound(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   420                 vgtExplPart2: DrawSprite(sprExplPart2, hwRound(Gear^.X) + WorldDx - 16, hwRound(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   420                 vgtFire: DrawSprite(sprFlame, hwRound(Gear^.X) + WorldDx - 8, hwRound(Gear^.Y) + WorldDy, (RealTicks div 64 + Gear^.Frame) mod 8);
   421                 vgtFire: DrawSprite(sprFlame, hwRound(Gear^.X) + WorldDx - 8, hwRound(Gear^.Y) + WorldDy, (RealTicks div 64 + Gear^.Frame) mod 8);