aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/USongs.pas
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-20 03:33:14 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-20 03:33:14 +0000
commit7d61a98f807803a337fd12342c29eb0f5f69fc76 (patch)
treecbd759f06ca19ec49d95af10ea5362798d4d38a4 /Game/Code/Classes/USongs.pas
parentcdfdd0ea3fa2eb92893db46c158cf61b7a9411d7 (diff)
downloadusdx-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/USongs.pas')
-rw-r--r--Game/Code/Classes/USongs.pas9
1 files changed, 7 insertions, 2 deletions
diff --git a/Game/Code/Classes/USongs.pas b/Game/Code/Classes/USongs.pas
index 3ac32dda..31db883d 100644
--- a/Game/Code/Classes/USongs.pas
+++ b/Game/Code/Classes/USongs.pas
@@ -265,7 +265,10 @@ begin
BrowsePos := 0;
// browse directories
BrowseDir(SongPath);
-
+
+ if UserSongPath <> SongPath then
+ BrowseDir(UserSongPath);
+
//Set Correct SongArray Length
SetLength(Song, BrowsePos);
@@ -306,6 +309,7 @@ var
i : Integer;
Files : TDirectoryEntryArray;
begin
+
Files := Platform.DirectoryFindFiles( Dir, '.txt', true);
for i := 0 to Length(Files)-1 do
begin
@@ -318,7 +322,8 @@ begin
SLen := BrowsePos;
Song[SLen].Path := Dir;
- Song[SLen].Folder := Copy(Dir, Length(SongPath)+1, 10000);
+// Song[SLen].Folder := Copy(Dir, Length(SongPath)+1, 10000);
+ Song[SLen].Folder := Copy(Dir, Length(Dir)+1, 10000);
Song[SLen].Folder := Copy(Song[SLen].Folder, 1, Pos( PathDelim , Song[SLen].Folder)-1);
Song[SLen].FileName := Files[i].Name;