minor tweak since health tag was being retinted anyway. make it fade out. also disable unneeded tinted flag, save a handful of ops
--- a/hedgewars/VGSHandlers.inc Mon Aug 01 15:37:27 2011 -0400
+++ b/hedgewars/VGSHandlers.inc Mon Aug 01 16:45:45 2011 -0400
@@ -258,7 +258,11 @@
if Gear^.FrameTicks <= Steps then
DeleteVisualGear(Gear)
else
+ begin
dec(Gear^.FrameTicks, Steps);
+ if (Gear^.FrameTicks < 501) and (Gear^.FrameTicks mod 5 = 0) then
+ Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or (((Gear^.Tint and $000000FF) * Gear^.FrameTicks) div 500)
+ end
end;
////////////////////////////////////////////////////////////////////////////////
--- a/hedgewars/uVisualGears.pas Mon Aug 01 15:37:27 2011 -0400
+++ b/hedgewars/uVisualGears.pas Mon Aug 01 16:45:45 2011 -0400
@@ -433,7 +433,7 @@
// this layer is on the land level (which is close but behind the screen plane) when stereo
1: while Gear <> nil do
begin
- tinted:= false;
+ //tinted:= false;
if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
case Gear^.Kind of
vgtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
@@ -462,7 +462,8 @@
DrawSprite(sprDroplet, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);
vgtBubble: DrawSprite(sprBubbles, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);//(RealTicks div 64 + Gear^.Frame) mod 8);
end;
- if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
+ //if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
+ if (Gear^.Tint <> $FFFFFFFF) then Tint($FF,$FF,$FF,$FF);
Gear:= Gear^.NextGear
end;
// this layer is on the screen plane (depth = 0) when stereo