hedgewars/uVisualGears.pas
changeset 5294 67278f1cba2c
parent 5256 e3fada9358b0
child 5357 ec36f3d53f3c
equal deleted inserted replaced
5247:bf6d4bc531d2 5294:67278f1cba2c
   401     tinted: boolean;
   401     tinted: boolean;
   402     tmp: real;
   402     tmp: real;
   403 begin
   403 begin
   404 Gear:= VisualGearsList;
   404 Gear:= VisualGearsList;
   405 case Layer of
   405 case Layer of
   406     // this level is very distant in the background when stereo
   406     // this layer is very distant in the background when stereo
   407     0: while Gear <> nil do
   407     0: while Gear <> nil do
   408         begin
   408         begin
   409         if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
   409         if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
   410         case Gear^.Kind of
   410         case Gear^.Kind of
   411             vgtFlake: if SuddenDeathDmg then
   411             vgtFlake: if SuddenDeathDmg then
   412                         if vobSDVelocity = 0 then
   412                           if vobSDVelocity = 0 then
   413                             DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   413                               DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   414                         else
   414                           else
   415                             DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   415                               DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   416                       else
   416                       else
   417                         if vobVelocity = 0 then
   417                           if vobVelocity = 0 then
   418                             DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   418                               DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   419                         else
   419                           else
   420                             DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   420                               DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   421             vgtCloud: if SuddenDeathDmg then
   421             vgtCloud: if SuddenDeathDmg then
   422                           DrawSprite(sprSDCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   422                           DrawSprite(sprSDCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   423                       else
   423                       else
   424                           DrawSprite(sprCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame);
   424                           DrawSprite(sprCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame);
   425             end;
   425             end;
   426         if Gear^.Tint <> $FFFFFFFF then Tint($FF,$FF,$FF,$FF);
   426         if Gear^.Tint <> $FFFFFFFF then Tint($FF,$FF,$FF,$FF);
   427         Gear:= Gear^.NextGear
   427         Gear:= Gear^.NextGear
   428         end;
   428        end;
   429     // this level is on the land one when stereo
   429     // this layer is on the land level (which is close but behind the screen plane) when stereo
   430     1: while Gear <> nil do
   430     1: while Gear <> nil do
   431         begin
   431         begin
   432         tinted:= false;
   432         tinted:= false;
   433         if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
   433         if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
   434         case Gear^.Kind of
   434         case Gear^.Kind of
   435             vgtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   435             vgtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   436             vgtEvilTrace: if Gear^.State < 8 then DrawSprite(sprEvilTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   436             vgtEvilTrace: if Gear^.State < 8 then DrawSprite(sprEvilTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   437             vgtLineTrail: DrawLine(Gear^.X, Gear^.Y, Gear^.dX, Gear^.dY, 1.0, $FF, min(Gear^.Timer, $C0), min(Gear^.Timer, $80), min(Gear^.Timer, $FF));
   437             vgtLineTrail: DrawLine(Gear^.X, Gear^.Y, Gear^.dX, Gear^.dY, 1.0, $FF, min(Gear^.Timer, $C0), min(Gear^.Timer, $80), min(Gear^.Timer, $FF));
   438         end;
   438         end;
   439             if (cReducedQuality and rqAntiBoom) = 0 then
   439         if (cReducedQuality and rqAntiBoom) = 0 then
   440                 case Gear^.Kind of
   440             case Gear^.Kind of
   441                     vgtSmoke: DrawSprite(sprSmoke, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   441                 vgtSmoke: DrawSprite(sprSmoke, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   442                     vgtSmokeWhite: DrawSprite(sprSmokeWhite, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   442                 vgtSmokeWhite: DrawSprite(sprSmokeWhite, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   443                     vgtDust: if Gear^.State = 1 then
   443                 vgtDust: if Gear^.State = 1 then
   444                                 DrawSprite(sprSnowDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame)
   444                              DrawSprite(sprSnowDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame)
   445                              else
   445                          else
   446                                 DrawSprite(sprDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   446                              DrawSprite(sprDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   447                     vgtFire: if (Gear^.State and gstTmpFlag) = 0 then
   447                 vgtFire: if (Gear^.State and gstTmpFlag) = 0 then
   448                                  DrawSprite(sprFlame, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy, (RealTicks shr 6 + Gear^.Frame) mod 8)
   448                              DrawSprite(sprFlame, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy, (RealTicks shr 6 + Gear^.Frame) mod 8)
   449                              else
   449                          else
   450                                  DrawTextureF(SpritesData[sprFlame].Texture, Gear^.FrameTicks / 900, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, (RealTicks shr 7 + Gear^.Frame) mod 8, 1, 16, 16);
   450                              DrawTextureF(SpritesData[sprFlame].Texture, Gear^.FrameTicks / 900, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, (RealTicks shr 7 + Gear^.Frame) mod 8, 1, 16, 16);
   451                     vgtSplash: if SuddenDeathDmg then
   451                 vgtSplash: if SuddenDeathDmg then
   452                                    DrawSprite(sprSDSplash, round(Gear^.X) + WorldDx - 40, round(Gear^.Y) + WorldDy - 58, 19 - (Gear^.FrameTicks div 37))
   452                                DrawSprite(sprSDSplash, round(Gear^.X) + WorldDx - 40, round(Gear^.Y) + WorldDy - 58, 19 - (Gear^.FrameTicks div 37))
   453                                else
   453                            else
   454                                    DrawSprite(sprSplash, round(Gear^.X) + WorldDx - 40, round(Gear^.Y) + WorldDy - 58, 19 - (Gear^.FrameTicks div 37));
   454                                DrawSprite(sprSplash, round(Gear^.X) + WorldDx - 40, round(Gear^.Y) + WorldDy - 58, 19 - (Gear^.FrameTicks div 37));
   455                     vgtDroplet: if SuddenDeathDmg then
   455                 vgtDroplet: if SuddenDeathDmg then
   456                                     DrawSprite(sprSDDroplet, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame)
   456                                 DrawSprite(sprSDDroplet, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame)
   457                                 else
   457                             else
   458                                     DrawSprite(sprDroplet, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);
   458                                 DrawSprite(sprDroplet, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);
   459                     vgtChunk: DrawRotatedF(sprChunk, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   459                 vgtBubble: DrawSprite(sprBubbles, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);//(RealTicks div 64 + Gear^.Frame) mod 8);
   460                  end;
   460             end;
   461         if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
   461         if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
   462         Gear:= Gear^.NextGear
   462         Gear:= Gear^.NextGear
   463         end;
   463        end;
   464     // this level is on the screen plane when stereo (depth = 0)
   464     // this layer is on the screen plane (depth = 0) when stereo
   465     3: while Gear <> nil do
   465     3: while Gear <> nil do
   466         begin
   466         begin
   467         tinted:= false;
   467         tinted:= false;
   468         if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
   468         if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
   469         case Gear^.Kind of
   469         case Gear^.Kind of
   470             vgtSpeechBubble: begin
   470             vgtSpeechBubble: begin
   471                            if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then
   471                              if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then
   472                            begin
   472                                  begin
   473                                tinted:= true;
   473                                  tinted:= true;
   474                                Tint($FF, $FF, $FF,  $66);
   474                                  Tint($FF, $FF, $FF,  $66);
   475                                DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
   475                                  DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
   476                            end
   476                                  end
   477                            else if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team = CurrentTeam)) or (Gear^.State = 2)) then
   477                              else if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team = CurrentTeam)) or (Gear^.State = 2)) then
   478                                DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   478                                  DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   479                        end;
   479                              end;
   480             vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   480             vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   481             vgtHealthTag: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   481             vgtHealthTag: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   482             vgtHealth: begin
   482             vgtHealth: begin
   483                        tinted:= true;
   483                        tinted:= true;
   484                        case Gear^.Frame div 10 of
   484                        case Gear^.Frame div 10 of
   486                            1:Tint($FF, 0, 0, round(Gear^.FrameTicks * $FF / 1000));
   486                            1:Tint($FF, 0, 0, round(Gear^.FrameTicks * $FF / 1000));
   487                        end;
   487                        end;
   488                        DrawSprite(sprHealth, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, 0);
   488                        DrawSprite(sprHealth, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, 0);
   489                        end;
   489                        end;
   490         end;
   490         end;
       
   491         if (cReducedQuality and rqAntiBoom) = 0 then
       
   492             case Gear^.Kind of
       
   493                 vgtChunk: DrawRotatedF(sprChunk, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
       
   494             end;
   491         if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
   495         if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
   492         Gear:= Gear^.NextGear
   496         Gear:= Gear^.NextGear
   493        end;
   497        end;
   494     // this level is outside the screen when stereo
   498     // this layer is outside the screen when stereo
   495     2: while Gear <> nil do
   499     2: while Gear <> nil do
   496         begin
   500         begin
   497         tinted:= false;
   501         tinted:= false;
   498         if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
   502         if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
   499         case Gear^.Kind of
   503         case Gear^.Kind of
   501             vgtBigExplosion: begin
   505             vgtBigExplosion: begin
   502                              tinted:= true;
   506                              tinted:= true;
   503                              Tint($FF, $FF, $FF, round($FF * (1 - power(Gear^.Timer / 250, 4))));
   507                              Tint($FF, $FF, $FF, round($FF * (1 - power(Gear^.Timer / 250, 4))));
   504                              DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -10 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
   508                              DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -10 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
   505                              end;
   509                              end;
   506             end;
   510         end;
   507         if (cReducedQuality and rqAntiBoom) = 0 then
   511         if (cReducedQuality and rqAntiBoom) = 0 then
   508             case Gear^.Kind of
   512             case Gear^.Kind of
   509                 vgtExplPart: DrawSprite(sprExplPart, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   513                 vgtExplPart: DrawSprite(sprExplPart, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   510                 vgtExplPart2: DrawSprite(sprExplPart2, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   514                 vgtExplPart2: DrawSprite(sprExplPart2, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   511                 vgtBubble: DrawSprite(sprBubbles, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);//(RealTicks div 64 + Gear^.Frame) mod 8);
       
   512                 vgtSteam: DrawSprite(sprSmokeWhite, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   515                 vgtSteam: DrawSprite(sprSmokeWhite, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
   513                 vgtAmmo: begin
   516                 vgtAmmo: begin
   514                         tinted:= true;
   517                          tinted:= true;
   515                         Tint($FF, $FF, $FF, round(Gear^.alpha * $FF));
   518                          Tint($FF, $FF, $FF, round(Gear^.alpha * $FF));
   516                         DrawTextureF(ropeIconTex, Gear^.scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 32, 32);
   519                          DrawTextureF(ropeIconTex, Gear^.scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 32, 32);
   517                         DrawTextureF(SpritesData[sprAMAmmos].Texture, Gear^.scale * 0.90, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame - 1, 1, 32, 32);
   520                          DrawTextureF(SpritesData[sprAMAmmos].Texture, Gear^.scale * 0.90, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame - 1, 1, 32, 32);
   518                         end;
   521                          end;
   519                 vgtShell: begin
   522                 vgtShell: begin
   520                             if Gear^.FrameTicks < $FF then
   523                           if Gear^.FrameTicks < $FF then
   521                                 begin
   524                               begin
   522                                 Tint($FF, $FF, $FF, Gear^.FrameTicks);
   525                               Tint($FF, $FF, $FF, Gear^.FrameTicks);
   523                                 tinted:= true
   526                               tinted:= true
   524                                 end;
   527                               end;
   525                             DrawRotatedF(sprShell, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   528                           DrawRotatedF(sprShell, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   526                             end;
   529                           end;
   527                 vgtFeather: begin
   530                 vgtFeather: begin
   528                             if Gear^.FrameTicks < 255 then
   531                             if Gear^.FrameTicks < 255 then
   529                                 begin
   532                                 begin
   530                                 Tint($FF, $FF, $FF, Gear^.FrameTicks);
   533                                 Tint($FF, $FF, $FF, Gear^.FrameTicks);
   531                                 tinted:= true
   534                                 tinted:= true
   532                                 end;
   535                                 end;
   533                             DrawRotatedF(sprFeather, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   536                             DrawRotatedF(sprFeather, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   534                           end;
   537                           end;
   535                 vgtEgg: begin
   538                 vgtEgg: begin
   536                             if Gear^.FrameTicks < $FF then
   539                         if Gear^.FrameTicks < $FF then
   537                                 begin
   540                             begin
   538                                 Tint($FF, $FF, $FF, Gear^.FrameTicks);
   541                                 Tint($FF, $FF, $FF, Gear^.FrameTicks);
   539                                 tinted:= true
   542                                 tinted:= true
   540                                 end;
       
   541                             DrawRotatedF(sprEgg, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
       
   542                             end;
   543                             end;
   543                vgtBeeTrace: begin
   544                         DrawRotatedF(sprEgg, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   544                             if Gear^.FrameTicks < $FF then
   545                         end;
   545                                 Tint($FF, $FF, $FF, Gear^.FrameTicks div 2)
   546                 vgtBeeTrace: begin
   546                             else
   547                              if Gear^.FrameTicks < $FF then
   547                                 Tint($FF, $FF, $FF, $80);
   548                                  Tint($FF, $FF, $FF, Gear^.FrameTicks div 2)
   548                             tinted:= true;
   549                              else
   549                             DrawRotatedF(sprBeeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, (RealTicks shr 4) mod cMaxAngle);
   550                                  Tint($FF, $FF, $FF, $80);
   550                             end;
   551                              tinted:= true;
       
   552                              DrawRotatedF(sprBeeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, (RealTicks shr 4) mod cMaxAngle);
       
   553                              end;
   551                 vgtSmokeRing: begin
   554                 vgtSmokeRing: begin
   552                             tinted:= true;
   555                               tinted:= true;
   553                             Tint($FF, $FF, $FF, round(Gear^.alpha * $FF));
   556                               Tint($FF, $FF, $FF, round(Gear^.alpha * $FF));
   554                             DrawRotatedTextureF(SpritesData[sprSmokeRing].Texture, Gear^.scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 200, 200, Gear^.Angle);
   557                               DrawRotatedTextureF(SpritesData[sprSmokeRing].Texture, Gear^.scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 200, 200, Gear^.Angle);
   555                             end;
   558                               end;
   556                  vgtNote: DrawRotatedF(sprNote, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   559                 vgtNote: DrawRotatedF(sprNote, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   557                 vgtBulletHit: DrawRotatedF(sprBulletHit, round(Gear^.X) + WorldDx - 0, round(Gear^.Y) + WorldDy - 0, 7 - (Gear^.FrameTicks div 50), 1, Gear^.Angle);
   560                 vgtBulletHit: DrawRotatedF(sprBulletHit, round(Gear^.X) + WorldDx - 0, round(Gear^.Y) + WorldDy - 0, 7 - (Gear^.FrameTicks div 50), 1, Gear^.Angle);
   558             end;
   561             end;
   559         case Gear^.Kind of
   562         case Gear^.Kind of
   560             vgtCircle:  if gear^.Angle = 1 then 
   563             vgtCircle: if gear^.Angle = 1 then
   561                             begin
   564                            begin
   562                             tmp:= Gear^.State / 100;
   565                            tmp:= Gear^.State / 100;
   563                             DrawTexture(round(Gear^.X-24*tmp) + WorldDx, round(Gear^.Y-24*tmp) + WorldDy, SpritesData[sprVampiric].Texture, tmp)
   566                            DrawTexture(round(Gear^.X-24*tmp) + WorldDx, round(Gear^.Y-24*tmp) + WorldDy, SpritesData[sprVampiric].Texture, tmp)
   564                             end
   567                            end
   565                         else DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer);
   568                        else DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer);
   566         end;
   569         end;
   567         if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
   570         if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
   568         Gear:= Gear^.NextGear
   571         Gear:= Gear^.NextGear
   569         end
   572        end
   570     end;
   573     end;
   571 end;
   574 end;
   572 
   575 
   573 function  VisualGearByUID(uid : Longword) : PVisualGear;
   576 function  VisualGearByUID(uid : Longword) : PVisualGear;
   574 var vg: PVisualGear;
   577 var vg: PVisualGear;