Ignore:
Timestamp:
Mar 23, 2021, 3:09:11 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/IsoEngine.pas

    r322 r324  
    1414
    1515  TIsoMap = class
    16     constructor Create;
    17     procedure SetOutput(Output: TBitmap);
    18     procedure SetPaintBounds(Left, Top, Right, Bottom: integer);
    19     procedure Paint(x, y, Loc, nx, ny, CityLoc, CityOwner: integer;
    20       UseBlink: boolean = false; CityAllowClick: boolean = false);
    21     procedure PaintUnit(x, y: integer; const UnitInfo: TUnitInfo;
    22       Status: integer);
    23     procedure PaintCity(x, y: integer; const CityInfo: TCityInfo;
    24       accessory: boolean = true);
    25     procedure BitBltBitmap(Src: TBitmap; x, y, Width, Height, xSrc, ySrc,
    26       Rop: integer);
    27 
    28     procedure AttackBegin(const ShowMove: TShowMove);
    29     procedure AttackEffect(const ShowMove: TShowMove);
    30     procedure AttackEnd;
    31 
    3216  private
    3317    procedure CityGrid(xm, ym: integer; CityAllowClick: Boolean);
     
    3721  protected
    3822    FOutput: TBitmap;
    39     FLeft, FTop, FRight, FBottom, RealTop, RealBottom, AttLoc, DefLoc,
    40       DefHealth, FAdviceLoc: integer;
     23    FLeft: Integer;
     24    FTop: Integer;
     25    FRight: Integer;
     26    FBottom: Integer;
     27    RealTop: Integer;
     28    RealBottom: Integer;
     29    AttLoc: Integer;
     30    DefLoc: Integer;
     31    DefHealth: Integer;
     32    FAdviceLoc: Integer;
    4133    DataCanvas: TCanvas;
    4234    MaskCanvas: TCanvas;
     
    5345    procedure Sprite(HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: integer);
    5446    procedure TSprite(xDst, yDst, grix: integer; PureBlack: boolean = false);
    55 
    5647  public
     48    constructor Create;
     49    procedure SetOutput(Output: TBitmap);
     50    procedure SetPaintBounds(Left, Top, Right, Bottom: integer);
     51    procedure Paint(x, y, Loc, nx, ny, CityLoc, CityOwner: integer;
     52      UseBlink: boolean = false; CityAllowClick: boolean = false);
     53    procedure PaintUnit(x, y: integer; const UnitInfo: TUnitInfo;
     54      Status: integer);
     55    procedure PaintCity(x, y: integer; const CityInfo: TCityInfo;
     56      accessory: boolean = true);
     57    procedure BitBltBitmap(Src: TBitmap; x, y, Width, Height, xSrc, ySrc,
     58      Rop: integer);
     59    procedure AttackBegin(const ShowMove: TShowMove);
     60    procedure AttackEffect(const ShowMove: TShowMove);
     61    procedure AttackEnd;
    5762    property AdviceLoc: integer read FAdviceLoc write FAdviceLoc;
    5863  end;
     
    10361041        if BordersOK and (1 shl p1) = 0 then
    10371042        begin
    1038           // Clearing before BitBltBitmap SRCCOPY shouldn't be neccesary but for some
    1039           // reason without it code works different then under Delphi
    1040           Borders.Canvas.FillRect(Bounds(0, p1 * (yyt * 2), xxt * 2, yyt * 2));
    1041 
     1043          UnshareBitmap(Borders);
    10421044          BitBltCanvas(Borders.Canvas, 0, p1 * (yyt * 2), xxt * 2,
    10431045            yyt * 2, HGrTerrain.Data.Canvas,
Note: See TracChangeset for help on using the changeset viewer.