hedgewars/VGSHandlers.inc
changeset 3704 ed2b9c7fb260
parent 3699 e5e2cbc90891
child 3706 a79784328c03
equal deleted inserted replaced
3702:6c90190908b6 3704:ed2b9c7fb260
   107         end
   107         end
   108     else dec(Gear^.FrameTicks, Steps)
   108     else dec(Gear^.FrameTicks, Steps)
   109 end;
   109 end;
   110 
   110 
   111 ////////////////////////////////////////////////////////////////////////////////
   111 ////////////////////////////////////////////////////////////////////////////////
       
   112 procedure doStepNote(Gear: PVisualGear; Steps: Longword);
       
   113 begin
       
   114 Gear^.X:= Gear^.X + Gear^.dX * Steps;
       
   115 
       
   116 Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
       
   117 Gear^.dY:= Gear^.dY + cGravityf * Steps;
       
   118 
       
   119 Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle;
       
   120 
       
   121 if Gear^.FrameTicks <= Steps then
       
   122     DeleteVisualGear(Gear)
       
   123 else
       
   124     dec(Gear^.FrameTicks, Steps)
       
   125 end;
       
   126 
       
   127 ////////////////////////////////////////////////////////////////////////////////
   112 procedure doStepEgg(Gear: PVisualGear; Steps: Longword);
   128 procedure doStepEgg(Gear: PVisualGear; Steps: Longword);
   113 begin
   129 begin
   114 Gear^.X:= Gear^.X + Gear^.dX * Steps;
   130 Gear^.X:= Gear^.X + Gear^.dX * Steps;
   115 
   131 
   116 Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
   132 Gear^.Y:= Gear^.Y + Gear^.dY * Steps;