aboutsummaryrefslogtreecommitdiffstats
path: root/src/screens
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/UScreenSing.pas17
-rw-r--r--src/screens/UScreenTop5.pas2
2 files changed, 18 insertions, 1 deletions
diff --git a/src/screens/UScreenSing.pas b/src/screens/UScreenSing.pas
index 20805737..342abac1 100644
--- a/src/screens/UScreenSing.pas
+++ b/src/screens/UScreenSing.pas
@@ -98,6 +98,9 @@ type
// score manager:
Scores: TSingScores;
+ //the song was sung to the end
+ SungToEnd: boolean;
+
fShowVisualization: boolean;
fCurrentVideoPlaybackEngine: IVideoPlayback;
@@ -329,6 +332,9 @@ begin
Log.LogStatus('Begin', 'OnShow');
FadeOut := false;
+ //the song was sung to the end
+ SungToEnd := false;
+
// reset video playback engine, to play video clip ...
fCurrentVideoPlaybackEngine := VideoPlayback;
@@ -666,6 +672,8 @@ var
Sec: integer;
T: integer;
CurLyricsTime: real;
+ Line: TLyricLine;
+ LastWord: TLyricWord;
begin
Background.Draw;
@@ -751,6 +759,15 @@ begin
// Note: there is no menu and the animated background brakes the video playback
//DrawBG;
+ //the song was sung to the end?
+ Line := Lyrics.GetUpperLine();
+ if Line.LastLine then
+ begin
+ LastWord := Line.Words[Length(Line.Words)-1];
+ if CurLyricsTime >= GetTimeFromBeat(LastWord.Start+LastWord.Length) then
+ SungToEnd := true;
+ end;
+
// update and draw movie
if (ShowFinish and (VideoLoaded or fShowVisualization)) then
begin
diff --git a/src/screens/UScreenTop5.pas b/src/screens/UScreenTop5.pas
index b0795f54..2ddff713 100644
--- a/src/screens/UScreenTop5.pas
+++ b/src/screens/UScreenTop5.pas
@@ -188,7 +188,7 @@ begin
PMax := 5;
for I := 0 to PMax do
begin
- if (Round(Player[I].ScoreTotalInt) > 0) then
+ if (Round(Player[I].ScoreTotalInt) > 0) and (ScreenSing.SungToEnd) then
begin
DataBase.AddScore(CurrentSong, Ini.Difficulty, Ini.Name[I], Round(Player[I].ScoreTotalInt));
sung:=true;