698 if Gear^.Tag < 0 then |
698 if Gear^.Tag < 0 then |
699 startX:= max(LAND_WIDTH + 1024, endX + 2048) |
699 startX:= max(LAND_WIDTH + 1024, endX + 2048) |
700 else |
700 else |
701 startX:= max(-LAND_WIDTH - 1024, endX - 2048); |
701 startX:= max(-LAND_WIDTH - 1024, endX - 2048); |
702 startY:= endY - 256; |
702 startY:= endY - 256; |
703 DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + trunc((endX - startX) * (-power(2, -10 * LongInt(Gear^.Timer)/2000) + 1)), startY + WorldDy + trunc((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); |
703 DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + floor((endX - startX) * (-power(2, -10 * LongInt(Gear^.Timer)/2000) + 1)), startY + WorldDy + floor((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); |
704 end |
704 end |
705 else // Disappearing |
705 else // Disappearing |
706 begin |
706 begin |
707 startX:= hwRound(Gear^.X); |
707 startX:= hwRound(Gear^.X); |
708 startY:= hwRound(Gear^.Y); |
708 startY:= hwRound(Gear^.Y); |
709 if Gear^.Tag > 0 then |
709 if Gear^.Tag > 0 then |
710 endX:= max(LAND_WIDTH + 1024, startX + 2048) |
710 endX:= max(LAND_WIDTH + 1024, startX + 2048) |
711 else |
711 else |
712 endX:= max(-LAND_WIDTH - 1024, startX - 2048); |
712 endX:= max(-LAND_WIDTH - 1024, startX - 2048); |
713 endY:= startY + 256; |
713 endY:= startY + 256; |
714 DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + trunc((endX - startX) * power(2, 10 * (LongInt(Gear^.Timer)/2000 - 1))) + hwRound(Gear^.dX * Gear^.Timer), startY + WorldDy + trunc((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); |
714 DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + floor((endX - startX) * power(2, 10 * (LongInt(Gear^.Timer)/2000 - 1))) + hwRound(Gear^.dX * Gear^.Timer), startY + WorldDy + floor((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); |
715 end; |
715 end; |
716 end |
716 end |
717 else |
717 else |
718 DrawTextureF(SpritesData[sprBirdy].Texture, 1, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); |
718 DrawTextureF(SpritesData[sprBirdy].Texture, 1, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); |
719 end; |
719 end; |