hedgewars/uVisualGears.pas
changeset 6999 486db9d26e4b
parent 6986 409dd3851309
child 7028 0f60591f3a16
equal deleted inserted replaced
6998:f2524a80eea2 6999:486db9d26e4b
   583                              begin
   583                              begin
   584                              if SuddenDeathDmg then
   584                              if SuddenDeathDmg then
   585                                  if vobSDVelocity = 0 then
   585                                  if vobSDVelocity = 0 then
   586                                      DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   586                                      DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   587                                  else
   587                                  else
   588                                      DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   588                                      DrawSpriteRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   589                              else
   589                              else
   590                                  if vobVelocity = 0 then
   590                                  if vobVelocity = 0 then
   591                                      DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   591                                      DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   592                                  else
   592                                  else
   593                                      DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   593                                      DrawSpriteRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   594                              end
   594                              end
   595                          else
   595                          else
   596                              begin
   596                              begin
   597                              if SuddenDeathDmg then
   597                              if SuddenDeathDmg then
   598                                  if vobSDVelocity = 0 then
   598                                  if vobSDVelocity = 0 then
   599                                      DrawTextureF(SpritesData[sprSDFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   599                                      DrawTextureF(SpritesData[sprSDFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   600                                  else
   600                                  else
   601                                      DrawRotatedTextureF(SpritesData[sprSDFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle)
   601                                      DrawTextureRotatedF(SpritesData[sprSDFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle)
   602                              else
   602                              else
   603                                  if vobVelocity = 0 then
   603                                  if vobVelocity = 0 then
   604                                      DrawTextureF(SpritesData[sprFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   604                                      DrawTextureF(SpritesData[sprFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   605                                  else
   605                                  else
   606                                      DrawRotatedTextureF(SpritesData[sprFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle)
   606                                      DrawTextureRotatedF(SpritesData[sprFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle)
   607                              end;
   607                              end;
   608                end;
   608                end;
   609            if Gear^.Tint <> $FFFFFFFF then
   609            if Gear^.Tint <> $FFFFFFFF then
   610                Tint($FF,$FF,$FF,$FF);
   610                Tint($FF,$FF,$FF,$FF);
   611            Gear:= Gear^.NextGear
   611            Gear:= Gear^.NextGear
   622           case Gear^.Kind of
   622           case Gear^.Kind of
   623               vgtFlake: if SuddenDeathDmg then
   623               vgtFlake: if SuddenDeathDmg then
   624                              if vobSDVelocity = 0 then
   624                              if vobSDVelocity = 0 then
   625                                  DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   625                                  DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   626                              else
   626                              else
   627                                  DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   627                                  DrawSpriteRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   628                          else
   628                          else
   629                              if vobVelocity = 0 then
   629                              if vobVelocity = 0 then
   630                                  DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   630                                  DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   631                              else
   631                              else
   632                                  DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   632                                  DrawSpriteRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   633               vgtSmokeTrace: if Gear^.State < 8 then
   633               vgtSmokeTrace: if Gear^.State < 8 then
   634                   DrawSprite(sprSmokeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   634                   DrawSprite(sprSmokeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   635               vgtEvilTrace: if Gear^.State < 8 then
   635               vgtEvilTrace: if Gear^.State < 8 then
   636                   DrawSprite(sprEvilTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   636                   DrawSprite(sprEvilTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
   637               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));
   637               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));
   678 (*
   678 (*
   679               vgtFlake: if SuddenDeathDmg then
   679               vgtFlake: if SuddenDeathDmg then
   680                              if vobSDVelocity = 0 then
   680                              if vobSDVelocity = 0 then
   681                                  DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   681                                  DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   682                              else
   682                              else
   683                                  DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   683                                  DrawSpriteRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   684                          else
   684                          else
   685                              if vobVelocity = 0 then
   685                              if vobVelocity = 0 then
   686                                  DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   686                                  DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   687                              else
   687                              else
   688                                  DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);*)
   688                                  DrawSpriteRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);*)
   689                vgtSpeechBubble: begin
   689                vgtSpeechBubble: begin
   690                                 if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then
   690                                 if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then
   691                                     begin
   691                                     begin
   692                                     tinted:= true;
   692                                     tinted:= true;
   693                                     Tint($FF, $FF, $FF,  $66);
   693                                     Tint($FF, $FF, $FF,  $66);
   694                                     DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
   694                                     DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
   695                                     end
   695                                     end
   696                                 else if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team = CurrentTeam)) or (Gear^.State = 2)) then
   696                                 else if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team = CurrentTeam)) or (Gear^.State = 2)) then
   697                                     DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   697                                     DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   698                                 end;
   698                                 end;
   699                vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   699                vgtSmallDamageTag: DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
   700                vgtHealthTag: if Gear^.Tex <> nil then 
   700                vgtHealthTag: if Gear^.Tex <> nil then 
   701                                begin
   701                                begin
   702                                if Gear^.Frame = 0 then 
   702                                if Gear^.Frame = 0 then 
   703                                    DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
   703                                    DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
   704                                else
   704                                else
   705                                    begin
   705                                    begin
   706                                    SetScale(cDefaultZoomLevel);
   706                                    SetScale(cDefaultZoomLevel);
   707                                    if Gear^.Angle = 0 then
   707                                    if Gear^.Angle = 0 then
   708                                        DrawTexture(round(Gear^.X), round(Gear^.Y), Gear^.Tex)
   708                                        DrawTexture(round(Gear^.X), round(Gear^.Y), Gear^.Tex)
   714                vgtStraightShot: begin 
   714                vgtStraightShot: begin 
   715                                 if Gear^.dX < 0 then
   715                                 if Gear^.dX < 0 then
   716                                     i:= -1
   716                                     i:= -1
   717                                 else
   717                                 else
   718                                     i:= 1;
   718                                     i:= 1;
   719                                 DrawRotatedTextureF(SpritesData[TSprite(Gear^.State)].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, i, SpritesData[TSprite(Gear^.State)].Width, SpritesData[TSprite(Gear^.State)].Height, Gear^.Angle);
   719                                 DrawTextureRotatedF(SpritesData[TSprite(Gear^.State)].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, i, SpritesData[TSprite(Gear^.State)].Width, SpritesData[TSprite(Gear^.State)].Height, Gear^.Angle);
   720                                 end;
   720                                 end;
   721            end;
   721            end;
   722            if (cReducedQuality and rqAntiBoom) = 0 then
   722            if (cReducedQuality and rqAntiBoom) = 0 then
   723                case Gear^.Kind of
   723                case Gear^.Kind of
   724                    vgtChunk: DrawRotatedF(sprChunk, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   724                    vgtChunk: DrawSpriteRotatedF(sprChunk, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   725                end;
   725                end;
   726            if (Gear^.Tint <> $FFFFFFFF) or tinted then
   726            if (Gear^.Tint <> $FFFFFFFF) or tinted then
   727                Tint($FF,$FF,$FF,$FF);
   727                Tint($FF,$FF,$FF,$FF);
   728            Gear:= Gear^.NextGear
   728            Gear:= Gear^.NextGear
   729            end
   729            end
   739            case Gear^.Kind of
   739            case Gear^.Kind of
   740                vgtExplosion: DrawSprite(sprExplosion50, round(Gear^.X) - 32 + WorldDx, round(Gear^.Y) - 32 + WorldDy, Gear^.State);
   740                vgtExplosion: DrawSprite(sprExplosion50, round(Gear^.X) - 32 + WorldDx, round(Gear^.Y) - 32 + WorldDy, Gear^.State);
   741                vgtBigExplosion: begin
   741                vgtBigExplosion: begin
   742                                 tinted:= true;
   742                                 tinted:= true;
   743                                 Tint($FF, $FF, $FF, round($FF * (1 - power(Gear^.Timer / 250, 4))));
   743                                 Tint($FF, $FF, $FF, round($FF * (1 - power(Gear^.Timer / 250, 4))));
   744                                 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);
   744                                 DrawTextureRotatedF(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);
   745                                 end;
   745                                 end;
   746            end;
   746            end;
   747            if (cReducedQuality and rqAntiBoom) = 0 then
   747            if (cReducedQuality and rqAntiBoom) = 0 then
   748                case Gear^.Kind of
   748                case Gear^.Kind of
   749                    vgtExplPart: DrawSprite(sprExplPart, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   749                    vgtExplPart: DrawSprite(sprExplPart, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame);
   759                              if Gear^.FrameTicks < $FF then
   759                              if Gear^.FrameTicks < $FF then
   760                                  begin
   760                                  begin
   761                                  Tint($FF, $FF, $FF, Gear^.FrameTicks);
   761                                  Tint($FF, $FF, $FF, Gear^.FrameTicks);
   762                                  tinted:= true
   762                                  tinted:= true
   763                                  end;
   763                                  end;
   764                              DrawRotatedF(sprShell, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   764                              DrawSpriteRotatedF(sprShell, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   765                              end;
   765                              end;
   766                    vgtFeather: begin
   766                    vgtFeather: begin
   767                                if Gear^.FrameTicks < 255 then
   767                                if Gear^.FrameTicks < 255 then
   768                                    begin
   768                                    begin
   769                                    Tint($FF, $FF, $FF, Gear^.FrameTicks);
   769                                    Tint($FF, $FF, $FF, Gear^.FrameTicks);
   770                                    tinted:= true
   770                                    tinted:= true
   771                                    end;
   771                                    end;
   772                                DrawRotatedF(sprFeather, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   772                                DrawSpriteRotatedF(sprFeather, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   773                              end;
   773                              end;
   774                    vgtEgg: DrawRotatedF(sprEgg, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   774                    vgtEgg: DrawSpriteRotatedF(sprEgg, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   775                    vgtBeeTrace: begin
   775                    vgtBeeTrace: begin
   776                                 if Gear^.FrameTicks < $FF then
   776                                 if Gear^.FrameTicks < $FF then
   777                                     Tint($FF, $FF, $FF, Gear^.FrameTicks div 2)
   777                                     Tint($FF, $FF, $FF, Gear^.FrameTicks div 2)
   778                                 else
   778                                 else
   779                                     Tint($FF, $FF, $FF, $80);
   779                                     Tint($FF, $FF, $FF, $80);
   780                                 tinted:= true;
   780                                 tinted:= true;
   781                                 DrawRotatedF(sprBeeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, (RealTicks shr 4) mod cMaxAngle);
   781                                 DrawSpriteRotatedF(sprBeeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, (RealTicks shr 4) mod cMaxAngle);
   782                                 end;
   782                                 end;
   783                    vgtSmokeRing: begin
   783                    vgtSmokeRing: begin
   784                                  tinted:= true;
   784                                  tinted:= true;
   785                                  Tint($FF, $FF, $FF, round(Gear^.alpha * $FF));
   785                                  Tint($FF, $FF, $FF, round(Gear^.alpha * $FF));
   786                                  DrawRotatedTextureF(SpritesData[sprSmokeRing].Texture, Gear^.scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 200, 200, Gear^.Angle);
   786                                  DrawTextureRotatedF(SpritesData[sprSmokeRing].Texture, Gear^.scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 200, 200, Gear^.Angle);
   787                                  end;
   787                                  end;
   788                    vgtNote: DrawRotatedF(sprNote, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   788                    vgtNote: DrawSpriteRotatedF(sprNote, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
   789                    vgtBulletHit: DrawRotatedF(sprBulletHit, round(Gear^.X) + WorldDx - 0, round(Gear^.Y) + WorldDy - 0, 7 - (Gear^.FrameTicks div 50), 1, Gear^.Angle);
   789                    vgtBulletHit: DrawSpriteRotatedF(sprBulletHit, round(Gear^.X) + WorldDx - 0, round(Gear^.Y) + WorldDy - 0, 7 - (Gear^.FrameTicks div 50), 1, Gear^.Angle);
   790                end;
   790                end;
   791            case Gear^.Kind of
   791            case Gear^.Kind of
   792                vgtFlake: if SuddenDeathDmg then
   792                vgtFlake: if SuddenDeathDmg then
   793                              if vobSDVelocity = 0 then
   793                              if vobSDVelocity = 0 then
   794                                  DrawTextureF(SpritesData[sprSDFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   794                                  DrawTextureF(SpritesData[sprSDFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   795                              else
   795                              else
   796                                  DrawRotatedTextureF(SpritesData[sprSDFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle)
   796                                  DrawTextureRotatedF(SpritesData[sprSDFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle)
   797                          else
   797                          else
   798                              if vobVelocity = 0 then
   798                              if vobVelocity = 0 then
   799                                  DrawTextureF(SpritesData[sprFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   799                                  DrawTextureF(SpritesData[sprFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   800                              else
   800                              else
   801                                  DrawRotatedTextureF(SpritesData[sprFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle);
   801                                  DrawTextureRotatedF(SpritesData[sprFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle);
   802                vgtCircle: if gear^.Angle = 1 then
   802                vgtCircle: if gear^.Angle = 1 then
   803                               begin
   803                               begin
   804                               tmp:= Gear^.State / 100;
   804                               tmp:= Gear^.State / 100;
   805                               DrawTexture(round(Gear^.X-24*tmp) + WorldDx, round(Gear^.Y-24*tmp) + WorldDy, SpritesData[sprVampiric].Texture, tmp)
   805                               DrawTexture(round(Gear^.X-24*tmp) + WorldDx, round(Gear^.Y-24*tmp) + WorldDy, SpritesData[sprVampiric].Texture, tmp)
   806                               end
   806                               end
   826                             DrawTextureF(SpritesData[sprCloud].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 2, SpritesData[sprCloud].Width, SpritesData[sprCloud].Height);
   826                             DrawTextureF(SpritesData[sprCloud].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 2, SpritesData[sprCloud].Width, SpritesData[sprCloud].Height);
   827               vgtFlake: if SuddenDeathDmg then
   827               vgtFlake: if SuddenDeathDmg then
   828                             if vobSDVelocity = 0 then
   828                             if vobSDVelocity = 0 then
   829                                 DrawTextureF(SpritesData[sprSDFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   829                                 DrawTextureF(SpritesData[sprSDFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   830                             else
   830                             else
   831                                 DrawRotatedTextureF(SpritesData[sprSDFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle)
   831                                 DrawTextureRotatedF(SpritesData[sprSDFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle)
   832                         else
   832                         else
   833                             if vobVelocity = 0 then
   833                             if vobVelocity = 0 then
   834                                 DrawTextureF(SpritesData[sprFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   834                                 DrawTextureF(SpritesData[sprFlake].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height)
   835                             else
   835                             else
   836                                 DrawRotatedTextureF(SpritesData[sprFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle);
   836                                 DrawTextureRotatedF(SpritesData[sprFlake].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle);
   837             end;
   837             end;
   838             if (Gear^.Tint <> $FFFFFFFF) then
   838             if (Gear^.Tint <> $FFFFFFFF) then
   839                 Tint($FF,$FF,$FF,$FF);
   839                 Tint($FF,$FF,$FF,$FF);
   840             Gear:= Gear^.NextGear
   840             Gear:= Gear^.NextGear
   841             end
   841             end
   854                             DrawSprite(sprCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame);
   854                             DrawSprite(sprCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame);
   855               vgtFlake: if SuddenDeathDmg then
   855               vgtFlake: if SuddenDeathDmg then
   856                             if vobSDVelocity = 0 then
   856                             if vobSDVelocity = 0 then
   857                                 DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   857                                 DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   858                             else
   858                             else
   859                                 DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   859                                 DrawSpriteRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   860                           else
   860                           else
   861                             if vobVelocity = 0 then
   861                             if vobVelocity = 0 then
   862                                 DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   862                                 DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   863                             else
   863                             else
   864                                 DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   864                                 DrawSpriteRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   865                 end;
   865                 end;
   866             if (Gear^.Tint <> $FFFFFFFF) then
   866             if (Gear^.Tint <> $FFFFFFFF) then
   867                 Tint($FF,$FF,$FF,$FF);
   867                 Tint($FF,$FF,$FF,$FF);
   868             Gear:= Gear^.NextGear
   868             Gear:= Gear^.NextGear
   869             end
   869             end
   878             case Gear^.Kind of
   878             case Gear^.Kind of
   879                 vgtFlake: if SuddenDeathDmg then
   879                 vgtFlake: if SuddenDeathDmg then
   880                             if vobSDVelocity = 0 then
   880                             if vobSDVelocity = 0 then
   881                                 DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   881                                 DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   882                             else
   882                             else
   883                                 DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   883                                 DrawSpriteRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle)
   884                           else
   884                           else
   885                             if vobVelocity = 0 then
   885                             if vobVelocity = 0 then
   886                                 DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   886                                 DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
   887                             else
   887                             else
   888                                 DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   888                                 DrawSpriteRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
   889                 end;
   889                 end;
   890             if (Gear^.Tint <> $FFFFFFFF) then
   890             if (Gear^.Tint <> $FFFFFFFF) then
   891                 Tint($FF,$FF,$FF,$FF);
   891                 Tint($FF,$FF,$FF,$FF);
   892             Gear:= Gear^.NextGear
   892             Gear:= Gear^.NextGear
   893             end
   893             end