Changeset 275 for trunk/UGame.pas


Ignore:
Timestamp:
Feb 3, 2019, 11:28:03 PM (6 years ago)
Author:
chronos
Message:
  • Added: New forms for game systems management.
  • Added: Allow to load/save game system from/to file system as .xts file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGame.pas

    r274 r275  
    2424    class procedure PolygonEx(Canvas: TCanvas; const Points: array of Classes.TPoint; Winding: Boolean);
    2525    class procedure PolyLineEx(Canvas: TCanvas; const Points: array of Classes.TPoint);
    26     class procedure Ellipse(Canvas: TCanvas; const ARect: TRect);
     26    class procedure EllipseEx(Canvas: TCanvas; const ARect: TRect);
    2727  end;
    2828
     
    8787    StoredRandSeed: Cardinal;
    8888    GeneratePlayers: Boolean;
     89    GameSystemName: string;
    8990    procedure PostConfig;
    9091    procedure Assign(Source: TGame);
     
    192193end;
    193194
    194 class procedure TCanvasEx.Ellipse(Canvas: TCanvas; const ARect: TRect);
     195class procedure TCanvasEx.EllipseEx(Canvas: TCanvas; const ARect: TRect);
    195196begin
    196197  LCLIntf.Ellipse(Canvas.Handle, ARect.P1.X, ARect.P1.Y, ARect.P2.X, ARect.P2.Y);
     
    526527    SetValue(DOMString(Path + '/MaxPower'), MaxPower);
    527528    Players.SaveConfig(Config, Path + '/Players');
    528     GameSystem.SaveConfig(Config, Path + '/GameSystem');
     529    SetValue(DOMString(Path + '/GameSystemName'), DOMString(GameSystemName));
    529530  end;
    530531end;
     
    565566    MaxPower := GetValue(DOMString(Path + '/MaxPower'), 99);
    566567    Players.LoadConfig(Config, Path + '/Players');
    567     GameSystem.LoadConfig(Config, Path + '/GameSystem');
     568    GameSystemName := string(GetValue(DOMString(Path + '/GameSystemName'), DOMString('')));
    568569  end;
    569570end;
     
    788789  R: Boolean;
    789790  I: Integer;
    790   PlayersCount: Integer;
    791791begin
    792792  Winner := nil;
Note: See TracChangeset for help on using the changeset viewer.