Start piano higher (piano on maps that matched land_height was really weird before). Experiment w/ trying to make birdy shrink into distance to avoid odd birdy vanishes if tracking it.
authornemo
Sun, 20 Jan 2013 20:42:20 -0500
changeset 8414 c1ac0b64315e
parent 8413 454191defee6
child 8415 02acf6b92f52
Start piano higher (piano on maps that matched land_height was really weird before). Experiment w/ trying to make birdy shrink into distance to avoid odd birdy vanishes if tracking it.
hedgewars/uGearsHedgehog.pas
hedgewars/uGearsRender.pas
--- a/hedgewars/uGearsHedgehog.pas	Sun Jan 20 18:54:18 2013 -0500
+++ b/hedgewars/uGearsHedgehog.pas	Sun Jan 20 20:42:20 2013 -0500
@@ -365,7 +365,7 @@
                                  Unplaced:= true;
                                  X:= _0;
                                  Y:= _0;
-                                 newGear:= AddGear(TargetPoint.X, 0, gtPiano, 0, _0, _0, 0);
+                                 newGear:= AddGear(TargetPoint.X, -1024, gtPiano, 0, _0, _0, 0);
                                  PauseMusic
                                  end;
                  amFlamethrower: newGear:= AddGear(hwRound(X), hwRound(Y), gtFlamethrower,  0, xx * _0_5, yy * _0_5, 0);
--- a/hedgewars/uGearsRender.pas	Sun Jan 20 18:54:18 2013 -0500
+++ b/hedgewars/uGearsRender.pas	Sun Jan 20 20:42:20 2013 -0500
@@ -1106,8 +1106,8 @@
                                 startX:= max(max(LAND_WIDTH,4096) + 1024, endX + 2048)
                             else
                                 startX:= max(-max(LAND_WIDTH,4096) - 1024, endX - 2048);
-                            startY:= endY - 256;
-                            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);
+                            startY:= endY - 1024;
+                            DrawTextureF(SpritesData[sprBirdy].Texture, min(Gear^.Timer/750,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);
                             end
                         else // Disappearing
                             begin
@@ -1117,8 +1117,8 @@
                                 endX:= max(max(LAND_WIDTH,4096) + 1024, startX + 2048)
                             else
                                 endX:= max(-max(LAND_WIDTH,4096) - 1024, startX - 2048);
-                            endY:= startY + 256;
-                            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);
+                            endY:= startY + 1024;
+                            DrawTextureF(SpritesData[sprBirdy].Texture, min((2000-Gear^.Timer)/750,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);
                             end;
                         end
                     else