hedgewars/uVisualGears.pas
changeset 4545 180d703cfdd0
parent 4544 d999e3221e3d
child 4546 a6402b8c2b24
equal deleted inserted replaced
4544:d999e3221e3d 4545:180d703cfdd0
   372 end;
   372 end;
   373 
   373 
   374 procedure DrawVisualGears(Layer: LongWord);
   374 procedure DrawVisualGears(Layer: LongWord);
   375 var Gear: PVisualGear;
   375 var Gear: PVisualGear;
   376     tinted: boolean;
   376     tinted: boolean;
       
   377     tmp: real;
   377 begin
   378 begin
   378 Gear:= VisualGearsList;
   379 Gear:= VisualGearsList;
   379 case Layer of
   380 case Layer of
   380     0: while Gear <> nil do
   381     0: while Gear <> nil do
   381         begin
   382         begin
   495             end;
   496             end;
   496         case Gear^.Kind of
   497         case Gear^.Kind of
   497             vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   498             vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   498             vgtSpeechBubble: if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team = CurrentTeam)) or (Gear^.State = 2)) then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   499             vgtSpeechBubble: if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team = CurrentTeam)) or (Gear^.State = 2)) then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   499             vgtHealthTag: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   500             vgtHealthTag: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   500             vgtCircle:  if gear^.Angle = 1 then DrawTexture(round(Gear^.X), round(Gear^.Y), SpritesData[sprVampiric].Texture, Gear^.State / 100)
   501             vgtCircle:  if gear^.Angle = 1 then 
       
   502                             begin
       
   503                             tmp:= Gear^.State / 100;
       
   504                             DrawTexture(round(Gear^.X-24*tmp), round(Gear^.Y-24*tmp), SpritesData[sprVampiric].Texture, tmp)
       
   505                             end
   501                         else DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer);
   506                         else DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer);
   502         end;
   507         end;
   503         if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
   508         if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
   504         Gear:= Gear^.NextGear
   509         Gear:= Gear^.NextGear
   505         end
   510         end