diff --git a/Vocaluxe/Base/CDataBase.cs b/Vocaluxe/Base/CDataBase.cs index b755a95b..cf37bf3b 100644 --- a/Vocaluxe/Base/CDataBase.cs +++ b/Vocaluxe/Base/CDataBase.cs @@ -243,13 +243,13 @@ namespace Vocaluxe.Base return lastInsertID; } - public static void LoadScore(out List scores, SPlayer player) + public static void LoadScore(out List scores, SPlayer player) { using (var connection = new SQLiteConnection()) { connection.ConnectionString = "Data Source=" + _HighscoreFilePath; - scores = new List(); + scores = new List(); try { @@ -290,13 +290,13 @@ namespace Vocaluxe.Base { while (reader.Read()) { - var score = new SScores + var score = new SDBScoreEntry { Name = reader.GetString(0), Score = reader.GetInt32(1), Date = new DateTime(reader.GetInt64(2)).ToString("dd/MM/yyyy"), Difficulty = (EGameDifficulty)reader.GetInt32(3), - LineNr = reader.GetInt32(4), + VoiceNr = reader.GetInt32(4), ID = reader.GetInt32(5) }; diff --git a/Vocaluxe/Screens/CScreenHighscore.cs b/Vocaluxe/Screens/CScreenHighscore.cs index 933c2706..a8be7e46 100644 --- a/Vocaluxe/Screens/CScreenHighscore.cs +++ b/Vocaluxe/Screens/CScreenHighscore.cs @@ -44,7 +44,7 @@ namespace Vocaluxe.Screens private string[] _TextDate; private string[] _ParticleEffectNew; - private List[] _Scores; + private List[] _Scores; private List _NewEntryIDs; private int _Round; private int _Pos; @@ -169,7 +169,7 @@ namespace Vocaluxe.Screens string name = _Scores[_Round][_Pos + p].Name; name += " [" + CLanguage.Translate(Enum.GetName(typeof(EGameDifficulty), _Scores[_Round][_Pos + p].Difficulty)) + "]"; if (_IsDuet) - name += " (P" + (_Scores[_Round][_Pos + p].LineNr + 1) + ")"; + name += " (P" + (_Scores[_Round][_Pos + p].VoiceNr + 1) + ")"; _Texts[_TextName[p]].Text = name; _Texts[_TextScore[p]].Text = _Scores[_Round][_Pos + p].Score.ToString("00000"); @@ -195,9 +195,9 @@ namespace Vocaluxe.Screens _Round = 0; _Pos = 0; CPoints points = CGame.GetPoints(); - _Scores = new List[points.NumRounds]; + _Scores = new List[points.NumRounds]; for (int i = 0; i < _Scores.Length; i++) - _Scores[i] = new List(); + _Scores[i] = new List(); _NewEntryIDs.Clear(); _AddScoresToDB(); _LoadScores(); diff --git a/VocaluxeLib/Structs.cs b/VocaluxeLib/Structs.cs index 4bef014d..895d593b 100644 --- a/VocaluxeLib/Structs.cs +++ b/VocaluxeLib/Structs.cs @@ -197,13 +197,13 @@ namespace VocaluxeLib public bool SongFinished; } - public struct SScores + public struct SDBScoreEntry { public string Name; public int Score; public string Date; public EGameDifficulty Difficulty; - public int LineNr; + public int VoiceNr; public int ID; }