hedgewars/uVisualGears.pas
changeset 3267 02139461250c
parent 3248 8d4c61f6f30c
child 3326 7f57fc2bf630
equal deleted inserted replaced
3266:aef4b9316060 3267:02139461250c
   332 begin
   332 begin
   333 inc(Gear^.Timer, Steps);
   333 inc(Gear^.Timer, Steps);
   334 if Gear^.Timer >= Gear^.FrameTicks then DeleteVisualGear(Gear)
   334 if Gear^.Timer >= Gear^.FrameTicks then DeleteVisualGear(Gear)
   335 else
   335 else
   336     begin
   336     begin
   337     Gear^.scale := 1.25 * (-power(2, -7 * Int(Gear^.Timer)/Gear^.FrameTicks) + 1) + 0.4;
   337     Gear^.scale := 1.25 * (-power(2, -10 * Int(Gear^.Timer)/Gear^.FrameTicks) + 1) + 0.4;
   338     Gear^.alpha := 1.0 * (power(2, -3 * (Gear^.Timer - 350)/350));
   338     Gear^.alpha := -1.0 * (power(Gear^.Timer/350, 4) - 1);
   339     end;
   339     end;
   340 end;
   340 end;
   341 
   341 
   342 procedure doStepFeather(Gear: PVisualGear; Steps: Longword);
   342 procedure doStepFeather(Gear: PVisualGear; Steps: Longword);
   343 begin
   343 begin