345 if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind <> gtTardis) then |
345 if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind <> gtTardis) then |
346 begin |
346 begin |
347 case CurAmmoGear^.Kind of |
347 case CurAmmoGear^.Kind of |
348 gtShotgunShot: begin |
348 gtShotgunShot: begin |
349 if (CurAmmoGear^.State and gstAnimation <> 0) then |
349 if (CurAmmoGear^.State and gstAnimation <> 0) then |
350 DrawRotated(sprShotgun, hx, hy, sign, aangle) |
350 DrawSpriteRotated(sprShotgun, hx, hy, sign, aangle) |
351 else |
351 else |
352 DrawRotated(sprHandShotgun, hx, hy, sign, aangle); |
352 DrawSpriteRotated(sprHandShotgun, hx, hy, sign, aangle); |
353 end; |
353 end; |
354 gtDEagleShot: DrawRotated(sprDEagle, hx, hy, sign, aangle); |
354 gtDEagleShot: DrawSpriteRotated(sprDEagle, hx, hy, sign, aangle); |
355 gtSniperRifleShot: begin |
355 gtSniperRifleShot: begin |
356 if (CurAmmoGear^.State and gstAnimation <> 0) then |
356 if (CurAmmoGear^.State and gstAnimation <> 0) then |
357 DrawRotatedF(sprSniperRifle, hx, hy, 1, sign, aangle) |
357 DrawSpriteRotatedF(sprSniperRifle, hx, hy, 1, sign, aangle) |
358 else |
358 else |
359 DrawRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle) |
359 DrawSpriteRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle) |
360 end; |
360 end; |
361 gtBallgun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle); |
361 gtBallgun: DrawSpriteRotated(sprHandBallgun, hx, hy, sign, aangle); |
362 gtRCPlane: begin |
362 gtRCPlane: begin |
363 DrawRotated(sprHandPlane, hx, hy, sign, 0); |
363 DrawSpriteRotated(sprHandPlane, hx, hy, sign, 0); |
364 defaultPos:= false |
364 defaultPos:= false |
365 end; |
365 end; |
366 gtRope: begin |
366 gtRope: begin |
367 if Gear^.X < CurAmmoGear^.X then |
367 if Gear^.X < CurAmmoGear^.X then |
368 begin |
368 begin |
384 0, |
384 0, |
385 DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle); |
385 DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle); |
386 with HH^ do |
386 with HH^ do |
387 if (HatTex <> nil) then |
387 if (HatTex <> nil) then |
388 begin |
388 begin |
389 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32, |
389 DrawTextureRotatedF(HatTex, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32, |
390 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
390 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
391 if HatTex^.w > 64 then |
391 if HatTex^.w > 64 then |
392 begin |
392 begin |
393 Tint(HH^.Team^.Clan^.Color shl 8 or $FF); |
393 Tint(HH^.Team^.Clan^.Color shl 8 or $FF); |
394 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32, |
394 DrawTextureRotatedF(HatTex, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32, |
395 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
395 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
396 Tint($FF, $FF, $FF, $FF) |
396 Tint($FF, $FF, $FF, $FF) |
397 end |
397 end |
398 end |
398 end |
399 end; |
399 end; |
400 DrawAltWeapon(Gear, ox, oy); |
400 DrawAltWeapon(Gear, ox, oy); |
401 defaultPos:= false |
401 defaultPos:= false |
402 end; |
402 end; |
403 gtBlowTorch: |
403 gtBlowTorch: |
404 begin |
404 begin |
405 DrawRotated(sprBlowTorch, hx, hy, sign, aangle); |
405 DrawSpriteRotated(sprBlowTorch, hx, hy, sign, aangle); |
406 DrawHedgehog(sx, sy, |
406 DrawHedgehog(sx, sy, |
407 sign, |
407 sign, |
408 3, |
408 3, |
409 HH^.visStepPos div 2, |
409 HH^.visStepPos div 2, |
410 0); |
410 0); |
592 dec(HH^.Timer) |
592 dec(HH^.Timer) |
593 end; |
593 end; |
594 amt:= CurrentHedgehog^.CurAmmoType; |
594 amt:= CurrentHedgehog^.CurAmmoType; |
595 CurWeapon:= GetCurAmmoEntry(HH^); |
595 CurWeapon:= GetCurAmmoEntry(HH^); |
596 case amt of |
596 case amt of |
597 amBazooka: DrawRotated(sprHandBazooka, hx, hy, sign, aangle); |
597 amBazooka: DrawSpriteRotated(sprHandBazooka, hx, hy, sign, aangle); |
598 amSnowball: DrawRotated(sprHandSnowball, hx, hy, sign, aangle); |
598 amSnowball: DrawSpriteRotated(sprHandSnowball, hx, hy, sign, aangle); |
599 amMortar: DrawRotated(sprHandMortar, hx, hy, sign, aangle); |
599 amMortar: DrawSpriteRotated(sprHandMortar, hx, hy, sign, aangle); |
600 amMolotov: DrawRotated(sprHandMolotov, hx, hy, sign, aangle); |
600 amMolotov: DrawSpriteRotated(sprHandMolotov, hx, hy, sign, aangle); |
601 amBallgun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle); |
601 amBallgun: DrawSpriteRotated(sprHandBallgun, hx, hy, sign, aangle); |
602 amDrill: DrawRotated(sprHandDrill, hx, hy, sign, aangle); |
602 amDrill: DrawSpriteRotated(sprHandDrill, hx, hy, sign, aangle); |
603 amRope: DrawRotated(sprHandRope, hx, hy, sign, aangle); |
603 amRope: DrawSpriteRotated(sprHandRope, hx, hy, sign, aangle); |
604 amShotgun: DrawRotated(sprHandShotgun, hx, hy, sign, aangle); |
604 amShotgun: DrawSpriteRotated(sprHandShotgun, hx, hy, sign, aangle); |
605 amDEagle: DrawRotated(sprHandDEagle, hx, hy, sign, aangle); |
605 amDEagle: DrawSpriteRotated(sprHandDEagle, hx, hy, sign, aangle); |
606 amSineGun: DrawRotatedF(sprHandSinegun, hx, hy, 73 + (sign * LongInt(RealTicks div 73)) mod 8, sign, aangle); |
606 amSineGun: DrawSpriteRotatedF(sprHandSinegun, hx, hy, 73 + (sign * LongInt(RealTicks div 73)) mod 8, sign, aangle); |
607 |
607 |
608 amPortalGun: |
608 amPortalGun: |
609 if (CurWeapon^.Timer and 2) <> 0 then // Add a new Hedgehog value instead of abusing timer? |
609 if (CurWeapon^.Timer and 2) <> 0 then // Add a new Hedgehog value instead of abusing timer? |
610 DrawRotatedF(sprPortalGun, hx, hy, 0, sign, aangle) |
610 DrawSpriteRotatedF(sprPortalGun, hx, hy, 0, sign, aangle) |
611 else |
611 else |
612 DrawRotatedF(sprPortalGun, hx, hy, 1+CurWeapon^.Pos, sign, aangle); |
612 DrawSpriteRotatedF(sprPortalGun, hx, hy, 1+CurWeapon^.Pos, sign, aangle); |
613 |
613 |
614 amSniperRifle: DrawRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle); |
614 amSniperRifle: DrawSpriteRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle); |
615 amBlowTorch: DrawRotated(sprHandBlowTorch, hx, hy, sign, aangle); |
615 amBlowTorch: DrawSpriteRotated(sprHandBlowTorch, hx, hy, sign, aangle); |
616 amCake: DrawRotated(sprHandCake, hx, hy, sign, aangle); |
616 amCake: DrawSpriteRotated(sprHandCake, hx, hy, sign, aangle); |
617 amGrenade: DrawRotated(sprHandGrenade, hx, hy, sign, aangle); |
617 amGrenade: DrawSpriteRotated(sprHandGrenade, hx, hy, sign, aangle); |
618 amWatermelon: DrawRotated(sprHandMelon, hx, hy, sign, aangle); |
618 amWatermelon: DrawSpriteRotated(sprHandMelon, hx, hy, sign, aangle); |
619 amSkip: DrawRotated(sprHandSkip, hx, hy, sign, aangle); |
619 amSkip: DrawSpriteRotated(sprHandSkip, hx, hy, sign, aangle); |
620 amClusterBomb: DrawRotated(sprHandCluster, hx, hy, sign, aangle); |
620 amClusterBomb: DrawSpriteRotated(sprHandCluster, hx, hy, sign, aangle); |
621 amDynamite: DrawRotated(sprHandDynamite, hx, hy, sign, aangle); |
621 amDynamite: DrawSpriteRotated(sprHandDynamite, hx, hy, sign, aangle); |
622 amHellishBomb: DrawRotated(sprHandHellish, hx, hy, sign, aangle); |
622 amHellishBomb: DrawSpriteRotated(sprHandHellish, hx, hy, sign, aangle); |
623 amGasBomb: DrawRotated(sprHandCheese, hx, hy, sign, aangle); |
623 amGasBomb: DrawSpriteRotated(sprHandCheese, hx, hy, sign, aangle); |
624 amMine: DrawRotated(sprHandMine, hx, hy, sign, aangle); |
624 amMine: DrawSpriteRotated(sprHandMine, hx, hy, sign, aangle); |
625 amSMine: DrawRotated(sprHandSMine, hx, hy, sign, aangle); |
625 amSMine: DrawSpriteRotated(sprHandSMine, hx, hy, sign, aangle); |
626 amSeduction: begin |
626 amSeduction: begin |
627 DrawRotated(sprHandSeduction, hx, hy, sign, aangle); |
627 DrawSpriteRotated(sprHandSeduction, hx, hy, sign, aangle); |
628 DrawCircle(ox, oy, 248, 4, $FF, $00, $00, $AA); |
628 DrawCircle(ox, oy, 248, 4, $FF, $00, $00, $AA); |
629 //Tint($FF, $0, $0, $AA); |
629 //Tint($FF, $0, $0, $AA); |
630 //DrawTexture(ox - 240, oy - 240, SpritesData[sprVampiric].Texture, 10); |
630 //DrawTexture(ox - 240, oy - 240, SpritesData[sprVampiric].Texture, 10); |
631 //Tint($FF, $FF, $FF, $FF); |
631 //Tint($FF, $FF, $FF, $FF); |
632 end; |
632 end; |
633 amVampiric: DrawRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
633 amVampiric: DrawSpriteRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
634 amRCPlane: begin |
634 amRCPlane: begin |
635 DrawRotated(sprHandPlane, hx, hy, sign, 0); |
635 DrawSpriteRotated(sprHandPlane, hx, hy, sign, 0); |
636 defaultPos:= false |
636 defaultPos:= false |
637 end; |
637 end; |
638 amGirder: begin |
638 amGirder: begin |
639 DrawRotated(sprHandConstruction, hx, hy, sign, aangle); |
639 DrawSpriteRotated(sprHandConstruction, hx, hy, sign, aangle); |
640 DrawSpriteClipped(sprGirder, |
640 DrawSpriteClipped(sprGirder, |
641 ox-256, |
641 ox-256, |
642 oy-256, |
642 oy-256, |
643 LongInt(topY)+WorldDy, |
643 LongInt(topY)+WorldDy, |
644 LongInt(rightX)+WorldDx, |
644 LongInt(rightX)+WorldDx, |
645 cWaterLine+WorldDy, |
645 cWaterLine+WorldDy, |
646 LongInt(leftX)+WorldDx) |
646 LongInt(leftX)+WorldDx) |
647 end; |
647 end; |
648 amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
648 amBee: DrawSpriteRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
649 amFlamethrower: DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
649 amFlamethrower: DrawSpriteRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, sign, aangle); |
650 amLandGun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle); |
650 amLandGun: DrawSpriteRotated(sprHandBallgun, hx, hy, sign, aangle); |
651 amResurrector: DrawCircle(ox, oy, 98, 4, $F5, $DB, $35, $AA); // I'd rather not like to hardcode 100 here |
651 amResurrector: DrawCircle(ox, oy, 98, 4, $F5, $DB, $35, $AA); // I'd rather not like to hardcode 100 here |
652 end; |
652 end; |
653 |
653 |
654 case amt of |
654 case amt of |
655 amAirAttack, |
655 amAirAttack, |
656 amMineStrike, |
656 amMineStrike, |
657 amDrillStrike: DrawRotated(sprHandAirAttack, sx, oy, sign, 0); |
657 amDrillStrike: DrawSpriteRotated(sprHandAirAttack, sx, oy, sign, 0); |
658 amPickHammer: DrawHedgehog(sx, sy, |
658 amPickHammer: DrawHedgehog(sx, sy, |
659 sign, |
659 sign, |
660 1, |
660 1, |
661 2, |
661 2, |
662 0); |
662 0); |
663 amTeleport: DrawRotatedF(sprTeleport, sx, sy, 0, sign, 0); |
663 amTeleport: DrawSpriteRotatedF(sprTeleport, sx, sy, 0, sign, 0); |
664 amKamikaze: DrawHedgehog(sx, sy, |
664 amKamikaze: DrawHedgehog(sx, sy, |
665 sign, |
665 sign, |
666 1, |
666 1, |
667 5, |
667 5, |
668 0); |
668 0); |
669 amWhip: DrawRotatedF(sprWhip, |
669 amWhip: DrawSpriteRotatedF(sprWhip, |
670 sx, |
670 sx, |
671 sy, |
671 sy, |
672 0, |
672 0, |
673 sign, |
673 sign, |
674 0); |
674 0); |
675 amHammer: DrawRotatedF(sprHammer, |
675 amHammer: DrawSpriteRotatedF(sprHammer, |
676 sx, |
676 sx, |
677 sy, |
677 sy, |
678 0, |
678 0, |
679 sign, |
679 sign, |
680 0); |
680 0); |
845 if (cTagsMask and htTransparent) <> 0 then |
845 if (cTagsMask and htTransparent) <> 0 then |
846 Tint($FF, $FF, $FF, $80); |
846 Tint($FF, $FF, $FF, $80); |
847 if ((cTagsMask and htHealth) <> 0) then |
847 if ((cTagsMask and htHealth) <> 0) then |
848 begin |
848 begin |
849 dec(t, HealthTagTex^.h + 2); |
849 dec(t, HealthTagTex^.h + 2); |
850 DrawCentered(ox, t, HealthTagTex) |
850 DrawTextureCentered(ox, t, HealthTagTex) |
851 end; |
851 end; |
852 if (cTagsMask and htName) <> 0 then |
852 if (cTagsMask and htName) <> 0 then |
853 begin |
853 begin |
854 dec(t, NameTagTex^.h + 2); |
854 dec(t, NameTagTex^.h + 2); |
855 DrawCentered(ox, t, NameTagTex) |
855 DrawTextureCentered(ox, t, NameTagTex) |
856 end; |
856 end; |
857 if (cTagsMask and htTeamName) <> 0 then |
857 if (cTagsMask and htTeamName) <> 0 then |
858 begin |
858 begin |
859 dec(t, Team^.NameTagTex^.h + 2); |
859 dec(t, Team^.NameTagTex^.h + 2); |
860 DrawCentered(ox, t, Team^.NameTagTex) |
860 DrawTextureCentered(ox, t, Team^.NameTagTex) |
861 end; |
861 end; |
862 if (cTagsMask and htTransparent) <> 0 then |
862 if (cTagsMask and htTransparent) <> 0 then |
863 Tint($FF, $FF, $FF, $FF) |
863 Tint($FF, $FF, $FF, $FF) |
864 end; |
864 end; |
865 if (Gear^.State and gstHHDriven) <> 0 then // Current hedgehog |
865 if (Gear^.State and gstHHDriven) <> 0 then // Current hedgehog |
866 begin |
866 begin |
867 if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtResurrector) then |
867 if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtResurrector) then |
868 DrawCentered(ox, sy - cHHRadius - 7 - HealthTagTex^.h, HealthTagTex); |
868 DrawTextureCentered(ox, sy - cHHRadius - 7 - HealthTagTex^.h, HealthTagTex); |
869 |
869 |
870 if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then |
870 if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then |
871 DrawSprite(sprFinger, ox - 16, oy - 64, |
871 DrawSprite(sprFinger, ox - 16, oy - 64, |
872 GameTicks div 32 mod 16); |
872 GameTicks div 32 mod 16); |
873 |
873 |
911 aAngle: real; |
911 aAngle: real; |
912 startX, endX, startY, endY: LongInt; |
912 startX, endX, startY, endY: LongInt; |
913 begin |
913 begin |
914 if Gear^.Target.X <> NoPointX then |
914 if Gear^.Target.X <> NoPointX then |
915 if Gear^.AmmoType = amBee then |
915 if Gear^.AmmoType = amBee then |
916 DrawRotatedF(sprTargetBee, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360) |
916 DrawSpriteRotatedF(sprTargetBee, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360) |
917 else |
917 else |
918 DrawRotatedF(sprTargetP, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360); |
918 DrawSpriteRotatedF(sprTargetP, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360); |
919 |
919 |
920 case Gear^.Kind of |
920 case Gear^.Kind of |
921 gtGrenade: DrawRotated(sprBomb, x, y, 0, Gear^.DirAngle); |
921 gtGrenade: DrawSpriteRotated(sprBomb, x, y, 0, Gear^.DirAngle); |
922 gtSnowball: DrawRotated(sprSnowball, x, y, 0, Gear^.DirAngle); |
922 gtSnowball: DrawSpriteRotated(sprSnowball, x, y, 0, Gear^.DirAngle); |
923 gtGasBomb: DrawRotated(sprCheese, x, y, 0, Gear^.DirAngle); |
923 gtGasBomb: DrawSpriteRotated(sprCheese, x, y, 0, Gear^.DirAngle); |
924 |
924 |
925 gtMolotov: if (Gear^.State and gstDrowning) = 0 then |
925 gtMolotov: if (Gear^.State and gstDrowning) = 0 then |
926 DrawRotatedF(sprMolotov, x, y, (RealTicks div 125) mod 8, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX)) |
926 DrawSpriteRotatedF(sprMolotov, x, y, (RealTicks div 125) mod 8, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX)) |
927 else DrawSprite(sprMolotov, x, y, 8); |
927 else DrawSprite(sprMolotov, x, y, 8); |
928 |
928 |
929 gtRCPlane: begin |
929 gtRCPlane: begin |
930 aangle:= Gear^.Angle * 360 / 4096; |
930 aangle:= Gear^.Angle * 360 / 4096; |
931 if Gear^.Tag < 0 then aangle:= 360-aangle; |
931 if Gear^.Tag < 0 then aangle:= 360-aangle; |
932 Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF); |
932 Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF); |
933 DrawRotatedF(sprPlane, x, y, 0, Gear^.Tag, aangle - 90); |
933 DrawSpriteRotatedF(sprPlane, x, y, 0, Gear^.Tag, aangle - 90); |
934 Tint($FF, $FF, $FF, $FF); |
934 Tint($FF, $FF, $FF, $FF); |
935 DrawRotatedF(sprPlane, x, y, 1, Gear^.Tag, aangle - 90) |
935 DrawSpriteRotatedF(sprPlane, x, y, 1, Gear^.Tag, aangle - 90) |
936 end; |
936 end; |
937 gtBall: DrawRotatedf(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle); |
937 gtBall: DrawSpriteRotatedF(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle); |
938 |
938 |
939 gtPortal: if ((Gear^.Tag and 1) = 0) // still moving? |
939 gtPortal: if ((Gear^.Tag and 1) = 0) // still moving? |
940 or (Gear^.IntersectGear = nil) or (Gear^.IntersectGear^.IntersectGear <> Gear) // not linked&backlinked? |
940 or (Gear^.IntersectGear = nil) or (Gear^.IntersectGear^.IntersectGear <> Gear) // not linked&backlinked? |
941 or ((Gear^.IntersectGear^.Tag and 1) = 0) then // linked portal still moving? |
941 or ((Gear^.IntersectGear^.Tag and 1) = 0) then // linked portal still moving? |
942 DrawRotatedf(sprPortal, x, y, Gear^.Tag, hwSign(Gear^.dX), Gear^.DirAngle) |
942 DrawSpriteRotatedF(sprPortal, x, y, Gear^.Tag, hwSign(Gear^.dX), Gear^.DirAngle) |
943 else DrawRotatedf(sprPortal, x, y, 4 + Gear^.Tag div 2, hwSign(Gear^.dX), Gear^.DirAngle); |
943 else DrawSpriteRotatedF(sprPortal, x, y, 4 + Gear^.Tag div 2, hwSign(Gear^.dX), Gear^.DirAngle); |
944 |
944 |
945 gtDrill: if (Gear^.State and gsttmpFlag) <> 0 then |
945 gtDrill: if (Gear^.State and gsttmpFlag) <> 0 then |
946 DrawRotated(sprAirDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)) |
946 DrawSpriteRotated(sprAirDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)) |
947 else |
947 else |
948 DrawRotated(sprDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
948 DrawSpriteRotated(sprDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
949 |
949 |
950 gtHedgehog: DrawHH(Gear, x, y); |
950 gtHedgehog: DrawHH(Gear, x, y); |
951 |
951 |
952 gtShell: DrawRotated(sprBazookaShell, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
952 gtShell: DrawSpriteRotated(sprBazookaShell, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
953 |
953 |
954 gtGrave: begin |
954 gtGrave: begin |
955 DrawTextureF(Gear^.Hedgehog^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32); |
955 DrawTextureF(Gear^.Hedgehog^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32); |
956 if Gear^.Health > 0 then |
956 if Gear^.Health > 0 then |
957 begin |
957 begin |
960 //Tint($FF, $FF, $FF, max($40, round($FF * abs(1 - (RealTicks mod 1500) / 750)))); |
960 //Tint($FF, $FF, $FF, max($40, round($FF * abs(1 - (RealTicks mod 1500) / 750)))); |
961 DrawSprite(sprVampiric, x - 24, y - 24, 0); |
961 DrawSprite(sprVampiric, x - 24, y - 24, 0); |
962 Tint($FF, $FF, $FF, $FF) |
962 Tint($FF, $FF, $FF, $FF) |
963 end |
963 end |
964 end; |
964 end; |
965 gtBee: DrawRotatedF(sprBee, x, y, (GameTicks shr 5) mod 2, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
965 gtBee: DrawSpriteRotatedF(sprBee, x, y, (GameTicks shr 5) mod 2, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
966 gtPickHammer: DrawSprite(sprPHammer, x - 16, y - 50 + LongInt(((GameTicks shr 5) and 1) * 2), 0); |
966 gtPickHammer: DrawSprite(sprPHammer, x - 16, y - 50 + LongInt(((GameTicks shr 5) and 1) * 2), 0); |
967 gtRope: DrawRope(Gear); |
967 gtRope: DrawRope(Gear); |
968 |
968 |
969 gtMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then |
969 gtMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then |
970 DrawRotated(sprMineOff, x, y, 0, Gear^.DirAngle) |
970 DrawSpriteRotated(sprMineOff, x, y, 0, Gear^.DirAngle) |
971 else if Gear^.Health <> 0 then |
971 else if Gear^.Health <> 0 then |
972 DrawRotated(sprMineOn, x, y, 0, Gear^.DirAngle) |
972 DrawSpriteRotated(sprMineOn, x, y, 0, Gear^.DirAngle) |
973 else DrawRotated(sprMineDead, x, y, 0, Gear^.DirAngle); |
973 else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle); |
974 |
974 |
975 gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then |
975 gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then |
976 DrawRotated(sprSMineOff, x, y, 0, Gear^.DirAngle) |
976 DrawSpriteRotated(sprSMineOff, x, y, 0, Gear^.DirAngle) |
977 else if Gear^.Health <> 0 then |
977 else if Gear^.Health <> 0 then |
978 DrawRotated(sprSMineOn, x, y, 0, Gear^.DirAngle) |
978 DrawSpriteRotated(sprSMineOn, x, y, 0, Gear^.DirAngle) |
979 else DrawRotated(sprMineDead, x, y, 0, Gear^.DirAngle); |
979 else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle); |
980 |
980 |
981 gtCase: if ((Gear^.Pos and posCaseAmmo) <> 0) then |
981 gtCase: if ((Gear^.Pos and posCaseAmmo) <> 0) then |
982 begin |
982 begin |
983 i:= (GameTicks shr 6) mod 64; |
983 i:= (GameTicks shr 6) mod 64; |
984 if i > 18 then |
984 if i > 18 then |
1009 if i > 18 then |
1009 if i > 18 then |
1010 i:= 0; |
1010 i:= 0; |
1011 DrawSprite(sprExplosives, x - 24, y - 24, i) |
1011 DrawSprite(sprExplosives, x - 24, y - 24, i) |
1012 end |
1012 end |
1013 else if Gear^.State and gsttmpFlag = 0 then |
1013 else if Gear^.State and gsttmpFlag = 0 then |
1014 DrawRotatedF(sprExplosivesRoll, x, y + 4, 0, 0, Gear^.DirAngle) |
1014 DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 0, 0, Gear^.DirAngle) |
1015 else |
1015 else |
1016 DrawRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle); |
1016 DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle); |
1017 end; |
1017 end; |
1018 gtDynamite: DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1); |
1018 gtDynamite: DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1); |
1019 gtClusterBomb: DrawRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle); |
1019 gtClusterBomb: DrawSpriteRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle); |
1020 gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0); |
1020 gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0); |
1021 gtFlame: if Gear^.Tag and 1 = 0 then |
1021 gtFlame: if Gear^.Tag and 1 = 0 then |
1022 DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16) |
1022 DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16) |
1023 else DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, -1, 16, 16); |
1023 else DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, -1, 16, 16); |
1024 gtParachute: begin |
1024 gtParachute: begin |
1025 DrawSprite(sprParachute, x - 24, y - 48, 0); |
1025 DrawSprite(sprParachute, x - 24, y - 48, 0); |
1026 DrawAltWeapon(Gear, x + 1, y - 3) |
1026 DrawAltWeapon(Gear, x + 1, y - 3) |
1027 end; |
1027 end; |
1028 gtAirAttack: begin |
1028 gtAirAttack: begin |
1029 Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF); |
1029 Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF); |
1030 DrawRotatedF(sprAirplane, x, y, 0, Gear^.Tag, 0); |
1030 DrawSpriteRotatedF(sprAirplane, x, y, 0, Gear^.Tag, 0); |
1031 Tint($FF, $FF, $FF, $FF); |
1031 Tint($FF, $FF, $FF, $FF); |
1032 DrawRotatedF(sprAirplane, x, y, 1, Gear^.Tag, 0); |
1032 DrawSpriteRotatedF(sprAirplane, x, y, 1, Gear^.Tag, 0); |
1033 end; |
1033 end; |
1034 gtAirBomb: DrawRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
1034 gtAirBomb: DrawSpriteRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
1035 gtTeleport: begin |
1035 gtTeleport: begin |
1036 HHGear:= Gear^.Hedgehog^.Gear; |
1036 HHGear:= Gear^.Hedgehog^.Gear; |
1037 if not Gear^.Hedgehog^.Unplaced then |
1037 if not Gear^.Hedgehog^.Unplaced then |
1038 DrawRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0); |
1038 DrawSpriteRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0); |
1039 DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0); |
1039 DrawSpriteRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0); |
1040 end; |
1040 end; |
1041 gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12); |
1041 gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12); |
1042 gtTarget: begin |
1042 gtTarget: begin |
1043 Tint($FF, $FF, $FF, round($FF * Gear^.Timer / 1000)); |
1043 Tint($FF, $FF, $FF, round($FF * Gear^.Timer / 1000)); |
1044 DrawSprite(sprTarget, x - 16, y - 16, 0); |
1044 DrawSprite(sprTarget, x - 16, y - 16, 0); |
1045 Tint($FF, $FF, $FF, $FF); |
1045 Tint($FF, $FF, $FF, $FF); |
1046 end; |
1046 end; |
1047 gtMortar: DrawRotated(sprMortar, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
1047 gtMortar: DrawSpriteRotated(sprMortar, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
1048 gtCake: if Gear^.Pos = 6 then |
1048 gtCake: if Gear^.Pos = 6 then |
1049 DrawRotatedf(sprCakeWalk, x, y, (GameTicks div 40) mod 6, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90) |
1049 DrawSpriteRotatedF(sprCakeWalk, x, y, (GameTicks div 40) mod 6, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90) |
1050 else |
1050 else |
1051 DrawRotatedf(sprCakeDown, x, y, 5 - Gear^.Pos, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90); |
1051 DrawSpriteRotatedF(sprCakeDown, x, y, 5 - Gear^.Pos, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90); |
1052 gtSeduction: if Gear^.Pos >= 14 then |
1052 gtSeduction: if Gear^.Pos >= 14 then |
1053 DrawSprite(sprSeduction, x - 16, y - 16, 0); |
1053 DrawSprite(sprSeduction, x - 16, y - 16, 0); |
1054 |
1054 |
1055 gtWatermelon: DrawRotatedf(sprWatermelon, x, y, 0, 0, Gear^.DirAngle); |
1055 gtWatermelon: DrawSpriteRotatedF(sprWatermelon, x, y, 0, 0, Gear^.DirAngle); |
1056 gtMelonPiece: DrawRotatedf(sprWatermelon, x, y, 1, 0, Gear^.DirAngle); |
1056 gtMelonPiece: DrawSpriteRotatedF(sprWatermelon, x, y, 1, 0, Gear^.DirAngle); |
1057 gtHellishBomb: DrawRotated(sprHellishBomb, x, y, 0, Gear^.DirAngle); |
1057 gtHellishBomb: DrawSpriteRotated(sprHellishBomb, x, y, 0, Gear^.DirAngle); |
1058 gtBirdy: begin |
1058 gtBirdy: begin |
1059 if Gear^.State and gstAnimation = gstAnimation then |
1059 if Gear^.State and gstAnimation = gstAnimation then |
1060 begin |
1060 begin |
1061 if Gear^.State and gstTmpFlag = 0 then // Appearing |
1061 if Gear^.State and gstTmpFlag = 0 then // Appearing |
1062 begin |
1062 begin |
1105 Tint($C0, $C0, $00, Gear^.Timer div 8) |
1105 Tint($C0, $C0, $00, Gear^.Timer div 8) |
1106 else if Gear^.Timer > 3980 then |
1106 else if Gear^.Timer > 3980 then |
1107 Tint($C0, $C0, $00, (5000 - Gear^.Timer) div 8) |
1107 Tint($C0, $C0, $00, (5000 - Gear^.Timer) div 8) |
1108 else |
1108 else |
1109 Tint($C0, $C0, $00, $C0); |
1109 Tint($C0, $C0, $00, $C0); |
1110 DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 1, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360); |
1110 DrawTextureRotatedF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 1, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360); |
1111 Tint($FF, $FF, $FF, $FF) |
1111 Tint($FF, $FF, $FF, $FF) |
1112 end; |
1112 end; |
1113 gtResurrector: begin |
1113 gtResurrector: begin |
1114 DrawRotated(sprCross, x, y, 0, 0); |
1114 DrawSpriteRotated(sprCross, x, y, 0, 0); |
1115 Tint($f5, $db, $35, max($00, round($C0 * abs(1 - (GameTicks mod 6000) / 3000)))); |
1115 Tint($f5, $db, $35, max($00, round($C0 * abs(1 - (GameTicks mod 6000) / 3000)))); |
1116 DrawTexture(x - 108, y - 108, SpritesData[sprVampiric].Texture, 4.5); |
1116 DrawTexture(x - 108, y - 108, SpritesData[sprVampiric].Texture, 4.5); |
1117 Tint($FF, $FF, $FF, $FF); |
1117 Tint($FF, $FF, $FF, $FF); |
1118 end; |
1118 end; |
1119 gtNapalmBomb: DrawRotated(sprNapalmBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
1119 gtNapalmBomb: DrawSpriteRotated(sprNapalmBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
1120 gtFlake: if Gear^.State and (gstDrowning or gstTmpFlag) <> 0 then |
1120 gtFlake: if Gear^.State and (gstDrowning or gstTmpFlag) <> 0 then |
1121 begin |
1121 begin |
1122 Tint((ExplosionBorderColor shr RShift) and $FF, |
1122 Tint((ExplosionBorderColor shr RShift) and $FF, |
1123 (ExplosionBorderColor shr GShift) and $FF, |
1123 (ExplosionBorderColor shr GShift) and $FF, |
1124 (ExplosionBorderColor shr BShift) and $FF, |
1124 (ExplosionBorderColor shr BShift) and $FF, |
1125 $FF); |
1125 $FF); |
1126 // Needs a nicer white texture to tint |
1126 // Needs a nicer white texture to tint |
1127 DrawRotatedTextureF(SpritesData[sprSnowDust].Texture, 1, 0, 0, x, y, 0, 1, 8, 8, Gear^.DirAngle); |
1127 DrawTextureRotatedF(SpritesData[sprSnowDust].Texture, 1, 0, 0, x, y, 0, 1, 8, 8, Gear^.DirAngle); |
1128 //DrawRotated(sprSnowDust, x, y, 0, Gear^.DirAngle); |
1128 //DrawSpriteRotated(sprSnowDust, x, y, 0, Gear^.DirAngle); |
1129 //DrawTexture(x, y, SpritesData[sprVampiric].Texture, 0.1); |
1129 //DrawTexture(x, y, SpritesData[sprVampiric].Texture, 0.1); |
1130 Tint($FF, $FF, $FF, $FF); |
1130 Tint($FF, $FF, $FF, $FF); |
1131 end |
1131 end |
1132 else //if not isInLag then |
1132 else //if not isInLag then |
1133 begin |
1133 begin |