hedgewars/uGearsUtils.pas
changeset 6986 409dd3851309
parent 6888 32a54322d262
child 6990 40e5af28d026
--- a/hedgewars/uGearsUtils.pas	Tue May 01 17:33:28 2012 -0400
+++ b/hedgewars/uGearsUtils.pas	Wed May 02 08:07:17 2012 +0100
@@ -22,7 +22,9 @@
 interface
 uses uTypes, math;
 
-procedure doMakeExplosion(X, Y, Radius: LongInt; AttackingHog: PHedgehog; Mask: Longword; const Tint: LongWord = $FFFFFFFF); 
+procedure doMakeExplosion(X, Y, Radius: LongInt; AttackingHog: PHedgehog; Mask: Longword); inline;
+procedure doMakeExplosion(X, Y, Radius: LongInt; AttackingHog: PHedgehog; Mask: Longword; const Tint: LongWord); 
+
 function  ModifyDamage(dmg: Longword; Gear: PGear): Longword;
 procedure ApplyDamage(Gear: PGear; AttackerHog: PHedgehog; Damage: Longword; Source: TDamageSource);
 procedure spawnHealthTagForHH(HHGear: PGear; dmg: Longword);
@@ -30,7 +32,10 @@
 procedure CheckHHDamage(Gear: PGear);
 procedure CalcRotationDirAngle(Gear: PGear);
 procedure ResurrectHedgehog(gear: PGear);
-procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt; skipProximity: boolean = false);
+
+procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt); inline;
+procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt; skipProximity: boolean);
+
 function  CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear;
 function  CheckGearDrowning(Gear: PGear): boolean;
 
@@ -43,6 +48,11 @@
     uLocale, uTextures, uRenderUtils, uRandom, SDLh, uDebug, uGears,
     uGearsList;
 
+procedure doMakeExplosion(X, Y, Radius: LongInt; AttackingHog: PHedgehog; Mask: Longword); inline;
+begin
+    doMakeExplosion(X, Y, Radius, AttackingHog, Mask, $FFFFFFFF);
+end;
+
 procedure doMakeExplosion(X, Y, Radius: LongInt; AttackingHog: PHedgehog; Mask: Longword; const Tint: LongWord);
 var Gear: PGear;
     dmg, dmgBase: LongInt;
@@ -491,6 +501,10 @@
 NoGearsToAvoid:= true
 end;
 
+procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt); inline;
+begin
+    FindPlace(Gear, withFall, Left, Right, false);
+end;
 
 procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt; skipProximity: boolean);
 var x: LongInt;