Changeset 247 for trunk/UMap.pas


Ignore:
Timestamp:
Sep 22, 2018, 1:27:09 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Allow only meaningful sizes for cyclic maps.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UMap.pas

    r244 r247  
    134134  TMap = class
    135135  private
    136     FSize: TPoint;
    137136    function GetPixelRect: TRect;
    138137    function GetSize: TPoint; virtual;
    139138    function SearchDifferentCellArea(List: TCells; SourceArea,
    140139      DestArea: TMapArea): TCell;
    141     procedure SetSize(AValue: TPoint); virtual;
    142140  protected
     141    FSize: TPoint;
    143142    FPixelRect: TRect;
    144143    FNewCellId: Integer;
    145144    function GetNewCellId: Integer; virtual;
    146145    procedure SortNeighborsByAngle;
     146    procedure SetSize(AValue: TPoint); virtual;
    147147  public
    148148    Game: TObject; //TGame;
     
    563563  // Do not assign Game field
    564564  MaxPower := Source.MaxPower;
     565  Cyclic := Source.Cyclic;
    565566  Size := Source.Size;
    566567  DefaultCellSize := Source.DefaultCellSize;
    567568  Shape := Source.Shape;
    568569  Image.Picture.Bitmap.Assign(Source.Image.Picture.Bitmap);
    569   Cyclic := Source.Cyclic;
    570570
    571571  // TODO: How to copy cells
Note: See TracChangeset for help on using the changeset viewer.