31 procedure CalcRotationDirAngle(Gear: PGear); |
31 procedure CalcRotationDirAngle(Gear: PGear); |
32 procedure ResurrectHedgehog(gear: PGear); |
32 procedure ResurrectHedgehog(gear: PGear); |
33 procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt; skipProximity: boolean = false); |
33 procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt; skipProximity: boolean = false); |
34 function CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; |
34 function CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; |
35 function CheckGearsNear(mX, mY: LongInt; Kind: TGearsType; rX, rY: LongInt): PGear; |
35 function CheckGearsNear(mX, mY: LongInt; Kind: TGearsType; rX, rY: LongInt): PGear; |
|
36 function CheckGearDrowning(Gear: PGear): boolean; |
|
37 |
|
38 var doStepHandlers: array[TGearType] of TGearStepProcedure; |
36 |
39 |
37 |
40 |
38 implementation |
41 implementation |
39 uses uFloat, uSound, uCollisions, uUtils, uConsts, uVisualGears, uAIMisc, |
42 uses uFloat, uSound, uCollisions, uUtils, uConsts, uVisualGears, uAIMisc, |
40 uVariables, uLandGraphics, uScript, uStats, uCaptions, uTeams, uStore, |
43 uVariables, uLandGraphics, uScript, uStats, uCaptions, uTeams, uStore, |
41 uLocale, uTextures, uRenderUtils, uRandom, uGearsList, SDLh, uDebug; |
44 uLocale, uTextures, uRenderUtils, uRandom, SDLh, uDebug, uGears, |
|
45 uGearsList; |
42 |
46 |
43 procedure doMakeExplosion(X, Y, Radius: LongInt; AttackingHog: PHedgehog; Mask: Longword; const Tint: LongWord); |
47 procedure doMakeExplosion(X, Y, Radius: LongInt; AttackingHog: PHedgehog; Mask: Longword; const Tint: LongWord); |
44 var Gear: PGear; |
48 var Gear: PGear; |
45 dmg, dmgRadius, dmgBase: LongInt; |
49 dmg, dmgRadius, dmgBase: LongInt; |
46 fX, fY: hwFloat; |
50 fX, fY: hwFloat; |