# HG changeset patch # User nemo # Date 1315072912 14400 # Node ID 70d7f8e40f532d359a004f63eb222eb7f9280ea3 # Parent 65006a679352cf98203f57a103b571780eb3a7fe Just for fun. Flowers! Also, use a less blatant image in ammo menu. diff -r 65006a679352 -r 70d7f8e40f53 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sat Sep 03 21:35:49 2011 +0400 +++ b/hedgewars/GSHandlers.inc Sat Sep 03 14:01:52 2011 -0400 @@ -766,8 +766,9 @@ procedure doStepBeeWork(Gear: PGear); var t: hwFloat; - gX,gY: LongInt; + gX,gY,i: LongInt; nuw: boolean; + flower: PVisualGear; const uw: boolean = false; begin @@ -816,6 +817,21 @@ begin StopSound(Gear^.SoundChannel); doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, Gear^.Hedgehog, EXPLAutoSound); + for i:= 0 to 31 do + begin + flower:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtStraightShot); + if flower <> nil then + with flower^ do + begin + Scale:= 0.75; + dx:= 0.001 * (random(200)); + dy:= 0.001 * (random(200)); + if random(2) = 0 then dx := -dx; + if random(2) = 0 then dy := -dy; + FrameTicks:= random(250) + 250; + State:= ord(sprTargetBee); + end; + end; DeleteGear(Gear); end; end; @@ -3019,7 +3035,7 @@ if random(2) = 0 then dx := -dx; if random(2) = 0 then dy := -dy; FrameTicks:= random(750) + 1000; - heart^.State:= ord(sprSeduction) + State:= ord(sprSeduction) end; end; diff -r 65006a679352 -r 70d7f8e40f53 hedgewars/uVisualGears.pas --- a/hedgewars/uVisualGears.pas Sat Sep 03 21:35:49 2011 +0400 +++ b/hedgewars/uVisualGears.pas Sat Sep 03 14:01:52 2011 -0400 @@ -317,10 +317,11 @@ dy:= 0; FrameTicks:= 350; Frame:= 7; - Angle := 0; + Angle:= 0; end; vgtSmoothWindBar: Tag:= hwRound(cWindSpeed * 72 / cMaxWindSpeed); vgtStraightShot: begin + Scale:= 1.0; dx:= 0.001 * random(45); dy:= 0.001 * (random(20) + 25); State:= ord(sprHealth); @@ -494,6 +495,7 @@ var Gear: PVisualGear; tinted: boolean; tmp: real; + i: LongInt; begin case Layer of // this layer is very distant in the background when stereo @@ -592,8 +594,10 @@ SetScale(zoom) end end; - //if Ger^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex); - vgtStraightShot: DrawRotatedF(TSprite(Gear^.State), round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); + vgtStraightShot: begin + if Gear^.dX < 0 then i:= -1 else i:= 1; + DrawTextureF(SpritesData[TSprite(Gear^.State)].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, i, SpritesData[TSprite(Gear^.State)].Width, SpritesData[TSprite(Gear^.State)].Height); + end; end; if (cReducedQuality and rqAntiBoom) = 0 then case Gear^.Kind of diff -r 65006a679352 -r 70d7f8e40f53 share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png has changed diff -r 65006a679352 -r 70d7f8e40f53 share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed