changeset 32 | 78bff13b11c0 |
parent 17 | a6bed8d31444 |
child 39 | b78e7185ed13 |
31:99888245a4e8 | 32:78bff13b11c0 |
---|---|
42 procedure DrawConsole(Surface: PSDL_Surface); |
42 procedure DrawConsole(Surface: PSDL_Surface); |
43 procedure WriteToConsole(s: shortstring); |
43 procedure WriteToConsole(s: shortstring); |
44 procedure WriteLnToConsole(s: shortstring); |
44 procedure WriteLnToConsole(s: shortstring); |
45 procedure KeyPressConsole(Key: Longword); |
45 procedure KeyPressConsole(Key: Longword); |
46 procedure ParseCommand(CmdStr: shortstring); |
46 procedure ParseCommand(CmdStr: shortstring); |
47 procedure AfterAttack; // экспортируется только для вызова из CurrAmmoGear |
|
48 |
47 |
49 implementation |
48 implementation |
50 {$J+} |
49 {$J+} |
51 uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uSound, uWorld, uLand; |
50 uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uSound, uWorld, uLand; |
52 const cLineWidth: integer = 0; |
51 const cLineWidth: integer = 0; |
232 else InputStr:= InputStr + char(Key) |
231 else InputStr:= InputStr + char(Key) |
233 end |
232 end |
234 end; |
233 end; |
235 |
234 |
236 {$INCLUDE CCHandlers.inc} |
235 {$INCLUDE CCHandlers.inc} |
237 |
|
238 procedure AfterAttack; |
|
239 begin |
|
240 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^, |
|
241 CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog] do |
|
242 begin |
|
243 Inc(AttacksNum); |
|
244 State:= State and not gstAttacking; |
|
245 if Ammo[CurSlot, CurAmmo].NumPerTurn >= AttacksNum then isInMultiShoot:= true |
|
246 else begin |
|
247 TurnTimeLeft:= Ammoz[Ammo[CurSlot, CurAmmo].AmmoType].TimeAfterTurn; |
|
248 State:= State or gstAttacked; |
|
249 OnUsedAmmo(Ammo) |
|
250 end; |
|
251 AttackBar:= 0 |
|
252 end |
|
253 end; |
|
254 |
236 |
255 initialization |
237 initialization |
256 InitConsole; |
238 InitConsole; |
257 RegisterVariable('quit' , vtCommand, @chQuit ); |
239 RegisterVariable('quit' , vtCommand, @chQuit ); |
258 RegisterVariable('capture' , vtCommand, @chCapture ); |
240 RegisterVariable('capture' , vtCommand, @chCapture ); |