From 31b5e9286f721b7cc81f620a28d8de5d0087c63c Mon Sep 17 00:00:00 2001 From: tobigun Date: Sat, 21 Mar 2009 19:11:54 +0000 Subject: New plugin mode reverted (will be moved to a branch afterwards). Party mode might work again (untested). This might break linux compatibility. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1641 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenPartyNewRound.pas | 48 +++++++++++++++++------------------- src/screens/UScreenPartyOptions.pas | 7 +++--- src/screens/UScreenPartyPlayer.pas | 23 ++++++++++------- src/screens/UScreenPartyScore.pas | 19 +++++++------- src/screens/UScreenPartyWin.pas | 15 ++++++----- src/screens/UScreenSong.pas | 19 ++++++-------- src/screens/UScreenSongMenu.pas | 15 +++++------ 7 files changed, 69 insertions(+), 77 deletions(-) (limited to 'src/screens') diff --git a/src/screens/UScreenPartyNewRound.pas b/src/screens/UScreenPartyNewRound.pas index 01de9df7..f95f2ff1 100644 --- a/src/screens/UScreenPartyNewRound.pas +++ b/src/screens/UScreenPartyNewRound.pas @@ -215,15 +215,15 @@ var function GetTeamPlayers(const Num: Byte): String; var Players: Array of String; - //J: Byte; - begin // to-do : Party - if (Num-1 >= {PartySession.Teams.NumTeams}0) then + J: Byte; + begin + if (Num-1 >= PartySession.Teams.NumTeams) then exit; - {//Create Players Array + //Create Players Array SetLength(Players, PartySession.Teams.TeamInfo[Num-1].NumPlayers); For J := 0 to PartySession.Teams.TeamInfo[Num-1].NumPlayers-1 do - Players[J] := String(PartySession.Teams.TeamInfo[Num-1].PlayerInfo[J].Name);} + Players[J] := String(PartySession.Teams.TeamInfo[Num-1].PlayerInfo[J].Name); //Implode and Return Result := Language.Implode(Players); @@ -231,12 +231,10 @@ var begin inherited; - // to-do : Party - //PartySession.StartRound; + PartySession.StartRound; //Set Visibility of Round Infos - // to-do : Party - I := {Length(PartySession.Rounds)}0; + I := Length(PartySession.Rounds); if (I >= 1) then begin Static[StaticRound1].Visible := True; @@ -244,8 +242,8 @@ begin Text[TextWinner1].Visible := True; //Texts: - //Text[TextRound1].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[0].Plugin].Name); - //Text[TextWinner1].Text := PartySession.GetWinnerString(0); + Text[TextRound1].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[0].Plugin].Name); + Text[TextWinner1].Text := PartySession.GetWinnerString(0); end else begin @@ -261,8 +259,8 @@ begin Text[TextWinner2].Visible := True; //Texts: - //Text[TextRound2].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[1].Plugin].Name); - //Text[TextWinner2].Text := PartySession.GetWinnerString(1); + Text[TextRound2].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[1].Plugin].Name); + Text[TextWinner2].Text := PartySession.GetWinnerString(1); end else begin @@ -278,8 +276,8 @@ begin Text[TextWinner3].Visible := True; //Texts: - //Text[TextRound3].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[2].Plugin].Name); - //Text[TextWinner3].Text := PartySession.GetWinnerString(2); + Text[TextRound3].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[2].Plugin].Name); + Text[TextWinner3].Text := PartySession.GetWinnerString(2); end else begin @@ -295,8 +293,8 @@ begin Text[TextWinner4].Visible := True; //Texts: - //Text[TextRound4].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[3].Plugin].Name); - //Text[TextWinner4].Text := PartySession.GetWinnerString(3); + Text[TextRound4].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[3].Plugin].Name); + Text[TextWinner4].Text := PartySession.GetWinnerString(3); end else begin @@ -312,8 +310,8 @@ begin Text[TextWinner5].Visible := True; //Texts: - //Text[TextRound5].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[4].Plugin].Name); - //Text[TextWinner5].Text := PartySession.GetWinnerString(4); + Text[TextRound5].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[4].Plugin].Name); + Text[TextWinner5].Text := PartySession.GetWinnerString(4); end else begin @@ -329,8 +327,8 @@ begin Text[TextWinner6].Visible := True; //Texts: - //Text[TextRound6].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[5].Plugin].Name); - //Text[TextWinner6].Text := PartySession.GetWinnerString(5); + Text[TextRound6].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[5].Plugin].Name); + Text[TextWinner6].Text := PartySession.GetWinnerString(5); end else begin @@ -346,8 +344,8 @@ begin Text[TextWinner7].Visible := True; //Texts: - //Text[TextRound7].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[6].Plugin].Name); - //Text[TextWinner7].Text := PartySession.GetWinnerString(6); + Text[TextRound7].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[6].Plugin].Name); + Text[TextWinner7].Text := PartySession.GetWinnerString(6); end else begin @@ -357,7 +355,7 @@ begin end; //Display Scores - {if (PartySession.Teams.NumTeams >= 1) then + if (PartySession.Teams.NumTeams >= 1) then begin Text[TextScoreTeam1].Text := InttoStr(PartySession.Teams.TeamInfo[0].Score); Text[TextNameTeam1].Text := String(PartySession.Teams.TeamInfo[0].Name); @@ -445,7 +443,7 @@ begin Text[TextNextPlayer3].Visible := True; end else - Text[TextNextPlayer3].Visible := False; } + Text[TextNextPlayer3].Visible := False; end; procedure TScreenPartyNewRound.SetAnimationProgress(Progress: real); diff --git a/src/screens/UScreenPartyOptions.pas b/src/screens/UScreenPartyOptions.pas index d6839778..147cb80f 100644 --- a/src/screens/UScreenPartyOptions.pas +++ b/src/screens/UScreenPartyOptions.pas @@ -138,10 +138,10 @@ begin //Save Num Teams: - {PartySession.Teams.NumTeams := NumTeams + 2; + PartySession.Teams.NumTeams := NumTeams + 2; PartySession.Teams.Teaminfo[0].NumPlayers := NumPlayer1+1; PartySession.Teams.Teaminfo[1].NumPlayers := NumPlayer2+1; - PartySession.Teams.Teaminfo[2].NumPlayers := NumPlayer3+1;} + PartySession.Teams.Teaminfo[2].NumPlayers := NumPlayer3+1; //Save Playlist PlaylistMan.Mode := TSingMode( Playlist ); @@ -170,8 +170,7 @@ begin PlaylistMan.CurPlayList := Playlist2; //Start Party - // to-do : Party - //PartySession.StartNewParty(Rounds + 2); + PartySession.StartNewParty(Rounds + 2); AudioPlayback.PlaySound(SoundLib.Start); //Go to Player Screen diff --git a/src/screens/UScreenPartyPlayer.pas b/src/screens/UScreenPartyPlayer.pas index d38a6435..ea8e8bc5 100644 --- a/src/screens/UScreenPartyPlayer.pas +++ b/src/screens/UScreenPartyPlayer.pas @@ -71,11 +71,18 @@ type implementation -uses UGraphic, UMain, UIni, UTexture, UParty; +uses + UGraphic, + UMain, + UIni, + UTexture, + UParty; function TScreenPartyPlayer.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; var - SDL_ModState: Word; + SDL_ModState: word; + I, J: integer; + procedure IntNext; begin repeat @@ -234,7 +241,7 @@ begin SDLK_RETURN: begin - {//Save PlayerNames + //Save PlayerNames for I := 0 to PartySession.Teams.NumTeams-1 do begin PartySession.Teams.Teaminfo[I].Name := PChar(Button[I*5].Text[0].Text); @@ -245,8 +252,8 @@ begin end; end; - AudioPlayback.PlayStart; - FadeTo(@ScreenPartyNewRound);} + AudioPlayback.PlaySound(SoundLib.Start); + FadeTo(@ScreenPartyNewRound); end; // Up and Down could be done at the same time, @@ -261,8 +268,6 @@ begin end; constructor TScreenPartyPlayer.Create; -//var -// I: integer; // Auto Removed, Unused Variable begin inherited Create; @@ -310,7 +315,7 @@ begin Button[10].Text[0].Text := Ini.NameTeam[2]; // Templates for Names Mod end - {If (PartySession.Teams.NumTeams>=1) then + If (PartySession.Teams.NumTeams>=1) then begin Button[0].Visible := True; Button[1].Visible := (PartySession.Teams.Teaminfo[0].NumPlayers >=1); @@ -359,7 +364,7 @@ begin Button[12].Visible := False; Button[13].Visible := False; Button[14].Visible := False; - end; } + end; end; diff --git a/src/screens/UScreenPartyScore.pas b/src/screens/UScreenPartyScore.pas index bd54d55e..87b4a886 100644 --- a/src/screens/UScreenPartyScore.pas +++ b/src/screens/UScreenPartyScore.pas @@ -93,22 +93,21 @@ begin SDLK_BACKSPACE : begin AudioPlayback.PlaySound(SoundLib.Start); - {if (PartySession.CurRound < High(PartySession.Rounds)) then + if (PartySession.CurRound < High(PartySession.Rounds)) then FadeTo(@ScreenPartyNewRound) - else // to-do : Party + else begin - PartySession.EndRound; } + PartySession.EndRound; FadeTo(@ScreenPartyWin); - //end; + end; end; SDLK_RETURN: begin AudioPlayback.PlaySound(SoundLib.Start); - // to-do : Party - {if (PartySession.CurRound < High(PartySession.Rounds)) then + if (PartySession.CurRound < High(PartySession.Rounds)) then FadeTo(@ScreenPartyNewRound) - else } + else FadeTo(@ScreenPartyWin); end; end; @@ -220,11 +219,11 @@ begin if Static[StaticTeam2].Texture.ScaleW > 99 then Static[StaticTeam2].Texture.ScaleW := 99; if Static[StaticTeam3].Texture.ScaleW > 99 then Static[StaticTeam3].Texture.ScaleW := 99; - //End Last Round // to-do : Party - //PartySession.EndRound; + //End Last Round + PartySession.EndRound; //Set Winnertext - //Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.GetWinnerString(PartySession.CurRound)]); + Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.GetWinnerString(PartySession.CurRound)]); if (ScreenSingModi.PlayerInfo.NumPlayers >= 1) then begin diff --git a/src/screens/UScreenPartyWin.pas b/src/screens/UScreenPartyWin.pas index 6b4a55c0..64a50737 100644 --- a/src/screens/UScreenPartyWin.pas +++ b/src/screens/UScreenPartyWin.pas @@ -127,9 +127,9 @@ begin end; procedure TScreenPartyWin.onShow; -//var -// I: Integer; // Auto Removed, Unused Variable -// Placing: Integer; // Auto Removed, Unused Variable +var + I: Integer; + Placing: TeamOrderArray; Function GetTeamColor(Team: Byte): Cardinal; var @@ -143,13 +143,12 @@ procedure TScreenPartyWin.onShow; begin inherited; - // to-do : Party //Get Team Placing - //Placing := PartySession.GetTeamOrder; + Placing := PartySession.GetTeamOrder; //Set Winnertext - //Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.Teams.Teaminfo[Placing[0]].Name]); - {if (PartySession.Teams.NumTeams >= 1) then + Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.Teams.Teaminfo[Placing[0]].Name]); + if (PartySession.Teams.NumTeams >= 1) then begin Text[TextScoreTeam1].Text := InttoStr(PartySession.Teams.TeamInfo[Placing[0]].Score); Text[TextNameTeam1].Text := String(PartySession.Teams.TeamInfo[Placing[0]].Name); @@ -276,7 +275,7 @@ begin Static[StaticTeam3].Visible := False; Static[StaticTeam3BG].Visible := False; Static[StaticTeam3Deco].Visible := False; - end; } + end; end; procedure TScreenPartyWin.SetAnimationProgress(Progress: real); diff --git a/src/screens/UScreenSong.pas b/src/screens/UScreenSong.pas index 8aa5acca..8f6fafea 100644 --- a/src/screens/UScreenSong.pas +++ b/src/screens/UScreenSong.pas @@ -706,36 +706,36 @@ begin end; SDLK_1: - begin //Joker // to-do : Party - {if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 1) and (PartySession.Teams.Teaminfo[0].Joker > 0) then + begin //Joker + if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 1) and (PartySession.Teams.Teaminfo[0].Joker > 0) then begin //Use Joker Dec(PartySession.Teams.Teaminfo[0].Joker); SelectRandomSong; SetJoker; - end; } + end; end; SDLK_2: begin //Joker - {if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 2) and (PartySession.Teams.Teaminfo[1].Joker > 0) then + if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 2) and (PartySession.Teams.Teaminfo[1].Joker > 0) then begin //Use Joker Dec(PartySession.Teams.Teaminfo[1].Joker); SelectRandomSong; SetJoker; - end; } + end; end; SDLK_3: begin //Joker - {if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 3) and (PartySession.Teams.Teaminfo[2].Joker > 0) then + if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 3) and (PartySession.Teams.Teaminfo[2].Joker > 0) then begin //Use Joker Dec(PartySession.Teams.Teaminfo[2].Joker); SelectRandomSong; SetJoker; - end; } + end; end; end; end; // if (PressedDown) @@ -1775,10 +1775,8 @@ end; procedure TScreenSong.SetJoker; begin // If Party Mode - // to-do : Party if Mode = smPartyMode then //Show Joker that are available begin - (* if (PartySession.Teams.NumTeams >= 1) then begin Static[StaticTeam1Joker1].Visible := (PartySession.Teams.Teaminfo[0].Joker >= 1); @@ -1829,7 +1827,6 @@ begin Static[StaticTeam3Joker4].Visible := false; Static[StaticTeam3Joker5].Visible := false; end; - *) end else begin //Hide all @@ -1920,7 +1917,6 @@ end; //Team No of Team (0-5) procedure TScreenSong.DoJoker (Team: Byte); begin - { if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= Team + 1) and (PartySession.Teams.Teaminfo[Team].Joker > 0) then @@ -1930,7 +1926,6 @@ begin SelectRandomSong; SetJoker; end; - } end; //Detailed Cover Unloading. Unloads the Detailed, uncached Cover of the cur. Song diff --git a/src/screens/UScreenSongMenu.pas b/src/screens/UScreenSongMenu.pas index fb3b0f93..8d75eb67 100644 --- a/src/screens/UScreenSongMenu.pas +++ b/src/screens/UScreenSongMenu.pas @@ -399,19 +399,16 @@ begin begin CurMenu := sMenu; Text[0].Text := Language.Translate('SONG_MENU_NAME_PARTY_JOKER'); - // to-do : Party -{ - Button[0].Visible := (PartySession.Teams.NumTeams >= 1) and (PartySession.Teams.Teaminfo[0].Joker > 0); + + Button[0].Visible := (PartySession.Teams.NumTeams >= 1) and (PartySession.Teams.Teaminfo[0].Joker > 0); Button[1].Visible := (PartySession.Teams.NumTeams >= 2) and (PartySession.Teams.Teaminfo[1].Joker > 0); Button[2].Visible := (PartySession.Teams.NumTeams >= 3) and (PartySession.Teams.Teaminfo[2].Joker > 0); -} Button[3].Visible := true; SelectsS[0].Visible := false; -{ - Button[0].Text[0].Text := String(PartySession.Teams.Teaminfo[0].Name); + + Button[0].Text[0].Text := String(PartySession.Teams.Teaminfo[0].Name); Button[1].Text[0].Text := String(PartySession.Teams.Teaminfo[1].Name); Button[2].Text[0].Text := String(PartySession.Teams.Teaminfo[2].Name); -} Button[3].Text[0].Text := Language.Translate('SONG_MENU_CANCEL'); // set right interaction @@ -422,10 +419,10 @@ begin if (not Button[2].Visible) then Interaction := 4 else - Interaction := 2; + Interaction := 2; end else - Interaction := 1; + Interaction := 1; end; end; -- cgit v1.2.3