aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/USongs.pas
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-30 09:31:51 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-30 09:31:51 +0000
commitea92932825739b6d7f5ac1434382a1a59a0371fd (patch)
tree15c0807b5fdbe064a1a9a786a12d308650aeac61 /Game/Code/Classes/USongs.pas
parentbb4a6304aab5a215055813617130c01d91d80a83 (diff)
downloadusdx-ea92932825739b6d7f5ac1434382a1a59a0371fd.tar.gz
usdx-ea92932825739b6d7f5ac1434382a1a59a0371fd.tar.xz
usdx-ea92932825739b6d7f5ac1434382a1a59a0371fd.zip
- new acinerella.dll (based on 1.4)
- the song does not restart if you change the video gap in the editor while playing - some corrections in Blue Sensation theme; darker sing notes graphics - some bugfixes - max fps at ~200 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2425 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/USongs.pas')
-rw-r--r--Game/Code/Classes/USongs.pas44
1 files changed, 15 insertions, 29 deletions
diff --git a/Game/Code/Classes/USongs.pas b/Game/Code/Classes/USongs.pas
index f5b105be..3c6e147a 100644
--- a/Game/Code/Classes/USongs.pas
+++ b/Game/Code/Classes/USongs.pas
@@ -146,26 +146,22 @@ var
SR: TSearchRec; // for parsing Songs Directory
SLen: integer;
res: boolean;
+
begin
if FindFirst(Dir + '*', faDirectory, SR) = 0 then begin
repeat
if (SR.Name <> '.') and (SR.Name <> '..') then
- BrowseDir(Dir + Sr.Name + '\');
+ BrowseDir(Dir + SR.Name + '\');
until FindNext(SR) <> 0;
end; // if
FindClose(SR);
-// Log.LogStatus('Parsing directory: ' + Dir + SR.Name, 'LoadSongList');
-
- if FindFirst(Dir + '*.txt', 0, SR) = 0 then begin
-// Log.LogStatus('Parsing file: ' + Dir + SR.Name + '\' + SRD.Name, 'LoadSongList');
+ if FindFirst(Dir + '*.txt', 0, SR) = 0 then
+ begin
repeat
//New Mod for better Memory Management
SLen := BrowsePos;
- {//Old
- SLen := Length(Song);
- SetLength(Song, SLen + 1);//}
Song[SLen].Path := Dir;
Song[SLen].Folder := Copy(Dir, Length(SongPath)+1, 10000);
@@ -184,34 +180,24 @@ begin
begin
Song[SLen]:=AktSong;
FindRefrainStart(Song[SLen]);
- end;
- end;
- if (not res) then Dec(BrowsePos)
- else begin
- // scanning complete, file is good
- // if there is no cover then try to find it
- if Song[SLen].Cover = '' then Song[SLen].Cover := FindSongFile(Dir, '*[CO].jpg');
-// if Song[SLen].Background = '' then begin
-// Song[SLen].Background := FindSongFile(Dir, '*[BG].jpg');
-// end; // no needed here}
-
- // fix by adding path. no, don't fix it.
-// if Song[SLen].Cover <> '' then
-// Song[SLen].Cover := Song[SLen].Path + Song[SLen].Cover;
+ // scanning complete, file is good
+ // if there is no cover then try to find it
+ if Song[SLen].Cover = '' then Song[SLen].Cover := FindSongFile(Dir, '*[CO].jpg');
+
+ Inc(BrowsePos);
+ end;
end;
//Change Length Only every 50 Entrys
- Inc(BrowsePos);
-
- if (BrowsePos mod 50 = 0) AND (BrowsePos <> 0) then
- begin
- UpdateScreenLoading('Songs: '+IntToStr(Length(Song)));
+ if (BrowsePos mod 50 = 0) AND (BrowsePos <> 0) and res then
SetLength(Song, Length(Song) + 50);
- end;
+
+ if (BrowsePos mod 5 = 0) and res then
+ UpdateScreenLoading('Songs: '+IntToStr(BrowsePos));
until FindNext(SR) <> 0;
- end; // if FindFirst
+ end; // if FindFirst
FindClose(SR);
end;