diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2011-04-18 18:11:28 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2011-04-18 18:11:28 +0000 |
commit | 2478e4959f08b82e9a3baa949d6fcf0833948a98 (patch) | |
tree | 508c10a3a3f3b19102b04fc4e3d0506acac00f01 /Game/Code/Screens | |
parent | a5a50b95ad673170c0087ca58a4d2b70e874f599 (diff) | |
download | usdx-2478e4959f08b82e9a3baa949d6fcf0833948a98.tar.gz usdx-2478e4959f08b82e9a3baa949d6fcf0833948a98.tar.xz usdx-2478e4959f08b82e9a3baa949d6fcf0833948a98.zip |
added new sing mode: sing together (mean points over all players)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2823 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r-- | Game/Code/Screens/UScreenScore.pas | 2 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSing.pas | 25 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSong.pas | 16 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSongMenu.pas | 39 |
4 files changed, 74 insertions, 8 deletions
diff --git a/Game/Code/Screens/UScreenScore.pas b/Game/Code/Screens/UScreenScore.pas index 149541a2..05983f6e 100644 --- a/Game/Code/Screens/UScreenScore.pas +++ b/Game/Code/Screens/UScreenScore.pas @@ -130,7 +130,7 @@ begin Music.VoicesClose;
FadeTo(@ScreenPartyNewRoundM2);
- end else if (ScreenSong.Mode <> smMedley) and not AktSong.isDuet then
+ end else if (ScreenSong.Mode <> smMedley) and not AktSong.isDuet and not ScreenSong.SingTogether then
FadeTo(@ScreenTop)
else
begin
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index 4d1b918c..9ea55e95 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -1560,6 +1560,8 @@ begin for P := 0 to High(Player) do
ClearScores(P);
+ ClearMeanScore();
+
// fill texts
LyricMain[0].AddCzesc(0, 0);
LyricMain[0].Selected := -1;
@@ -2293,6 +2295,8 @@ begin end else if(ScreenSong.Mode = smNormal) then
begin
singmode := 'Normal';
+ if ScreenSong.SingTogether then
+ singmode := singmode + ' (Sing together)';
if AktSong.isDuet then
singmode := singmode + ' (Duet)';
end;
@@ -2496,12 +2500,29 @@ begin //PhrasenBonus give Points
if (Length(Czesci[CP].Czesc) - NumEmptySentences[CP])>0 then
+ begin
Player[I].ScoreLine := Player[I].ScoreLine +
(1000 / (Length(Czesci[CP].Czesc) - NumEmptySentences[CP]) * A / 8);
- Player[I].ScoreLineI := Round(Player[I].ScoreLine / 10) * 10;
+ MeanPlayer.ScoreLine := MeanPlayer.ScoreLine +
+ (1000 / (Length(Czesci[CP].Czesc) - NumEmptySentences[CP]) * A / 8);
+ end;
+
+ MeanPlayer.ScoreLineI := Round(MeanPlayer.ScoreLine / 10) * 10;
//Update Total Score
- Player[I].ScoreTotalI := Player[I].ScoreI + Player[I].ScoreGoldenI + Player[I].ScoreLineI;
+ MeanPlayer.ScoreTotalI := MeanPlayer.ScoreI + MeanPlayer.ScoreGoldenI + MeanPlayer.ScoreLineI;
+
+ if ScreenSong.SingTogether then
+ begin
+ Player[I].ScoreLineI := MeanPlayer.ScoreLineI;
+ //Update Total Score
+ Player[I].ScoreTotalI := MeanPlayer.ScoreTotalI;
+ end else
+ begin
+ Player[I].ScoreLineI := Round(Player[I].ScoreLine / 10) * 10;
+ //Update Total Score
+ Player[I].ScoreTotalI := Player[I].ScoreI + Player[I].ScoreGoldenI + Player[I].ScoreLineI;
+ end;
//Color
Case Floor(A) of
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index aa3c2bf9..aab46786 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -119,7 +119,8 @@ type PartyPlayed: array of integer; //played in Party Classic
MedleyPlayed: array of integer; //played in Challenge or Classic Medley-mode
- SungToEnd: boolean; //Song was sung to the end?
+ SungToEnd: boolean; //Song was sung to the end?
+ SingTogether: boolean; //Calc mean score
//party Statics (Joker)
StaticTeam1Joker1: Cardinal;
@@ -774,8 +775,16 @@ begin CatSongs.Selected := Interaction;
//Do the Action that is specified in Ini
case Ini.OnSongClick of
- 0: StartSong;
- 1: SelectPlayers;
+ 0: begin
+ if (SDL_ModState = KMOD_LCTRL) then
+ SingTogether := true;
+ StartSong;
+ end;
+ 1: begin
+ if (SDL_ModState = KMOD_LCTRL) then
+ SingTogether := true;
+ SelectPlayers;
+ end;
2:begin
if (TargetVidVis = full) then
begin
@@ -2024,6 +2033,7 @@ begin FadeOut := false;
SungToEnd := false;
+ SingTogether := false;
if Mode = smMedley then
Mode := smNormal;
diff --git a/Game/Code/Screens/UScreenSongMenu.pas b/Game/Code/Screens/UScreenSongMenu.pas index e209a176..98e8a49c 100644 --- a/Game/Code/Screens/UScreenSongMenu.pas +++ b/Game/Code/Screens/UScreenSongMenu.pas @@ -26,6 +26,7 @@ const SM_Main = 1;
SM_Song = 8 or 1;
+ SM_Song_Play = 8 or 2;
SM_Medley = 16 or 1;
@@ -359,6 +360,22 @@ begin Button[3].Text[0].Text := Language.Translate('SONG_MENU_EDIT');
end;
+ SM_Song_Play:
+ begin
+ ID := 'ID_032';
+ CurMenu := sMenu;
+ Text[0].Text := Language.Translate('SONG_MENU_PLAY');
+
+ Button[0].Visible := True;
+ Button[1].Visible := not CatSongs.Song[ScreenSong.Interaction].isDuet;
+ Button[2].Visible := False;
+ Button[3].Visible := False;
+ SelectsS[0].Visible := False;
+
+ Button[0].Text[0].Text := Language.Translate('SONG_MENU_PLAY');
+ Button[1].Text[0].Text := Language.Translate('SONG_MENU_PLAY_TOGETHER');
+ end;
+
SM_Medley:
begin
ID := 'ID_032';
@@ -629,8 +646,7 @@ begin Case Interaction of
0: //Button 1
begin
- ScreenSong.StartSong;
- Visible := False;
+ MenuShow(SM_Song_Play);
end;
1: //Button 2
@@ -659,6 +675,25 @@ begin end;
end;
+ SM_Song_Play:
+ begin
+ Case Interaction of
+ 0: //Button 1
+ begin
+ ScreenSong.StartSong;
+ Visible := False;
+ end;
+
+ 1: //Button 2
+ begin
+ //Select New Players then Sing:
+ ScreenSong.SingTogether := true;
+ ScreenSong.StartSong;
+ Visible := False;
+ end;
+ end;
+ end;
+
SM_Medley:
begin
Case Interaction of
|