hedgewars/uGears.pas
changeset 3730 aecea9aa53dc
parent 3720 b2b108a6fae8
child 3734 304a83637eb4
equal deleted inserted replaced
3729:c379a802302c 3730:aecea9aa53dc
    79     StepSoundChannel: LongInt;
    79     StepSoundChannel: LongInt;
    80 
    80 
    81 procedure initModule;
    81 procedure initModule;
    82 procedure freeModule;
    82 procedure freeModule;
    83 function  AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear;
    83 function  AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear;
       
    84 procedure SpawnHealthCrate(x, y: LongInt);
    84 procedure ProcessGears;
    85 procedure ProcessGears;
    85 procedure EndTurnCleanup;
    86 procedure EndTurnCleanup;
    86 procedure ApplyDamage(Gear: PGear; Damage: Longword; Source: TDamageSource);
    87 procedure ApplyDamage(Gear: PGear; Damage: Longword; Source: TDamageSource);
    87 procedure SetAllToActive;
    88 procedure SetAllToActive;
    88 procedure SetAllHHToActive;
    89 procedure SetAllHHToActive;
  1536     t:= t^.NextGear
  1537     t:= t^.NextGear
  1537     end;
  1538     end;
  1538 CountGears:= count;
  1539 CountGears:= count;
  1539 end;
  1540 end;
  1540 
  1541 
       
  1542 procedure SpawnHealthCrate(x, y: LongInt);
       
  1543 begin
       
  1544     FollowGear:= AddGear(x, y, gtCase, 0, _0, _0, 0);
       
  1545     FollowGear^.Health:= 25;
       
  1546     FollowGear^.Pos:= posCaseHealth;
       
  1547     AddCaption(GetEventString(eidNewHealthPack), cWhiteColor, capgrpAmmoInfo);
       
  1548 end;
       
  1549 
  1541 procedure SpawnBoxOfSmth;
  1550 procedure SpawnBoxOfSmth;
  1542 var t, aTot, uTot, a, h: LongInt;
  1551 var t, aTot, uTot, a, h: LongInt;
  1543     i: TAmmoType;
  1552     i: TAmmoType;
  1544 begin
  1553 begin
  1545 if (PlacingHogs) or
  1554 if (PlacingHogs) or