hedgewars/uVisualGears.pas
changeset 3711 de3b3df215c3
parent 3706 a79784328c03
child 3751 a70c61c076ae
--- a/hedgewars/uVisualGears.pas	Mon Aug 02 23:15:22 2010 +0200
+++ b/hedgewars/uVisualGears.pas	Mon Aug 02 23:15:34 2010 +0200
@@ -116,7 +116,8 @@
             @doStepSmokeTrace,
             @doStepExplosion,
             @doStepBigExplosion,
-            @doStepChunk
+            @doStepChunk,
+            @doStepNote
         );
 
 function  AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0): PVisualGear;
@@ -139,7 +140,8 @@
     vgtHealthTag,
     vgtExplosion,
     vgtSmokeTrace,
-    vgtEvilTrace]) then
+    vgtEvilTrace,
+    vgtNote]) then
     begin
       AddVisualGear:= nil;
       exit
@@ -305,9 +307,15 @@
                 t:= random(1024);
                 sp:= 0.001 * (random(85) + 47);
                 dx:= AngleSin(t).QWordValue/4294967296 * sp;
-                dy:= AngleCos(t).QWordValue/4294967296 * sp;
+                dy:= AngleCos(t).QWordValue/4294967296 * sp * -2;
                 if random(2) = 0 then dx := -dx;
-                (*if random(2) = 0 then*) dy := -2 * dy;
+                end;
+      vgtNote: begin
+                dx:= 0.005 * (random(15) + 10);
+                dy:= -0.001 * (random(40) + 20);
+                if random(2) = 0 then dx := -dx;
+                Frame:= random(4);
+                FrameTicks:= random(2000) + 1500;
                 end;
         end;
 
@@ -466,6 +474,7 @@
                             DrawRotatedTextureF(SpritesData[sprSmokeRing].Texture, Gear^.scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 200, 200, Gear^.Angle);
                             end;
                 vgtChunk: DrawRotatedF(sprChunk, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
+                 vgtNote: DrawRotatedF(sprNote, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
             end;
         case Gear^.Kind of
             vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);