hedgewars/uVisualGears.pas
changeset 13235 9f5023a5f9e1
parent 13151 deab88f1f6f7
child 13329 e8801220c13f
equal deleted inserted replaced
13234:6fa6626eb273 13235:9f5023a5f9e1
   262                         if speedlessFlakes then
   262                         if speedlessFlakes then
   263                             DrawSprite(sprite, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   263                             DrawSprite(sprite, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   264                         else
   264                         else
   265                             DrawSpriteRotatedF(sprite, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   265                             DrawSpriteRotatedF(sprite, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   266                         end;*)
   266                         end;*)
   267                vgtSpeechBubble: begin
   267                vgtSpeechBubble: if (Gear^.Angle <> 0) then
   268                                 if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then
   268                                 // ^ Before this gear renders, Angle must be set to mark it ready (e.g. coordinates properly initialized)
   269                                     begin
   269                                     if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then
   270                                     tinted:= true;
   270                                         begin
   271                                     Tint($FF, $FF, $FF,  $66);
   271                                         tinted:= true;
   272                                     DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
   272                                         Tint($FF, $FF, $FF,  $66);
   273                                     end
   273                                         DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
   274                                 else if (Gear^.Tex <> nil) and (((Gear^.State = 0) and ((Gear^.Hedgehog = nil) or (Gear^.Hedgehog^.Team = CurrentTeam))) or (Gear^.State = 2)) then
   274                                         end
   275                                     DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   275                                     else if (Gear^.Tex <> nil) and (((Gear^.State = 0) and ((Gear^.Hedgehog = nil) or (Gear^.Hedgehog^.Team = CurrentTeam))) or (Gear^.State = 2)) then
   276                                 end;
   276                                         DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   277                vgtSmallDamageTag: DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   277                vgtSmallDamageTag: DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   278                vgtHealthTag: if Gear^.Tex <> nil then
   278                vgtHealthTag: if Gear^.Tex <> nil then
   279                                begin
   279                                begin
   280                                if Gear^.Frame = 0 then
   280                                if Gear^.Frame = 0 then
   281                                    DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
   281                                    DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)