hedgewars/VGSHandlers.inc
changeset 4420 6be946bcd17a
parent 4379 6cd6b77df8b8
child 4421 58c6918acde4
--- a/hedgewars/VGSHandlers.inc	Wed Nov 24 20:36:46 2010 -0500
+++ b/hedgewars/VGSHandlers.inc	Thu Nov 25 22:56:28 2010 -0500
@@ -627,3 +627,23 @@
   else
       dec(Gear^.FrameTicks, Steps);
 end;
+
+////////////////////////////////////////////////////////////////////////////////
+procedure doStepCircle(Gear: PVisualGear; Steps: Longword);
+var tmp: byte;
+begin
+with Gear^ do
+    if Frame <> 0 then
+        begin
+        inc(FrameTicks, Steps);
+        if (FrameTicks mod Frame) = 0 then
+            begin
+            tmp:= Gear^.Tint and $FF;
+            if tdY >= 0 then inc(tmp)
+            else dec(tmp);
+            if tmp < round(dX) then tdY:= 1;
+            if tmp > round(dY) then tdY:= -1;
+            Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or tmp
+            end
+        end
+end;