From 0ed0a168ed35a184e6cf745615f76c61c1b872eb Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 1 Dec 2012 20:46:07 +0100 Subject: [PATCH 1/3] Fix crash when starting a song without notes. --- Vocaluxe/Lib/Song/CSong.cs | 5 +++++ Vocaluxe/Screens/CScreenSing.cs | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Lib/Song/CSong.cs b/Vocaluxe/Lib/Song/CSong.cs index f325d691..6e7ff885 100644 --- a/Vocaluxe/Lib/Song/CSong.cs +++ b/Vocaluxe/Lib/Song/CSong.cs @@ -46,6 +46,11 @@ namespace Vocaluxe.Lib.Song get { return _CoverLoaded; } } + public bool NotesLoaded + { + get { return _NotesLoaded; } + } + public bool CoverBigLoaded = false; public bool BackgroundLoaded = false; diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index e21708f7..6678bd87 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -937,9 +937,11 @@ namespace Vocaluxe.Screens float dt = 4f; float rt = dt * 0.8f; - CSong Song = CGame.GetSong(); + CSong Song = CGame.GetSong(); if (Song == null) return null; + else if (!Song.NotesLoaded) + return null; float[] Alpha = new float[Song.Notes.Lines.Length * 2]; CLines[] lines = new CLines[Song.Notes.Lines.Length]; From 2bc0fe8b732fab00ab2c950d92089380a429a304 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sun, 2 Dec 2012 12:17:11 +0100 Subject: [PATCH 2/3] Show duet-names on score-screen if set. --- Vocaluxe/Screens/CScreenScore.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenScore.cs b/Vocaluxe/Screens/CScreenScore.cs index 21b0a92f..6bf09ce0 100644 --- a/Vocaluxe/Screens/CScreenScore.cs +++ b/Vocaluxe/Screens/CScreenScore.cs @@ -258,7 +258,16 @@ namespace Vocaluxe.Screens player = _Points.GetPlayer(_Round - 1, CGame.NumPlayer); for (int p = 0; p < player.Length; p++) { - Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name; + if (!song.IsDuet) + Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name; + else + if(player[p].LineNr == 0 && song.DuetPart1 != "Part 1") + Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name + " (" + song.DuetPart1 + ")"; + else if(player[p].LineNr == 1 && song.DuetPart2 != "Part 2") + Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name + " (" + song.DuetPart2 + ")"; + else + Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name; + Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Text = ((int)Math.Round(player[p].Points)).ToString("0000") + " " + CLanguage.Translate("TR_SCREENSCORE_POINTS"); if (CGame.NumPlayer <= 3) { From e1e0e30383079ed0109df813497f3f8360c3b9fd Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sun, 2 Dec 2012 12:49:11 +0100 Subject: [PATCH 3/3] Little theme-fix. --- Output/Themes/Ambient/Screens/ScreenOptionsVideo.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenOptionsVideo.xml b/Output/Themes/Ambient/Screens/ScreenOptionsVideo.xml index 0bacb58b..fbdb6be8 100644 --- a/Output/Themes/Ambient/Screens/ScreenOptionsVideo.xml +++ b/Output/Themes/Ambient/Screens/ScreenOptionsVideo.xml @@ -497,13 +497,13 @@ 50 505 - 225 + 285 0,00 40 40 1170 - 225 + 285 0,00 40 40 @@ -540,4 +540,4 @@ 3 - \ No newline at end of file +