Ignore:
Timestamp:
Mar 8, 2021, 10:11:47 PM (4 years ago)
Author:
chronos
Message:
  • Modified: CevoTribeExt string defined on single place.
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Tribes.pas

    r300 r301  
    55
    66uses
    7   Protocol, ScreenTools, LazFileUtils, Classes, Graphics, SysUtils;
     7  Protocol, ScreenTools, LazFileUtils, Classes, Graphics, SysUtils, Global;
    88
    99type
     
    4949{$IFNDEF SCR} function TString(Template: string): string;
    5050    function TPhrase(Item: string): string; {$ENDIF}
    51     procedure SetModelPicture(const Info: TModelPictureInfo; IsNew: boolean);
     51    procedure SetModelPicture(const Info: TModelPictureInfo; IsNew: Boolean);
    5252    function ChooseModelPicture(var Picture: TModelPictureInfo;
    53       Code, Turn: Integer; ForceNew: boolean): boolean;
     53      Code, Turn: Integer; ForceNew: Boolean): Boolean;
    5454    procedure InitAge(Age: Integer);
    5555  protected
     
    6868function CityName(Founder: Integer): string;
    6969function ModelCode(const ModelInfo: TModelInfo): Integer;
    70 procedure FindStdModelPicture(code: Integer; var pix: Integer; var Name: string);
    71 function GetTribeInfo(FileName: string; var Name: string; var Color: TColor): boolean;
     70procedure FindStdModelPicture(Code: Integer; var pix: Integer; var Name: string);
     71function GetTribeInfo(FileName: string; var Name: string; var Color: TColor): Boolean;
    7272procedure FindPosition(HGr, x, y, xmax, ymax: Integer; Mark: TColor;
    7373  var xp, yp: Integer);
     
    231231end;
    232232
    233 procedure FindStdModelPicture(code: Integer; var pix: Integer; var Name: string);
     233procedure FindStdModelPicture(Code: Integer; var pix: Integer; var Name: string);
    234234var
    235235  i: Integer;
     
    239239    Input := StdUnitScript[i];
    240240    pix := GetNum;
    241     if code = GetNum then
     241    if Code = GetNum then
    242242    begin
    243243      Name := Get;
     
    249249
    250250function GetTribeInfo(FileName: string; var Name: string;
    251   var Color: TColor): boolean;
     251  var Color: TColor): Boolean;
    252252var
    253253  Found: Integer;
     
    258258  Found := 0;
    259259  AssignFile(TribeScript, LocalizedFilePath('Tribes' + DirectorySeparator +
    260     FileName + '.tribe.txt'));
     260    FileName + CevoTribeExt));
    261261  Reset(TribeScript);
    262262  while not EOF(TribeScript) do
     
    285285var
    286286  Line: Integer;
    287   Variant: char;
     287  Variant: Char;
    288288  Item: string;
    289289begin
     
    292292    Name[Variant] := '';
    293293  Script := TStringList.Create;
    294   Script.LoadFromFile(LocalizedFilePath('Tribes' + DirectorySeparator +
    295     FileName + '.tribe.txt'));
     294  Script.LoadFromFile(FileName);
    296295  CityLine0 := 0;
    297296  nCityLines := 0;
     
    476475end;
    477476
    478 procedure TTribe.SetModelPicture(const Info: TModelPictureInfo; IsNew: boolean);
     477procedure TTribe.SetModelPicture(const Info: TModelPictureInfo; IsNew: Boolean);
    479478var
    480479  i: Integer;
Note: See TracChangeset for help on using the changeset viewer.