hedgewars/uVisualGears.pas
changeset 3594 aeca3d8f1b29
parent 3593 ae50f63e4fa9
child 3597 978c30ef50fc
equal deleted inserted replaced
3593:ae50f63e4fa9 3594:aeca3d8f1b29
   129         begin
   129         begin
   130         AddVisualGear:= nil;
   130         AddVisualGear:= nil;
   131         exit
   131         exit
   132         end;
   132         end;
   133 
   133 
   134 if cReducedQuality and
   134 if ((cReducedQuality and rqFancyBoom) <> 0) and
   135    not (Kind in
   135    not (Kind in
   136    [vgtTeamHealthSorter,
   136    [vgtTeamHealthSorter,
   137     vgtSmallDamageTag,
   137     vgtSmallDamageTag,
   138     vgtSpeechBubble,
   138     vgtSpeechBubble,
   139     vgtHealthTag,
   139     vgtHealthTag,
   140     vgtExplosion,
   140     vgtExplosion,
   141     vgtSmokeTrace,
   141     vgtSmokeTrace,
   142     vgtEvilTrace]) then
   142     vgtEvilTrace]) then
   143     begin
   143     begin
   144     AddVisualGear:= nil;
   144       AddVisualGear:= nil;
   145     exit
   145       exit
   146     end;
   146     end;
   147 
   147 
   148 New(gear);
   148 New(gear);
   149 FillChar(gear^, sizeof(TVisualGear), 0);
   149 FillChar(gear^, sizeof(TVisualGear), 0);
   150 gear^.X:= float(X);
   150 gear^.X:= float(X);
   343 
   343 
   344 procedure KickFlakes(Radius, X, Y: LongInt);
   344 procedure KickFlakes(Radius, X, Y: LongInt);
   345 var Gear, t: PVisualGear;
   345 var Gear, t: PVisualGear;
   346     dmg: LongInt;
   346     dmg: LongInt;
   347 begin
   347 begin
   348 if (vobCount = 0) or (vobCount > 200) or cReducedQuality then exit;
   348 if (vobCount = 0) or (vobCount > 200) or ((cReducedQuality and rqkillFlakes) <> 0) then exit;
   349 t:= VisualGearsList;
   349 t:= VisualGearsList;
   350 while t <> nil do
   350 while t <> nil do
   351       begin
   351       begin
   352       Gear:= t;
   352       Gear:= t;
   353       if Gear^.Kind = vgtFlake then
   353       if Gear^.Kind = vgtFlake then
   389         Tint(Gear^.Tint);
   389         Tint(Gear^.Tint);
   390         case Gear^.Kind of
   390         case Gear^.Kind of
   391             vgtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   391             vgtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   392             vgtEvilTrace: if Gear^.State < 8 then DrawSprite(sprEvilTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   392             vgtEvilTrace: if Gear^.State < 8 then DrawSprite(sprEvilTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   393         end;
   393         end;
   394             if not cReducedQuality then
   394             if (cReducedQuality and rqFancyBoom) = 0 then
   395                 case Gear^.Kind of
   395                 case Gear^.Kind of
   396                     vgtSmoke: DrawSprite(sprSmoke, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   396                     vgtSmoke: DrawSprite(sprSmoke, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   397                     vgtSmokeWhite: DrawSprite(sprSmokeWhite, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   397                     vgtSmokeWhite: DrawSprite(sprSmokeWhite, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   398                     vgtDust: DrawSprite(sprDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   398                     vgtDust: DrawSprite(sprDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   399                     vgtFeather: begin
   399                     vgtFeather: begin
   412             vgtBigExplosion: begin
   412             vgtBigExplosion: begin
   413                              Tint($FF, $FF, $FF, floor($FF * (1 - power(Gear^.Timer / 250, 4))));
   413                              Tint($FF, $FF, $FF, floor($FF * (1 - power(Gear^.Timer / 250, 4))));
   414                              DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -10 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
   414                              DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -10 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
   415                              end;
   415                              end;
   416             end;
   416             end;
   417         if not cReducedQuality then
   417         if (cReducedQuality and rqFancyBoom) = 0 then
   418             case Gear^.Kind of
   418             case Gear^.Kind of
   419                 vgtExplPart: DrawSprite(sprExplPart, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   419                 vgtExplPart: DrawSprite(sprExplPart, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   420                 vgtExplPart2: DrawSprite(sprExplPart2, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   420                 vgtExplPart2: DrawSprite(sprExplPart2, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   421                 vgtFire: DrawSprite(sprFlame, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy, (RealTicks div 64 + Gear^.Frame) mod 8);
   421                 vgtFire: DrawSprite(sprFlame, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy, (RealTicks div 64 + Gear^.Frame) mod 8);
   422                 vgtBubble: DrawSprite(sprBubbles, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);//(RealTicks div 64 + Gear^.Frame) mod 8);
   422                 vgtBubble: DrawSprite(sprBubbles, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);//(RealTicks div 64 + Gear^.Frame) mod 8);