2014-06-30 14:37:42 +00:00
|
|
|
unit Resources;
|
|
|
|
|
|
|
|
interface
|
|
|
|
const
|
|
|
|
AssetsPath = 'assets\';
|
2014-06-30 16:07:40 +00:00
|
|
|
AssetChivalryMedievalWarfareMapListFileName = 'Chivalry.MedievalWarfare.MapList.ini';
|
2014-07-01 21:18:07 +00:00
|
|
|
AssetMapPreviewPath = 'maps\';
|
|
|
|
AssetMapPreviewExtension = '.jpg';
|
2014-06-30 16:07:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
UserDataPath = 'Chivalry Server Launcher\';
|
|
|
|
UserGamesFileName = 'Games.json';
|
2014-06-30 14:37:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
function GetAssetPath(const AAsset: string): string;
|
2014-06-30 16:07:40 +00:00
|
|
|
function GetUserDataPath(const AAsset: string): string;
|
2014-06-30 14:37:42 +00:00
|
|
|
|
|
|
|
implementation
|
|
|
|
uses
|
2014-06-30 21:41:54 +00:00
|
|
|
System.SysUtils,
|
|
|
|
|
2014-06-30 14:37:42 +00:00
|
|
|
X2UtApp;
|
|
|
|
|
|
|
|
|
|
|
|
function GetAssetPath(const AAsset: string): string;
|
|
|
|
begin
|
2014-06-30 21:41:54 +00:00
|
|
|
Result := App.UserPath + UserDataPath + AssetsPath + AAsset;
|
|
|
|
|
|
|
|
if not FileExists(Result) then
|
|
|
|
Result := App.Path + AssetsPath + AAsset;
|
2014-06-30 14:37:42 +00:00
|
|
|
end;
|
|
|
|
|
2014-06-30 16:07:40 +00:00
|
|
|
|
|
|
|
function GetUserDataPath(const AAsset: string): string;
|
|
|
|
begin
|
|
|
|
Result := App.UserPath + UserDataPath + AAsset;
|
|
|
|
end;
|
|
|
|
|
2014-06-30 14:37:42 +00:00
|
|
|
end.
|