Ignore:
Timestamp:
May 7, 2020, 12:46:55 AM (5 years ago)
Author:
chronos
Message:
  • Added: New Global unit with global constants.
  • Modified: Multiple occurence of string constants used for subdirectories replaced by functions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/Directories.pas

    r169 r189  
    1010
    1111function LocalizedFilePath(const Path: string): string;
    12 procedure InitUnit;
     12procedure UnitInit;
    1313function GetSavedDir(Home: Boolean = False): string;
    1414function GetMapsDir(Home: Boolean = False): string;
     15function GetGraphicsDir: string;
     16function GetSoundsDir: string;
    1517
    1618
     
    3032
    3133  if Lang = '' then begin
    32       for i := 1 to Paramcount - 1 do
    33         if (ParamStrUTF8(i) = '--LANG') or (ParamStrUTF8(i) = '-l') or
    34           (ParamStrUTF8(i) = '--lang') then
     34    for i := 1 to Paramcount - 1 do
     35      if (ParamStrUTF8(i) = '--LANG') or (ParamStrUTF8(i) = '-l') or
     36        (ParamStrUTF8(i) = '--lang') then
    3537          Lang := ParamStrUTF8(i + 1);
    3638  end;
     
    5961end;
    6062
    61 procedure InitUnit;
     63procedure UnitInit;
    6264var
    6365  AppDataDir: string;
     
    113115end;
    114116
     117function GetGraphicsDir: string;
     118begin
     119  Result := HomeDir + 'Graphics';
     120end;
     121
     122function GetSoundsDir: string;
     123begin
     124  Result := HomeDir + 'Sounds';
     125end;
     126
    115127end.
Note: See TracChangeset for help on using the changeset viewer.