aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/USongs.pas
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-08-15 16:44:17 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-08-15 16:44:17 +0000
commit22581815288ed2462063a8ac36e3818f95adfda2 (patch)
tree009f7178ec3502f5f38126fdb8ce84eade34f19f /Game/Code/Classes/USongs.pas
parentb313d7ec423dc118e7195e2f5873d9cbfa2d2411 (diff)
downloadusdx-22581815288ed2462063a8ac36e3818f95adfda2.tar.gz
usdx-22581815288ed2462063a8ac36e3818f95adfda2.tar.xz
usdx-22581815288ed2462063a8ac36e3818f95adfda2.zip
added check popup at startup if LoadFaultySongs=Off and if there are some defective songs. the user has now the ability to load them anyway.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2611 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/USongs.pas')
-rw-r--r--Game/Code/Classes/USongs.pas6
1 files changed, 6 insertions, 0 deletions
diff --git a/Game/Code/Classes/USongs.pas b/Game/Code/Classes/USongs.pas
index d622f2f2..5a579474 100644
--- a/Game/Code/Classes/USongs.pas
+++ b/Game/Code/Classes/USongs.pas
@@ -92,6 +92,7 @@ type
Song: array of TSong; // array of songs
SongSort: array of TSong;
Selected: integer; // selected song index
+ NumFaultySongs: integer;
procedure LoadSongList; // load all songs
procedure BrowseDir(Dir: string); // should return number of songs in the future
procedure Sort(Order: integer);
@@ -135,6 +136,7 @@ begin
// clear
Setlength(Song, 50);
+ NumFaultySongs := 0;
BrowsePos := 0;
// browse directories
@@ -179,9 +181,13 @@ begin
AktSong := Song[SLen];
res := LoadSong(Song[SLen].Path + Song[SLen].FileName, SONG_LOAD_NOTES); //TODO Hash?
+ if not CheckOK then
+ inc(NumFaultySongs);
+
if res then
begin
Song[SLen]:=AktSong;
+
//Medley and Duet - is it possible? Perhaps later...
if not AktSong.isDuet then
FindRefrainStart(Song[SLen])