5 dx, dy, ax, ay, aAngle, dAngle, hAngle, lx, ly: real; // laser, change |
5 dx, dy, ax, ay, aAngle, dAngle, hAngle, lx, ly: real; // laser, change |
6 defaultPos, HatVisible: boolean; |
6 defaultPos, HatVisible: boolean; |
7 HH: PHedgehog; |
7 HH: PHedgehog; |
8 CurWeapon: PAmmo; |
8 CurWeapon: PAmmo; |
9 begin |
9 begin |
10 HH:= PHedgehog(Gear^.Hedgehog); |
10 HH:= Gear^.Hedgehog; |
11 if HH^.Unplaced then exit; |
11 if HH^.Unplaced then exit; |
12 m:= 1; |
12 m:= 1; |
13 if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1; |
13 if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1; |
14 sx:= ox + 1; // this offset is very common |
14 sx:= ox + 1; // this offset is very common |
15 sy:= oy - 3; |
15 sy:= oy - 3; |
704 gtHedgehog: DrawHH(Gear, x, y); |
704 gtHedgehog: DrawHH(Gear, x, y); |
705 |
705 |
706 gtShell: DrawRotated(sprBazookaShell, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
706 gtShell: DrawRotated(sprBazookaShell, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
707 |
707 |
708 gtGrave: begin |
708 gtGrave: begin |
709 DrawTextureF(PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32); |
709 DrawTextureF(Gear^.Hedgehog^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32); |
710 if Gear^.Health > 0 then |
710 if Gear^.Health > 0 then |
711 begin |
711 begin |
712 //Tint($33, $33, $FF, max($40, floor($FF * abs(1 - (GameTicks mod (6000 div Gear^.Health)) / 750)))); |
712 //Tint($33, $33, $FF, max($40, floor($FF * abs(1 - (GameTicks mod (6000 div Gear^.Health)) / 750)))); |
713 Tint($f5, $db, $35, max($40, floor($FF * abs(1 - (GameTicks mod 1500) / (750 + Gear^.Health))))); |
713 Tint($f5, $db, $35, max($40, floor($FF * abs(1 - (GameTicks mod 1500) / (750 + Gear^.Health))))); |
714 //Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - (RealTicks mod 1500) / 750)))); |
714 //Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - (RealTicks mod 1500) / 750)))); |
769 end; |
769 end; |
770 gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 0) |
770 gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 0) |
771 else DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 1); |
771 else DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 1); |
772 gtAirBomb: DrawRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
772 gtAirBomb: DrawRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
773 gtTeleport: begin |
773 gtTeleport: begin |
774 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
774 HHGear:= Gear^.Hedgehog^.Gear; |
775 if not PHedgehog(Gear^.Hedgehog)^.Unplaced then DrawRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0); |
775 if not Gear^.Hedgehog^.Unplaced then DrawRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0); |
776 DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0); |
776 DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0); |
777 end; |
777 end; |
778 gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12); |
778 gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12); |
779 gtTarget: begin |
779 gtTarget: begin |
780 Tint($FF, $FF, $FF, floor($FF * Gear^.Timer / 1000)); |
780 Tint($FF, $FF, $FF, floor($FF * Gear^.Timer / 1000)); |