diff options
author | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-12-20 03:33:14 +0000 |
---|---|---|
committer | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-12-20 03:33:14 +0000 |
commit | 7d61a98f807803a337fd12342c29eb0f5f69fc76 (patch) | |
tree | cbd759f06ca19ec49d95af10ea5362798d4d38a4 /Game/Code/Classes/UMain.pas | |
parent | cdfdd0ea3fa2eb92893db46c158cf61b7a9411d7 (diff) | |
download | usdx-7d61a98f807803a337fd12342c29eb0f5f69fc76.tar.gz usdx-7d61a98f807803a337fd12342c29eb0f5f69fc76.tar.xz usdx-7d61a98f807803a337fd12342c29eb0f5f69fc76.zip |
made USDX function when file paths differ from previous expectations..
( most of the software was still using hard coded paths )
also added ability to have multiple song directories.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@735 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UMain.pas')
-rw-r--r-- | Game/Code/Classes/UMain.pas | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas index 18bed197..06c4824a 100644 --- a/Game/Code/Classes/UMain.pas +++ b/Game/Code/Classes/UMain.pas @@ -86,12 +86,17 @@ var SongPath: string; LogPath: string; ThemePath: string; + SkinsPath: string; ScreenshotsPath: string; CoversPath: string; LanguagesPath: string; PluginPath: string; PlayListPath: string; + UserSongPath: string = ''; + UserCoversPath: string = ''; + UserPlaylistPath: string = ''; + OGL: Boolean; Done: Boolean; Event: TSDL_event; @@ -246,7 +251,7 @@ begin // Theme Log.BenchmarkStart(1); Log.LogStatus('Load Themes', 'Initialization'); - Theme := TTheme.Create('Themes\' + ITheme[Ini.Theme] + '.ini', Ini.Color); + Theme := TTheme.Create(ThemePath + ITheme[Ini.Theme] + '.ini', Ini.Color); Log.BenchmarkEnd(1); Log.LogBenchmark('Loading Themes', 1); @@ -1023,17 +1028,24 @@ procedure InitializePaths; begin - GamePath := Platform.GetGamePath; - - initialize_path( LogPath , GamePath ); - initialize_path( SoundPath , GamePath + 'Sounds' + PathDelim ); - initialize_path( SongPath , GamePath + 'Songs' + PathDelim ); - initialize_path( ThemePath , GamePath + 'Themes' + PathDelim ); - initialize_path( ScreenshotsPath , GamePath + 'Screenshots' + PathDelim ); - initialize_path( CoversPath , GamePath + 'Covers' + PathDelim ); - initialize_path( LanguagesPath , GamePath + 'Languages' + PathDelim ); - initialize_path( PluginPath , GamePath + 'Plugins' + PathDelim ); - initialize_path( PlaylistPath , GamePath + 'Playlists' + PathDelim ); + initialize_path( LogPath , Platform.GetLogPath ); + initialize_path( SoundPath , Platform.GetGameSharedPath + 'Sounds' + PathDelim ); + initialize_path( ThemePath , Platform.GetGameSharedPath + 'Themes' + PathDelim ); + initialize_path( SkinsPath , Platform.GetGameSharedPath + 'Skins' + PathDelim ); + initialize_path( LanguagesPath , Platform.GetGameSharedPath + 'Languages' + PathDelim ); + initialize_path( PluginPath , Platform.GetGameSharedPath + 'Plugins' + PathDelim ); + + initialize_path( ScreenshotsPath , Platform.GetGameUserPath + 'Screenshots' + PathDelim ); + + // Users Song Path .... + initialize_path( UserSongPath , Platform.GetGameUserPath + 'Songs' + PathDelim ); + initialize_path( UserCoversPath , Platform.GetGameUserPath + 'Covers' + PathDelim ); + initialize_path( UserPlaylistPath , Platform.GetGameUserPath + 'Playlists' + PathDelim ); + + // Shared Song Path .... + initialize_path( SongPath , Platform.GetGameSharedPath + 'Songs' + PathDelim ); + initialize_path( CoversPath , Platform.GetGameSharedPath + 'Covers' + PathDelim ); + initialize_path( PlaylistPath , Platform.GetGameSharedPath + 'Playlists' + PathDelim ); DecimalSeparator := ','; end; |