From fffb5a40133622131d7077f1d8842c2c6b7b51ad Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Sat, 20 Nov 2010 10:40:00 +0000 Subject: - hide lyrics also by pressing N - support for more than one song folder - added track number in error.log for duet songs - fixed sorting by title and artist: sort by artist or title first - added more text messages in editor - copy and move lines between tracks in duet songs is possible again - adjust player number in screenname - don't show possible scores in party modes (collidates with some plugins) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2743 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UFiles.pas | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'Game/Code/Classes/UFiles.pas') diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index 93e745e5..d6ec4254 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -45,7 +45,7 @@ var //Absolute Paths GamePath: string; SoundPath: string; - SongPath: string; + SongPaths: array of string; LogPath: string; ThemePath: string; ScreenshotsPath: string; @@ -82,7 +82,9 @@ begin GamePath := ExtractFilePath(ParamStr(0)); SoundPath := GamePath + 'Sounds\'; - SongPath := GamePath + 'Songs\'; + + SetLength(SongPaths, 1); + SongPaths[0] := GamePath + 'Songs\'; LogPath := GamePath; ThemePath := GamePath + 'Themes\'; ScreenshotsPath := GamePath + 'Screenshots\'; @@ -100,8 +102,8 @@ begin If not DirectoryExists(SoundPath) then Writeable := ForceDirectories(SoundPath); - If Writeable And (not DirectoryExists(SongPath)) then - Writeable := ForceDirectories(SongPath); + If Writeable And (not DirectoryExists(SongPaths[0])) then + Writeable := ForceDirectories(SongPaths[0]); If Writeable And (not DirectoryExists(ThemePath)) then Writeable := ForceDirectories(ThemePath); @@ -745,6 +747,7 @@ var foundMedleyStart: boolean; foundMedleyEnd: boolean; medley: boolean; + singer: string; begin Result := true; @@ -761,6 +764,11 @@ begin for p := 0 to Length(Czesci) - 1 do begin + if AktSong.isDuet then + singer := ' (P' + IntToStr(p+1) + ')' + else + singer := ''; + bt := low(integer); numLines := Length(Czesci[p].Czesc); @@ -793,7 +801,7 @@ begin if(bt>Czesci[p].Czesc[line].Start) then begin Log.LogError('Beat error in sentence ' + IntToStr(line+1) + ', on beat ' + IntToStr(Czesci[p].Czesc[line].Start) + - ' in song ' + AktSong.Path + AktSong.Filename); + singer + ' in song ' + AktSong.Path + AktSong.Filename); if (Ini.LoadFaultySongs=0) and (Ini.LoadFaultySongs_temp=0) then Result := false; end; @@ -804,7 +812,7 @@ begin if(bt>Czesci[p].Czesc[line].Nuta[note].Start) then begin Log.LogError('Beat error in sentence ' + IntToStr(line+1) + ', on beat ' + IntToStr(Czesci[p].Czesc[line].Nuta[note].Start) + - ' in song ' + AktSong.Path + AktSong.Filename); + singer + ' in song ' + AktSong.Path + AktSong.Filename); if (Ini.LoadFaultySongs=0) and (Ini.LoadFaultySongs_temp=0) then Result := false; end; @@ -813,7 +821,7 @@ begin if (Czesci[p].Czesc[line].Nuta[note].Dlugosc<0) then begin Log.LogError('Note length <0 in sentence ' + IntToStr(line+1) + ', on beat ' + IntToStr(Czesci[p].Czesc[line].Nuta[note].Start) + - ' in song ' + AktSong.Path + AktSong.Filename); + singer + ' in song ' + AktSong.Path + AktSong.Filename); if (Ini.LoadFaultySongs=0) and (Ini.LoadFaultySongs_temp=0) then Result := false; end; @@ -821,7 +829,7 @@ begin if (Czesci[p].Czesc[line].Nuta[note].Dlugosc=0) and not Czesci[p].Czesc[line].Nuta[note].FreeStyle then begin Log.LogError('Note length =0 in sentence ' + IntToStr(line+1) + ', on beat ' + IntToStr(Czesci[p].Czesc[line].Nuta[note].Start) + - ' in song ' + AktSong.Path + AktSong.Filename); + singer + ' in song ' + AktSong.Path + AktSong.Filename); if (Ini.LoadFaultySongs=0) and (Ini.LoadFaultySongs_temp=0) then Result := false; end; @@ -836,7 +844,7 @@ begin if (bt+Czesci[p].Czesc[line].Nuta[note].Dlugosc>nextBeat) then begin Log.LogError('Note length error in sentence ' + IntToStr(line+1) + ', on beat ' + IntToStr(Czesci[p].Czesc[line].Nuta[note].Start) + - ' in song ' + AktSong.Path + AktSong.Filename); + singer + ' in song ' + AktSong.Path + AktSong.Filename); if (Ini.LoadFaultySongs=0) and (Ini.LoadFaultySongs_temp=0) then Result := false; end; -- cgit v1.2.3