hedgewars/uVisualGears.pas
changeset 4451 1c342980b4aa
parent 4443 d393b9ccd328
child 4452 258945553b18
equal deleted inserted replaced
4450:b8d30b0e4829 4451:1c342980b4aa
   384                           DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   384                           DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   385                       else
   385                       else
   386                           DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   386                           DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   387             vgtCloud: DrawSprite(sprCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame);
   387             vgtCloud: DrawSprite(sprCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame);
   388             end;
   388             end;
       
   389 	Tint($FFFFFFFF);
   389         Gear:= Gear^.NextGear
   390         Gear:= Gear^.NextGear
   390         end;
   391         end;
   391     1: while Gear <> nil do
   392     1: while Gear <> nil do
   392         begin
   393         begin
   393         Tint(Gear^.Tint);
   394         Tint(Gear^.Tint);
   405                             if Gear^.FrameTicks < 255 then
   406                             if Gear^.FrameTicks < 255 then
   406                                 Tint($FF, $FF, $FF, Gear^.FrameTicks);
   407                                 Tint($FF, $FF, $FF, Gear^.FrameTicks);
   407                             DrawRotatedF(sprFeather, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   408                             DrawRotatedF(sprFeather, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   408                             end;
   409                             end;
   409                  end;
   410                  end;
       
   411 	Tint($FFFFFFFF);
   410         Gear:= Gear^.NextGear
   412         Gear:= Gear^.NextGear
   411         end;
   413         end;
   412     2: while Gear <> nil do
   414     2: while Gear <> nil do
   413         begin
   415         begin
   414         Tint(Gear^.Tint);
   416         Tint(Gear^.Tint);
   470             end;
   472             end;
   471         case Gear^.Kind of
   473         case Gear^.Kind of
   472             vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   474             vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   473             vgtSpeechBubble: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   475             vgtSpeechBubble: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   474             vgtHealthTag: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   476             vgtHealthTag: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   475             vgtCircle: DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer, 
   477             vgtCircle: DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer);
   476                       ((Gear^.Tint shr 24) and $FF), ((Gear^.Tint shr 16) and $FF), ((Gear^.Tint shr 8) and $FF), Gear^.Tint and $FF); 
   478         end;
   477 // Consider adding a version of DrawCircle that does not set Tint internally, and just call it here...
   479 	Tint($FFFFFFFF);
   478         end;
       
   479         Gear:= Gear^.NextGear
   480         Gear:= Gear^.NextGear
   480         end
   481         end
   481     end
   482     end
   482 end;
   483 end;
   483 
   484