hedgewars/uVisualGears.pas
changeset 6986 409dd3851309
parent 6982 8d41d22a291d
child 6999 486db9d26e4b
--- a/hedgewars/uVisualGears.pas	Tue May 01 17:33:28 2012 -0400
+++ b/hedgewars/uVisualGears.pas	Wed May 02 08:07:17 2012 +0100
@@ -34,17 +34,23 @@
 procedure initModule;
 procedure freeModule;
 
-function  AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0; Critical: Boolean = false): PVisualGear;
+function  AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear; inline;
+function  AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord): PVisualGear; inline;
+function  AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord; Critical: Boolean): PVisualGear;
+
 procedure ProcessVisualGears(Steps: Longword);
-procedure KickFlakes(Radius, X, Y: LongInt);
 procedure DrawVisualGears(Layer: LongWord);
 procedure DeleteVisualGear(Gear: PVisualGear);
 function  VisualGearByUID(uid : Longword) : PVisualGear;
+
 procedure AddClouds;
-procedure ChangeToSDClouds;
 procedure AddFlakes;
+procedure AddDamageTag(X, Y, Damage, Color: LongWord);
+
+procedure ChangeToSDClouds;
 procedure ChangeToSDFlakes;
-procedure AddDamageTag(X, Y, Damage, Color: LongWord);
+
+procedure KickFlakes(Radius, X, Y: LongInt);
 
 implementation
 uses uSound, uMobile, uVariables, uTextures, uRender, Math, uRenderUtils, uStore, uUtils;
@@ -112,7 +118,17 @@
             @doStepStraightShot
         );
 
-function  AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0; Critical: Boolean = false): PVisualGear;
+function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear; inline;
+begin
+    AddVisualGear:= AddVisualGear(X, Y, Kind, 0, false);
+end;
+
+function  AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord): PVisualGear; inline;
+begin
+    AddVisualGear:= AddVisualGear(X, Y, Kind, State, false);
+end;
+
+function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord; Critical: Boolean): PVisualGear;
 var gear: PVisualGear;
     t: Longword;
     sp: real;