20 interface |
20 interface |
21 uses SDLh, uGears, uConsts, uFloat; |
21 uses SDLh, uGears, uConsts, uFloat; |
22 const amtest_OnTurn = $00000001; |
22 const amtest_OnTurn = $00000001; |
23 |
23 |
24 type TAttackParams = record |
24 type TAttackParams = record |
25 Time: Longword; |
25 Time: Longword; |
26 Angle, Power: LongInt; |
26 Angle, Power: LongInt; |
27 ExplX, ExplY, ExplR: LongInt; |
27 ExplX, ExplY, ExplR: LongInt; |
28 AttackPutX, AttackPutY: LongInt; |
28 AttackPutX, AttackPutY: LongInt; |
29 end; |
29 end; |
30 |
30 |
31 function TestBazooka(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
31 function TestBazooka(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
32 function TestGrenade(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
32 function TestGrenade(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
33 function TestMortar(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
33 function TestMortar(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
34 function TestShotgun(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
34 function TestShotgun(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
36 function TestBaseballBat(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
36 function TestBaseballBat(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
37 function TestFirePunch(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
37 function TestFirePunch(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
38 function TestAirAttack(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
38 function TestAirAttack(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
39 |
39 |
40 type TAmmoTestProc = function (Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
40 type TAmmoTestProc = function (Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; |
41 TAmmoTest = record |
41 TAmmoTest = record |
42 proc: TAmmoTestProc; |
42 proc: TAmmoTestProc; |
43 flags: Longword; |
43 flags: Longword; |
44 end; |
44 end; |
45 |
45 |
46 const AmmoTests: array[TAmmoType] of TAmmoTest = |
46 const AmmoTests: array[TAmmoType] of TAmmoTest = |
47 ( |
47 ( |
48 (proc: @TestGrenade; flags: 0), // amGrenade |
48 (proc: @TestGrenade; flags: 0), // amGrenade |
49 (proc: nil; flags: 0), // amClusterBomb |
49 (proc: nil; flags: 0), // amClusterBomb |
50 (proc: @TestBazooka; flags: 0), // amBazooka |
50 (proc: @TestBazooka; flags: 0), // amBazooka |
51 (proc: nil; flags: 0), // amUFO |
51 (proc: nil; flags: 0), // amUFO |
52 (proc: @TestShotgun; flags: 0), // amShotgun |
52 (proc: @TestShotgun; flags: 0), // amShotgun |
53 (proc: nil; flags: 0), // amPickHammer |
53 (proc: nil; flags: 0), // amPickHammer |
54 (proc: nil; flags: 0), // amSkip |
54 (proc: nil; flags: 0), // amSkip |
55 (proc: nil; flags: 0), // amRope |
55 (proc: nil; flags: 0), // amRope |
56 (proc: nil; flags: 0), // amMine |
56 (proc: nil; flags: 0), // amMine |
57 (proc: @TestDesertEagle; flags: 0), // amDEagle |
57 (proc: @TestDesertEagle; flags: 0), // amDEagle |
58 (proc: nil; flags: 0), // amDynamite |
58 (proc: nil; flags: 0), // amDynamite |
59 (proc: @TestFirePunch; flags: 0), // amFirePunch |
59 (proc: @TestFirePunch; flags: 0), // amFirePunch |
60 (proc: nil; flags: 0), // amWhip |
60 (proc: nil; flags: 0), // amWhip |
61 (proc: @TestBaseballBat; flags: 0), // amBaseballBat |
61 (proc: @TestBaseballBat; flags: 0), // amBaseballBat |
62 (proc: nil; flags: 0), // amParachute |
62 (proc: nil; flags: 0), // amParachute |
63 (proc: @TestAirAttack; flags: amtest_OnTurn), // amAirAttack |
63 (proc: @TestAirAttack; flags: amtest_OnTurn), // amAirAttack |
64 (proc: nil; flags: 0), // amMineStrike |
64 (proc: nil; flags: 0), // amMineStrike |
65 (proc: nil; flags: 0), // amBlowTorch |
65 (proc: nil; flags: 0), // amBlowTorch |
66 (proc: nil; flags: 0), // amGirder |
66 (proc: nil; flags: 0), // amGirder |
67 (proc: nil; flags: amtest_OnTurn), // amTeleport |
67 (proc: nil; flags: amtest_OnTurn), // amTeleport |
68 (proc: nil; flags: 0), // amSwitch |
68 (proc: nil; flags: 0), // amSwitch |
69 (proc: @TestMortar; flags: 0), // amMortar |
69 (proc: @TestMortar; flags: 0), // amMortar |
70 (proc: nil; flags: 0), // amKamikaze |
70 (proc: nil; flags: 0), // amKamikaze |
71 (proc: nil; flags: 0), // amCake |
71 (proc: nil; flags: 0), // amCake |
72 (proc: nil; flags: 0), // amSeduction |
72 (proc: nil; flags: 0), // amSeduction |
73 (proc: nil; flags: 0), // amBanana |
73 (proc: nil; flags: 0), // amBanana |
74 (proc: nil; flags: 0) // amHellishBomb |
74 (proc: nil; flags: 0), // amHellishBomb |
75 ); |
75 (proc: nil; flags: 0) // amNapalm |
|
76 ); |
76 |
77 |
77 const BadTurn = Low(LongInt) div 4; |
78 const BadTurn = Low(LongInt) div 4; |
78 |
79 |
79 implementation |
80 implementation |
80 uses uMisc, uAIMisc, uLand; |
81 uses uMisc, uAIMisc, uLand; |