equal
deleted
inserted
replaced
455 end; |
455 end; |
456 |
456 |
457 procedure doStepPickHammer(Gear: PGear); |
457 procedure doStepPickHammer(Gear: PGear); |
458 var i, y: LongInt; |
458 var i, y: LongInt; |
459 ar: TRangeArray; |
459 ar: TRangeArray; |
|
460 HHGear: PGear; |
460 begin |
461 begin |
461 i:= 0; |
462 i:= 0; |
|
463 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
|
464 |
462 y:= hwRound(Gear^.Y) - cHHRadius * 2; |
465 y:= hwRound(Gear^.Y) - cHHRadius * 2; |
463 while y < hwRound(Gear^.Y) do |
466 while y < hwRound(Gear^.Y) do |
464 begin |
467 begin |
465 ar[i].Left := hwRound(Gear^.X) - Gear^.Radius - LongInt(GetRandom(2)); |
468 ar[i].Left := hwRound(Gear^.X) - Gear^.Radius - LongInt(GetRandom(2)); |
466 ar[i].Right:= hwRound(Gear^.X) + Gear^.Radius + LongInt(GetRandom(2)); |
469 ar[i].Right:= hwRound(Gear^.X) + Gear^.Radius + LongInt(GetRandom(2)); |
467 inc(y, 2); |
470 inc(y, 2); |
468 inc(i) |
471 inc(i) |
469 end; |
472 end; |
|
473 |
470 DrawHLinesExplosions(@ar, 3, hwRound(Gear^.Y) - cHHRadius * 2, 2, Pred(i)); |
474 DrawHLinesExplosions(@ar, 3, hwRound(Gear^.Y) - cHHRadius * 2, 2, Pred(i)); |
471 Gear^.dY:= PHedgehog(Gear^.Hedgehog)^.Gear^.dY; |
475 Gear^.dY:= HHGear^.dY; |
|
476 DeleteCI(HHGear); |
|
477 |
472 PlaySound(sndPickhammer, true); |
478 PlaySound(sndPickhammer, true); |
473 doStepPickHammerWork(Gear); |
479 doStepPickHammerWork(Gear); |
474 Gear^.doStep:= @doStepPickHammerWork |
480 Gear^.doStep:= @doStepPickHammerWork |
475 end; |
481 end; |
476 |
482 |
834 begin |
840 begin |
835 if (Gear^.Message and gm_Destroy) > 0 then |
841 if (Gear^.Message and gm_Destroy) > 0 then |
836 begin |
842 begin |
837 DeleteGear(Gear); |
843 DeleteGear(Gear); |
838 FreeActionsList; |
844 FreeActionsList; |
|
845 SetAllHHToActive; // someone could be on top of the case |
839 with CurrentHedgehog^ do |
846 with CurrentHedgehog^ do |
840 if Gear <> nil then Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump); |
847 if Gear <> nil then Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump); |
841 exit |
848 exit |
842 end; |
849 end; |
843 |
850 |