Changeset 316 for trunk/UMapType.pas


Ignore:
Timestamp:
Jun 19, 2024, 11:53:06 PM (5 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UMapType.pas

    r281 r316  
    11unit UMapType;
    22
    3 {$mode delphi}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, XMLRead, XMLWrite, DOM, UGeometry, fgl, UMap;
     6  Classes, SysUtils, XMLRead, XMLWrite, DOM, UGeometry, UMap;
    97
    108type
     
    8381
    8482  TVoronoiMap = class(TMap)
    85   private
    8683  public
    8784    procedure Generate; override;
     
    189186  Angle: Double;
    190187begin
    191   Result := inherited CalculatePixelRect;
     188  Result := inherited;
    192189  Angle := 60 / 180 * Pi;
    193190  Shift := TPointF.Create(0.5, 0.5) * TPointF.Create(Cos(Angle), Sin(Angle));
     
    209206    Doc.Free;
    210207  end;
    211   inherited LoadFromFile(FileName);
     208  inherited;
    212209end;
    213210
     
    225222    Doc.Free;
    226223  end;
    227   inherited SaveToFile(FileName);
     224  inherited;
    228225end;
    229226
     
    346343function TIsometricMap.CalculatePixelRect: TRect;
    347344begin
    348   Result := inherited CalculatePixelRect;
     345  Result := inherited;
    349346  Result.P2 := Result.P2 - TPoint.Create(
    350347    Trunc(0.5 * DefaultCellSize.X / CellMulX),
     
    383380  Angle: Double;
    384381begin
    385   Result := inherited CalculatePixelRect;
     382  Result := inherited;
    386383  Angle := 30 / 180 * Pi;
    387384  Shift := TPointF.Create(0.5, 0.5) * TPointF.Create(Cos(Angle), Sin(Angle));
     
    423420    Doc.Free;
    424421  end;
    425   inherited LoadFromFile(FileName);
     422  inherited;
    426423end;
    427424
     
    439436    Doc.Free;
    440437  end;
    441   inherited SaveToFile(FileName);
     438  inherited;
    442439end;
    443440
     
    766763function TTriangleMap.CalculatePixelRect: TRect;
    767764begin
    768   Result := inherited CalculatePixelRect;
     765  Result := inherited;
    769766  Result.P2 := Result.P2 + TPoint.Create(
    770767    Trunc(- 0.25 * DefaultCellSize.X / CellMulX),
Note: See TracChangeset for help on using the changeset viewer.