equal
deleted
inserted
replaced
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
17 *) |
17 *) |
18 |
18 |
19 unit uAIActions; |
19 unit uAIActions; |
20 interface |
20 interface |
21 uses uGears; |
21 uses uGears, uFloat; |
22 {$INCLUDE options.inc} |
22 {$INCLUDE options.inc} |
23 const MAXACTIONS = 96; |
23 (*const MAXACTIONS = 96; |
24 aia_none = 0; |
24 aia_none = 0; |
25 aia_Left = 1; |
25 aia_Left = 1; |
26 aia_Right = 2; |
26 aia_Right = 2; |
27 aia_Timer = 3; |
27 aia_Timer = 3; |
28 aia_attack = 4; |
28 aia_attack = 4; |
55 Score: integer; |
55 Score: integer; |
56 end; |
56 end; |
57 |
57 |
58 procedure AddAction(var Actions: TActions; Action, Param, TimeDelta: Longword; const X: integer = 0; Y: integer = 0); |
58 procedure AddAction(var Actions: TActions; Action, Param, TimeDelta: Longword; const X: integer = 0; Y: integer = 0); |
59 procedure ProcessAction(var Actions: TActions; Me: PGear); |
59 procedure ProcessAction(var Actions: TActions; Me: PGear); |
60 |
60 *) |
61 implementation |
61 implementation |
62 uses uMisc, uTeams, uConsts, uConsole, uAIMisc; |
62 (*uses uMisc, uTeams, uConsts, uConsole, uAIMisc; |
63 |
63 |
64 const ActionIdToStr: array[0..6] of string[16] = ( |
64 const ActionIdToStr: array[0..6] of string[16] = ( |
65 {aia_none} '', |
65 {aia_none} '', |
66 {aia_Left} 'left', |
66 {aia_Left} 'left', |
67 {aia_Right} 'right', |
67 {aia_Right} 'right', |
189 inc(Actions.Pos); |
189 inc(Actions.Pos); |
190 if Actions.Pos <= Actions.Count then |
190 if Actions.Pos <= Actions.Count then |
191 inc(Actions.actions[Actions.Pos].Time, GameTicks); |
191 inc(Actions.actions[Actions.Pos].Time, GameTicks); |
192 until false |
192 until false |
193 end; |
193 end; |
194 |
194 *) |
195 end. |
195 end. |