aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/ULog.pas
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Classes/ULog.pas')
-rw-r--r--Game/Code/Classes/ULog.pas43
1 files changed, 42 insertions, 1 deletions
diff --git a/Game/Code/Classes/ULog.pas b/Game/Code/Classes/ULog.pas
index a3e7f156..9e6f26fb 100644
--- a/Game/Code/Classes/ULog.pas
+++ b/Game/Code/Classes/ULog.pas
@@ -17,6 +17,9 @@ type
FileSession: TextFile;
FileSessionO: boolean; // opened
+ FileSongQuality: TextFile;
+ FileSongQualityO: boolean; // opened
+
NumErrors: integer;
NumSungSongs: integer;
@@ -43,6 +46,7 @@ type
function LogVoice(SoundNr: Integer; Player, Artist, Title, Points: string): string;
procedure LogSession(names: array of string; points: array of string; Artist, Title, singmode: string);
+ procedure LogSongQuality(artist, title: string; syntax, bpm, notegaps, notejumps, score, value, goldennotes: real);
// compability
procedure LogStatus(Log1, Log2: string);
@@ -285,7 +289,7 @@ begin
// if FileAnalyzeO then CloseFile(FileAnalyze);
if FileErrorO then CloseFile(FileError);
if FileSessionO then CloseFile(FileSession);
-
+ if FileSongQualityO then CloseFile(FileSongQuality);
end;
procedure TLog.BenchmarkStart(Number: integer);
@@ -627,6 +631,43 @@ begin
end;
end;
+procedure TLog.LogSongQuality(artist, title: string;
+ syntax, bpm, notegaps, notejumps, score, value, goldennotes: real);
+var
+ FileName: string;
+
+begin
+ if not FileSongQualityO then
+ begin
+ NumSungSongs := 0;
+ FileName := GamePath + 'quality.csv';
+
+ AssignFile(FileSongQuality, FileName);
+ {$I-}
+ Rewrite(FileSongQuality);
+ if IOResult = 0 then FileSongQualityO := true;
+ {$I+}
+
+ //If File is opened write column names to File
+ If (FileSongQualityO) then
+ begin
+ WriteLn(FileSongQuality, 'Artist; Title; Syntax; BPM; Note Gaps; Note Jumps; Scores; Value; Anteil Goldene Noten');
+ Flush(FileSongQuality);
+ end;
+ end;
+
+ if FileSongQualityO then
+ begin
+ try
+ WriteLn(FileSongQuality, artist + ';' + title + ';' + FloatToStr(syntax) + ';' +
+ FloatToStr(bpm) + ';' + FloatToStr(notegaps) + ';' + FloatToStr(notejumps) + ';' +
+ FloatToStr(score) + ';' + FloatToStr(value) + ';' + FloatToStr(goldennotes) + ';');
+ except
+ FileSongQualityO := false;
+ end;
+ end;
+end;
+
procedure TLog.LogStatus(Log1, Log2: string);
begin
//Just for Debugging