168 begin |
168 begin |
169 AllInactive := false; |
169 AllInactive := false; |
170 Gear^.Y := Gear^.Y + cDrownSpeed; |
170 Gear^.Y := Gear^.Y + cDrownSpeed; |
171 Gear^.X := Gear^.X + Gear^.dX * cDrownSpeed; |
171 Gear^.X := Gear^.X + Gear^.dX * cDrownSpeed; |
172 // Create some bubbles (0.5% might be better but causes too few bubbles sometimes) |
172 // Create some bubbles (0.5% might be better but causes too few bubbles sometimes) |
173 if ((not SuddenDeathDmg and (cWaterOpacity < $FF)) |
173 if ((not SuddenDeathDmg and (WaterOpacity < $FF)) |
174 or (SuddenDeathDmg and (cSDWaterOpacity < $FF))) and ((GameTicks and $1F) = 0) then |
174 or (SuddenDeathDmg and (SDWaterOpacity < $FF))) and ((GameTicks and $1F) = 0) then |
175 if (Gear^.Kind = gtHedgehog) and (Random(4) = 0) then |
175 if (Gear^.Kind = gtHedgehog) and (Random(4) = 0) then |
176 AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble) |
176 AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble) |
177 else if Random(12) = 0 then |
177 else if Random(12) = 0 then |
178 AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble); |
178 AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble); |
179 if (not SuddenDeathDmg and (cWaterOpacity > $FE)) |
179 if (not SuddenDeathDmg and (WaterOpacity > $FE)) |
180 or (SuddenDeathDmg and (cSDWaterOpacity > $FE)) |
180 or (SuddenDeathDmg and (SDWaterOpacity > $FE)) |
181 or (hwRound(Gear^.Y) > Gear^.Radius + cWaterLine + cVisibleWater) then |
181 or (hwRound(Gear^.Y) > Gear^.Radius + cWaterLine + cVisibleWater) then |
182 DeleteGear(Gear); |
182 DeleteGear(Gear); |
183 end; |
183 end; |
184 |
184 |
185 //////////////////////////////////////////////////////////////////////////////// |
185 //////////////////////////////////////////////////////////////////////////////// |
688 Land[ly, lx]:= lfDamaged or lfObject |
688 Land[ly, lx]:= lfDamaged or lfObject |
689 else Land[ly, lx]:= lfDamaged or lfBasic |
689 else Land[ly, lx]:= lfDamaged or lfBasic |
690 end |
690 end |
691 else Land[ly, lx]:= lf; |
691 else Land[ly, lx]:= lf; |
692 if gun then |
692 if gun then |
693 LandPixels[ry, rx]:= (cExplosionBorderColor and (not AMask)) or (p^[px] and AMask) |
693 LandPixels[ry, rx]:= (ExplosionBorderColor and (not AMask)) or (p^[px] and AMask) |
694 else LandPixels[ry, rx]:= addBgColor(LandPixels[ry, rx], p^[px]); |
694 else LandPixels[ry, rx]:= addBgColor(LandPixels[ry, rx], p^[px]); |
695 end |
695 end |
696 else allpx:= false |
696 else allpx:= false |
697 end; |
697 end; |
698 p:= @(p^[s^.pitch shr 2]) |
698 p:= @(p^[s^.pitch shr 2]) |
1030 begin |
1030 begin |
1031 DrawTunnel(oX, oY, Gear^.dX, Gear^.dY, 82 - i, 1); |
1031 DrawTunnel(oX, oY, Gear^.dX, Gear^.dY, 82 - i, 1); |
1032 dec(Gear^.Health, Gear^.Damage); |
1032 dec(Gear^.Health, Gear^.Damage); |
1033 Gear^.Damage := 0 |
1033 Gear^.Damage := 0 |
1034 end; |
1034 end; |
1035 if ((Gear^.State and gstDrowning) <> 0) and (Gear^.Damage < Gear^.Health) and ((not SuddenDeathDmg and (cWaterOpacity < $FF)) or (SuddenDeathDmg and (cSDWaterOpacity < $FF))) then |
1035 if ((Gear^.State and gstDrowning) <> 0) and (Gear^.Damage < Gear^.Health) and ((not SuddenDeathDmg and (WaterOpacity < $FF)) or (SuddenDeathDmg and (SDWaterOpacity < $FF))) then |
1036 begin |
1036 begin |
1037 for i:=(Gear^.Health - Gear^.Damage) * 4 downto 0 do |
1037 for i:=(Gear^.Health - Gear^.Damage) * 4 downto 0 do |
1038 begin |
1038 begin |
1039 if Random(6) = 0 then |
1039 if Random(6) = 0 then |
1040 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBubble); |
1040 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBubble); |
2813 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace) |
2813 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace) |
2814 end; |
2814 end; |
2815 |
2815 |
2816 //////////////////////////////////////////////////////////////////////////////// |
2816 //////////////////////////////////////////////////////////////////////////////// |
2817 procedure doStepKamikazeWork(Gear: PGear); |
2817 procedure doStepKamikazeWork(Gear: PGear); |
2818 |
|
2819 const upd: Longword = 0; |
|
2820 var |
2818 var |
2821 i: LongWord; |
2819 i: LongWord; |
2822 HHGear: PGear; |
2820 HHGear: PGear; |
2823 sparkles: PVisualGear; |
2821 sparkles: PVisualGear; |
2824 hasWishes: boolean; |
2822 hasWishes: boolean; |