hedgewars/uVisualGears.pas
changeset 3704 ed2b9c7fb260
parent 3697 d5b30d6373fc
child 3706 a79784328c03
--- a/hedgewars/uVisualGears.pas	Sun Aug 01 22:08:07 2010 +0200
+++ b/hedgewars/uVisualGears.pas	Mon Aug 02 00:48:15 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
@@ -309,6 +311,13 @@
                 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;
 
 if State <> 0 then gear^.State:= State;
@@ -466,6 +475,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);