369 0, |
369 0, |
370 DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle); |
370 DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle); |
371 with HH^ do |
371 with HH^ do |
372 if (HatTex <> nil) then |
372 if (HatTex <> nil) then |
373 begin |
373 begin |
374 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 0, i*2, 32, 32, |
374 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32, |
375 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
375 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
376 if HatTex^.w > 64 then |
376 if HatTex^.w > 64 then |
377 begin |
377 begin |
378 Tint(HH^.Team^.Clan^.Color shl 8 or $FF); |
378 Tint(HH^.Team^.Clan^.Color shl 8 or $FF); |
379 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 32, i*2, 32, 32, |
379 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32, |
380 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
380 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
381 Tint($FF, $FF, $FF, $FF) |
381 Tint($FF, $FF, $FF, $FF) |
382 end |
382 end |
383 end |
383 end |
384 end; |
384 end; |
922 gtHedgehog: DrawHH(Gear, x, y); |
922 gtHedgehog: DrawHH(Gear, x, y); |
923 |
923 |
924 gtShell: DrawRotated(sprBazookaShell, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
924 gtShell: DrawRotated(sprBazookaShell, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); |
925 |
925 |
926 gtGrave: begin |
926 gtGrave: begin |
927 DrawTextureF(Gear^.Hedgehog^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 2, 32, 32); |
927 DrawTextureF(Gear^.Hedgehog^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32); |
928 if Gear^.Health > 0 then |
928 if Gear^.Health > 0 then |
929 begin |
929 begin |
930 //Tint($33, $33, $FF, max($40, round($FF * abs(1 - (GameTicks mod (6000 div Gear^.Health)) / 750)))); |
930 //Tint($33, $33, $FF, max($40, round($FF * abs(1 - (GameTicks mod (6000 div Gear^.Health)) / 750)))); |
931 Tint($f5, $db, $35, max($40, round($FF * abs(1 - (GameTicks mod 1500) / (750 + Gear^.Health))))); |
931 Tint($f5, $db, $35, max($40, round($FF * abs(1 - (GameTicks mod 1500) / (750 + Gear^.Health))))); |
932 //Tint($FF, $FF, $FF, max($40, round($FF * abs(1 - (RealTicks mod 1500) / 750)))); |
932 //Tint($FF, $FF, $FF, max($40, round($FF * abs(1 - (RealTicks mod 1500) / 750)))); |
979 DrawRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle); |
979 DrawRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle); |
980 end; |
980 end; |
981 gtDynamite: DrawSprite2(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1); |
981 gtDynamite: DrawSprite2(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1); |
982 gtClusterBomb: DrawRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle); |
982 gtClusterBomb: DrawRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle); |
983 gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0); |
983 gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0); |
984 gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 2, 16, 16); |
984 gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16); |
985 gtParachute: begin |
985 gtParachute: begin |
986 DrawSprite(sprParachute, x - 24, y - 48, 0); |
986 DrawSprite(sprParachute, x - 24, y - 48, 0); |
987 DrawAltWeapon(Gear, x + 1, y - 3) |
987 DrawAltWeapon(Gear, x + 1, y - 3) |
988 end; |
988 end; |
989 gtAirAttack: begin |
989 gtAirAttack: begin |
1023 if Gear^.Tag < 0 then |
1023 if Gear^.Tag < 0 then |
1024 startX:= max(LAND_WIDTH + 1024, endX + 2048) |
1024 startX:= max(LAND_WIDTH + 1024, endX + 2048) |
1025 else |
1025 else |
1026 startX:= max(-LAND_WIDTH - 1024, endX - 2048); |
1026 startX:= max(-LAND_WIDTH - 1024, endX - 2048); |
1027 startY:= endY - 256; |
1027 startY:= endY - 256; |
1028 DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + LongInt(round((endX - startX) * (-power(2, -10 * LongInt(Gear^.Timer)/2000) + 1))), startY + WorldDy + LongInt(round((endY - startY) * sqrt(1 - power((LongInt(Gear^.Timer)/2000)-1, 2)))), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag*2, 75, 75); |
1028 DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + LongInt(round((endX - startX) * (-power(2, -10 * LongInt(Gear^.Timer)/2000) + 1))), startY + WorldDy + LongInt(round((endY - startY) * sqrt(1 - power((LongInt(Gear^.Timer)/2000)-1, 2)))), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); |
1029 end |
1029 end |
1030 else // Disappearing |
1030 else // Disappearing |
1031 begin |
1031 begin |
1032 startX:= x - WorldDx; |
1032 startX:= x - WorldDx; |
1033 startY:= y - WorldDy; |
1033 startY:= y - WorldDy; |
1034 if Gear^.Tag > 0 then |
1034 if Gear^.Tag > 0 then |
1035 endX:= max(LAND_WIDTH + 1024, startX + 2048) |
1035 endX:= max(LAND_WIDTH + 1024, startX + 2048) |
1036 else |
1036 else |
1037 endX:= max(-LAND_WIDTH - 1024, startX - 2048); |
1037 endX:= max(-LAND_WIDTH - 1024, startX - 2048); |
1038 endY:= startY + 256; |
1038 endY:= startY + 256; |
1039 DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + LongInt(round((endX - startX) * power(2, 10 * (LongInt(Gear^.Timer)/2000 - 1)))) + hwRound(Gear^.dX * Gear^.Timer), startY + WorldDy + LongInt(round((endY - startY) * cos(LongInt(Gear^.Timer)/2000 * (Pi/2)) - (endY - startY))) + hwRound(Gear^.dY * Gear^.Timer), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag*2, 75, 75); |
1039 DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + LongInt(round((endX - startX) * power(2, 10 * (LongInt(Gear^.Timer)/2000 - 1)))) + hwRound(Gear^.dX * Gear^.Timer), startY + WorldDy + LongInt(round((endY - startY) * cos(LongInt(Gear^.Timer)/2000 * (Pi/2)) - (endY - startY))) + hwRound(Gear^.dY * Gear^.Timer), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); |
1040 end; |
1040 end; |
1041 end |
1041 end |
1042 else |
1042 else |
1043 begin |
1043 begin |
1044 if Gear^.Health < 250 then |
1044 if Gear^.Health < 250 then |
1045 DrawTextureF(SpritesData[sprBirdy].Texture, 1, x, y, ((Gear^.Pos shr 6) or (RealTicks shr 7)) mod 2, Gear^.Tag*2, 75, 75) |
1045 DrawTextureF(SpritesData[sprBirdy].Texture, 1, x, y, ((Gear^.Pos shr 6) or (RealTicks shr 7)) mod 2, Gear^.Tag, 75, 75) |
1046 else |
1046 else |
1047 DrawTextureF(SpritesData[sprBirdy].Texture, 1, x, y, ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag*2, 75, 75); |
1047 DrawTextureF(SpritesData[sprBirdy].Texture, 1, x, y, ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); |
1048 end; |
1048 end; |
1049 end; |
1049 end; |
1050 gtEgg: DrawRotatedTextureF(SpritesData[sprEgg].Texture, 1, 0, 0, x, y, 0, 2, 16, 16, Gear^.DirAngle); |
1050 gtEgg: DrawRotatedTextureF(SpritesData[sprEgg].Texture, 1, 0, 0, x, y, 0, 1, 16, 16, Gear^.DirAngle); |
1051 gtPiano: begin |
1051 gtPiano: begin |
1052 if (Gear^.State and gstDrowning) = 0 then |
1052 if (Gear^.State and gstDrowning) = 0 then |
1053 begin |
1053 begin |
1054 Tint($FF, $FF, $FF, $10); |
1054 Tint($FF, $FF, $FF, $10); |
1055 for i:= 8 downto 1 do |
1055 for i:= 8 downto 1 do |
1056 DrawTextureF(SpritesData[sprPiano].Texture, 1, x, y - hwRound(Gear^.dY * 4 * i), 0, 2, 128, 128); |
1056 DrawTextureF(SpritesData[sprPiano].Texture, 1, x, y - hwRound(Gear^.dY * 4 * i), 0, 1, 128, 128); |
1057 Tint($FF, $FF, $FF, $FF) |
1057 Tint($FF, $FF, $FF, $FF) |
1058 end; |
1058 end; |
1059 DrawTextureF(SpritesData[sprPiano].Texture, 1, x, y, 0, 2, 128, 128); |
1059 DrawTextureF(SpritesData[sprPiano].Texture, 1, x, y, 0, 1, 128, 128); |
1060 end; |
1060 end; |
1061 gtPoisonCloud: begin |
1061 gtPoisonCloud: begin |
1062 if Gear^.Timer < 1020 then |
1062 if Gear^.Timer < 1020 then |
1063 Tint($C0, $C0, $00, Gear^.Timer div 8) |
1063 Tint($C0, $C0, $00, Gear^.Timer div 8) |
1064 else if Gear^.Timer > 3980 then |
1064 else if Gear^.Timer > 3980 then |
1065 Tint($C0, $C0, $00, (5000 - Gear^.Timer) div 8) |
1065 Tint($C0, $C0, $00, (5000 - Gear^.Timer) div 8) |
1066 else |
1066 else |
1067 Tint($C0, $C0, $00, $C0); |
1067 Tint($C0, $C0, $00, $C0); |
1068 DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 2, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360); |
1068 DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 1, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360); |
1069 Tint($FF, $FF, $FF, $FF) |
1069 Tint($FF, $FF, $FF, $FF) |
1070 end; |
1070 end; |
1071 gtResurrector: begin |
1071 gtResurrector: begin |
1072 DrawRotated(sprCross, x, y, 0, 0); |
1072 DrawRotated(sprCross, x, y, 0, 0); |
1073 Tint($f5, $db, $35, max($00, round($C0 * abs(1 - (GameTicks mod 6000) / 3000)))); |
1073 Tint($f5, $db, $35, max($00, round($C0 * abs(1 - (GameTicks mod 6000) / 3000)))); |
1080 Tint((cExplosionBorderColor shr RShift) and $FF, |
1080 Tint((cExplosionBorderColor shr RShift) and $FF, |
1081 (cExplosionBorderColor shr GShift) and $FF, |
1081 (cExplosionBorderColor shr GShift) and $FF, |
1082 (cExplosionBorderColor shr BShift) and $FF, |
1082 (cExplosionBorderColor shr BShift) and $FF, |
1083 $FF); |
1083 $FF); |
1084 // Needs a nicer white texture to tint |
1084 // Needs a nicer white texture to tint |
1085 DrawRotatedTextureF(SpritesData[sprSnowDust].Texture, 1, 0, 0, x, y, 0, 2, 8, 8, Gear^.DirAngle); |
1085 DrawRotatedTextureF(SpritesData[sprSnowDust].Texture, 1, 0, 0, x, y, 0, 1, 8, 8, Gear^.DirAngle); |
1086 //DrawRotated(sprSnowDust, x, y, 0, Gear^.DirAngle); |
1086 //DrawRotated(sprSnowDust, x, y, 0, Gear^.DirAngle); |
1087 //DrawTexture(x, y, SpritesData[sprVampiric].Texture, 0.1); |
1087 //DrawTexture(x, y, SpritesData[sprVampiric].Texture, 0.1); |
1088 Tint($FF, $FF, $FF, $FF); |
1088 Tint($FF, $FF, $FF, $FF); |
1089 end |
1089 end |
1090 else //if not isInLag then |
1090 else //if not isInLag then |