Added overall score to ScreenScore.
This commit is contained in:
1 parent
bc9d1882cf
commit
53ab3fd667
3 files changed
+64
-14
No files matched your search
@@ -141,6 +141,7 @@
|
|||||||
<TR_SCREENSCORE_RATING>Bewertung</TR_SCREENSCORE_RATING>
|
<TR_SCREENSCORE_RATING>Bewertung</TR_SCREENSCORE_RATING>
|
||||||
<TR_SCREENSCORE_POINTS>Punkte</TR_SCREENSCORE_POINTS>
|
<TR_SCREENSCORE_POINTS>Punkte</TR_SCREENSCORE_POINTS>
|
||||||
<TR_SCREENSCORE_GAMEDIFFICULTY>Schwierigkeit</TR_SCREENSCORE_GAMEDIFFICULTY>
|
<TR_SCREENSCORE_GAMEDIFFICULTY>Schwierigkeit</TR_SCREENSCORE_GAMEDIFFICULTY>
|
||||||
|
<TR_SCREENSCORE_OVERALLSCORE>Gesamtpunktzahl</TR_SCREENSCORE_OVERALLSCORE>
|
||||||
<!--ScreenHighscore-->
|
<!--ScreenHighscore-->
|
||||||
<TR_SCREENHIGHSCORE_HIGHSCORE>Highscore</TR_SCREENHIGHSCORE_HIGHSCORE>
|
<TR_SCREENHIGHSCORE_HIGHSCORE>Highscore</TR_SCREENHIGHSCORE_HIGHSCORE>
|
||||||
<!--ScreenProfiles-->
|
<!--ScreenProfiles-->
|
||||||
|
|||||||
@@ -141,6 +141,7 @@
|
|||||||
<TR_SCREENSCORE_RATING>Rating</TR_SCREENSCORE_RATING>
|
<TR_SCREENSCORE_RATING>Rating</TR_SCREENSCORE_RATING>
|
||||||
<TR_SCREENSCORE_POINTS>Points</TR_SCREENSCORE_POINTS>
|
<TR_SCREENSCORE_POINTS>Points</TR_SCREENSCORE_POINTS>
|
||||||
<TR_SCREENSCORE_GAMEDIFFICULTY>Difficulty</TR_SCREENSCORE_GAMEDIFFICULTY>
|
<TR_SCREENSCORE_GAMEDIFFICULTY>Difficulty</TR_SCREENSCORE_GAMEDIFFICULTY>
|
||||||
|
<TR_SCREENSCORE_OVERALLSCORE>Overall score</TR_SCREENSCORE_OVERALLSCORE>
|
||||||
<!--ScreenHighscore-->
|
<!--ScreenHighscore-->
|
||||||
<TR_SCREENHIGHSCORE_HIGHSCORE>Highscore</TR_SCREENHIGHSCORE_HIGHSCORE>
|
<TR_SCREENHIGHSCORE_HIGHSCORE>Highscore</TR_SCREENHIGHSCORE_HIGHSCORE>
|
||||||
<!--ScreenProfiles-->
|
<!--ScreenProfiles-->
|
||||||
|
|||||||
@@ -117,9 +117,23 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
public override bool UpdateGame()
|
public override bool UpdateGame()
|
||||||
{
|
{
|
||||||
|
|
||||||
SPlayer[] player = new SPlayer[CGame.NumPlayer];
|
SPlayer[] player = new SPlayer[CGame.NumPlayer];
|
||||||
player = _Points.GetPlayer(_Round - 1, CGame.NumPlayer);
|
if (_Round != 0)
|
||||||
|
player = _Points.GetPlayer(_Round - 1, CGame.NumPlayer);
|
||||||
|
else {
|
||||||
|
for (int i = 0; i < CGame.NumRounds; i++)
|
||||||
|
{
|
||||||
|
SPlayer[] points = _Points.GetPlayer(i, CGame.NumPlayer);
|
||||||
|
for (int p = 0; p < player.Length; p++)
|
||||||
|
{
|
||||||
|
player[p].Points += points[p].Points;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int p = 0; p < player.Length; p++)
|
||||||
|
{
|
||||||
|
player[p].Points = (int)(player[p].Points/CGame.NumRounds);
|
||||||
|
}
|
||||||
|
}
|
||||||
for (int p = 0; p < player.Length; p++)
|
for (int p = 0; p < player.Length; p++)
|
||||||
{
|
{
|
||||||
if (StaticPointsBarDrawnPoints[p] < player[p].Points)
|
if (StaticPointsBarDrawnPoints[p] < player[p].Points)
|
||||||
@@ -244,18 +258,42 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
private void UpdateRatings()
|
private void UpdateRatings()
|
||||||
{
|
{
|
||||||
CSong song = CGame.GetSong(_Round);
|
|
||||||
if (song == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Texts[htTexts(TextSong)].Text = song.Artist + " - " + song.Title;
|
|
||||||
if (_Points.NumRounds > 1)
|
|
||||||
{
|
|
||||||
Texts[htTexts(TextSong)].Text += " (" + _Round + "/" + _Points.NumRounds + ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
SPlayer[] player = new SPlayer[CGame.NumPlayer];
|
SPlayer[] player = new SPlayer[CGame.NumPlayer];
|
||||||
player = _Points.GetPlayer(_Round - 1, CGame.NumPlayer);
|
if (_Round != 0)
|
||||||
|
{
|
||||||
|
CSong song = CGame.GetSong(_Round);
|
||||||
|
if (song == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Texts[htTexts(TextSong)].Text = song.Artist + " - " + song.Title;
|
||||||
|
if (_Points.NumRounds > 1)
|
||||||
|
{
|
||||||
|
Texts[htTexts(TextSong)].Text += " (" + _Round + "/" + _Points.NumRounds + ")";
|
||||||
|
}
|
||||||
|
player = _Points.GetPlayer(_Round - 1, CGame.NumPlayer);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Texts[htTexts(TextSong)].Text = "TR_SCREENSCORE_OVERALLSCORE";
|
||||||
|
for (int i = 0; i < CGame.NumRounds; i++)
|
||||||
|
{
|
||||||
|
SPlayer[] points = _Points.GetPlayer(i, CGame.NumPlayer);
|
||||||
|
for (int p = 0; p < player.Length; p++)
|
||||||
|
{
|
||||||
|
if (i < 1)
|
||||||
|
{
|
||||||
|
player[p].ProfileID = points[p].ProfileID;
|
||||||
|
player[p].Name = points[p].Name;
|
||||||
|
player[p].Difficulty = points[p].Difficulty;
|
||||||
|
}
|
||||||
|
player[p].Points += points[p].Points;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int p = 0; p < player.Length; p++)
|
||||||
|
{
|
||||||
|
player[p].Points = (int)(player[p].Points / CGame.NumRounds);
|
||||||
|
}
|
||||||
|
}
|
||||||
for (int p = 0; p < player.Length; p++)
|
for (int p = 0; p < player.Length; p++)
|
||||||
{
|
{
|
||||||
Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name;
|
Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name;
|
||||||
@@ -315,11 +353,21 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
private void ChangeRound(int Num)
|
private void ChangeRound(int Num)
|
||||||
{
|
{
|
||||||
if ((_Round + Num) <= _Points.NumRounds && (_Round + Num) > 0)
|
if ((_Round + Num) <= _Points.NumRounds && (_Round + Num) > 0 && _Round != 0)
|
||||||
{
|
{
|
||||||
_Round += Num;
|
_Round += Num;
|
||||||
UpdateRatings();
|
UpdateRatings();
|
||||||
}
|
}
|
||||||
|
else if(Num > 0 && _Round != 0 && CGame.NumRounds > 1)
|
||||||
|
{
|
||||||
|
_Round = 0;
|
||||||
|
UpdateRatings();
|
||||||
|
}
|
||||||
|
else if (Num < 0 && _Round == 0)
|
||||||
|
{
|
||||||
|
_Round = CGame.NumRounds;
|
||||||
|
UpdateRatings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user