Changeset 548 for trunk/Packages


Ignore:
Timestamp:
Apr 21, 2024, 10:57:18 AM (4 weeks ago)
Author:
chronos
Message:
  • Fixed: Bad unit drawing in battle dialog.
  • Modified: Code cleanup.
Location:
trunk/Packages
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/ButtonA.pas

    r531 r548  
    1212  private
    1313    FCaption: string;
    14     procedure SetCaption(Text: string);
     14    procedure SetCaption(Text: string); override;
    1515    procedure SetFont(const Font: TFont);
    1616  protected
  • trunk/Packages/CevoComponents/CevoComponents.lpk

    r468 r548  
    3131      <Other>
    3232        <CompilerMessages>
    33           <IgnoredMessages idx5024="True"/>
     33          <IgnoredMessages idx6058="True" idx5024="True"/>
    3434        </CompilerMessages>
    3535      </Other>
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r538 r548  
    542542          OriginalColor := DataPixel.PixelARGB and $FFFFFF;
    543543          if (OriginalColor = TransparentColor1) or (OriginalColor = TransparentColor2) then begin
    544             MaskPixel.PixelR := $FF;
    545             MaskPixel.PixelG := $FF;
    546             MaskPixel.PixelB := $FF;
    547             DataPixel.PixelR := 0;
    548             DataPixel.PixelG := 0;
    549             DataPixel.PixelB := 0;
     544            MaskPixel.PixelRGB := $ffffff;
     545            DataPixel.PixelRGB := 0;
    550546          end else begin
    551             MaskPixel.PixelR := 0;
    552             MaskPixel.PixelG := 0;
    553             MaskPixel.PixelB := 0;
     547            MaskPixel.PixelRGB := 0;
    554548          end;
    555549          DataPixel.NextPixel;
     
    10231017      if X < 0 then
    10241018        if Y < 0 then
    1025           R := round(sqrt(sqr(X) + sqr(Y)))
     1019          R := Round(Sqrt(Sqr(X) + Sqr(Y)))
    10261020        else if Y >= Height then
    1027           R := round(sqrt(sqr(X) + sqr(Y - (Height - 1))))
     1021          R := Round(Sqrt(Sqr(X) + Sqr(Y - (Height - 1))))
    10281022        else
    10291023          R := -X
    10301024      else if X >= Width then
    10311025        if Y < 0 then
    1032           R := round(sqrt(sqr(X - (Width - 1)) + sqr(Y)))
     1026          R := Round(sqrt(Sqr(X - (Width - 1)) + Sqr(Y)))
    10331027        else if Y >= Height then
    1034           R := round(sqrt(sqr(X - (Width - 1)) + sqr(Y - (Height - 1))))
     1028          R := Round(Sqrt(Sqr(X - (Width - 1)) + Sqr(Y - (Height - 1))))
    10351029        else
    10361030          R := X - (Width - 1)
     
    16311625  TexWidth, TexHeight: Integer;
    16321626begin
    1633   // texturize background
     1627  // Texturize background
    16341628  Dest.BeginUpdate;
    16351629  TexWidth := Texture.Width;
     
    16391633  for Y := 0 to ScaleToNative(Dest.Height) - 1 do begin
    16401634    for X := 0 to ScaleToNative(Dest.Width) - 1 do begin
    1641       if (DstPixel.PixelARGB and $FFFFFF) = TransparentColor then begin
     1635      if DstPixel.PixelRGB = TransparentColor then begin
    16421636        SrcPixel.SetXY(X mod TexWidth, Y mod TexHeight);
    1643         DstPixel.PixelB := SrcPixel.PixelB;
    1644         DstPixel.PixelG := SrcPixel.PixelG;
    1645         DstPixel.PixelR := SrcPixel.PixelR;
     1637        DstPixel.PixelRGB := SrcPixel.PixelRGB;
    16461638      end;
    16471639      DstPixel.NextPixel;
  • trunk/Packages/DpiControls/Dpi.Graphics.pas

    r546 r548  
    290290  public
    291291    NativeBitmap: Graphics.TBitmap;
    292     procedure BeginUpdate;
    293     procedure EndUpdate;
    294292    constructor Create; override;
    295293    destructor Destroy; override;
     
    337335  published
    338336    procedure LoadFromFile(FileName: string);
    339     property Bitmpa: TBitmap read FBitmap write SetBitmap;
     337    property Bitmap: TBitmap read FBitmap write SetBitmap;
    340338  end;
    341339
     
    713711        DstPixelWidth := ScaleToNative(XX + 1) - ScaleToNative(XX);
    714712        for DstPixelX := 0 to DstPixelWidth - 1 do begin
    715           DstPtr.PixelB := SrcPtr.PixelB;
    716           DstPtr.PixelG := SrcPtr.PixelG;
    717           DstPtr.PixelR := SrcPtr.PixelR;
     713          DstPtr.PixelRGB := SrcPtr.PixelRGB;
    718714          DstPtr.NextPixel;
    719715        end;
     
    819815end;
    820816
    821 procedure TBitmap.BeginUpdate;
    822 begin
    823   GetNativeBitmap.BeginUpdate;
    824 end;
    825 
    826 procedure TBitmap.EndUpdate;
    827 begin
    828   GetNativeBitmap.EndUpdate;
    829 end;
    830 
    831817constructor TBitmap.Create;
    832818begin
  • trunk/Packages/DpiControls/DpiControls.lpk

    r482 r548  
    3030      <Other>
    3131        <CompilerMessages>
    32           <IgnoredMessages idx3123="True"/>
     32          <IgnoredMessages idx6058="True" idx3123="True"/>
    3333        </CompilerMessages>
    3434      </Other>
Note: See TracChangeset for help on using the changeset viewer.