diff options
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r-- | Game/Code/Classes/UFiles.pas | 10 | ||||
-rw-r--r-- | Game/Code/Classes/USongs.pas | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index a8fa8076..16ff7c63 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -49,8 +49,10 @@ var // variables available for all procedures
Base: array[0..1] of integer;
Rel: array[0..1] of integer;
- Mult: integer = 1;
- MultBPM: integer = 4;
+ Mult: integer = 1;
+ MultBPM: integer = 4;
+
+ CheckOK: boolean;
implementation
uses TextGL, UIni, UMain;
@@ -805,6 +807,7 @@ var isNewSentence: boolean;
begin
Result := false;
+ CheckOK := true;
if not FileExists(Name) then begin
Log.LogError('File not found: "' + Name + '"', 'LoadSong');
@@ -1028,7 +1031,8 @@ begin exit;
end;
- Result := CheckSong;
+ CheckOK := CheckSong;
+ Result := CheckOK;
end;
//--------------------
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])
|