hedgewars/uVisualGears.pas
changeset 3045 41732f986b4f
parent 3038 4e48c276a468
child 3062 62eb6095497b
--- a/hedgewars/uVisualGears.pas	Mon Mar 22 13:44:35 2010 +0000
+++ b/hedgewars/uVisualGears.pas	Mon Mar 22 17:48:19 2010 +0000
@@ -60,6 +60,7 @@
 procedure DeleteVisualGear(Gear: PVisualGear);
 procedure AddClouds;
 procedure AddDamageTag(X, Y, Damage, Color: LongWord);
+procedure FreeVisualGears;
 
 var VisualGearsList: PVisualGear;
     vobFrameTicks, vobFramesCount: Longword;
@@ -745,6 +746,11 @@
     AddVisualGear( - cScreenWidth + i * ((cScreenWidth * 2 + (LAND_WIDTH+256)) div (cCloudsNumber + 1)), LAND_HEIGHT-1184, vgtCloud)
 end;
 
+procedure FreeVisualGears;
+begin
+    while VisualGearsList <> nil do DeleteVisualGear(VisualGearsList);
+end;
+
 procedure initModule;
 begin
     VisualGearsList:= nil;
@@ -752,7 +758,6 @@
 
 procedure freeModule;
 begin
-    while VisualGearsList <> nil do DeleteVisualGear(VisualGearsList);
 end;
 
 end.