From 94cefdb78044e0f9996e3032de34b690de98b708 Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 23 Jul 2009 12:34:07 +0000 Subject: - revert to 1777 - Ocean.ini and SVN properties are not reverted git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1854 b956fd51-792f-4845-bead-9b4dfca2ff2c --- unicode/src/screens/UScreenPartyScore.pas | 149 +++++++++++++++--------------- 1 file changed, 76 insertions(+), 73 deletions(-) (limited to 'unicode/src/screens/UScreenPartyScore.pas') diff --git a/unicode/src/screens/UScreenPartyScore.pas b/unicode/src/screens/UScreenPartyScore.pas index 4daa77c3..5934a389 100644 --- a/unicode/src/screens/UScreenPartyScore.pas +++ b/unicode/src/screens/UScreenPartyScore.pas @@ -34,42 +34,42 @@ interface {$I switches.inc} uses - UMenu, SDL, + SysUtils, + UMenu, UDisplay, UMusic, - SysUtils, UThemes; type TScreenPartyScore = class(TMenu) public - TextScoreTeam1: cardinal; - TextScoreTeam2: cardinal; - TextScoreTeam3: cardinal; - TextNameTeam1: cardinal; - TextNameTeam2: cardinal; - TextNameTeam3: cardinal; - StaticTeam1: cardinal; - StaticTeam1BG: cardinal; - StaticTeam1Deco: cardinal; - StaticTeam2: cardinal; - StaticTeam2BG: cardinal; - StaticTeam2Deco: cardinal; - StaticTeam3: cardinal; - StaticTeam3BG: cardinal; - StaticTeam3Deco: cardinal; - TextWinner: cardinal; - - DecoTex: array[0..5] of integer; - DecoColor: array[0..5] of Record - R, G, B: real; + TextScoreTeam1: Cardinal; + TextScoreTeam2: Cardinal; + TextScoreTeam3: Cardinal; + TextNameTeam1: Cardinal; + TextNameTeam2: Cardinal; + TextNameTeam3: Cardinal; + StaticTeam1: Cardinal; + StaticTeam1BG: Cardinal; + StaticTeam1Deco: Cardinal; + StaticTeam2: Cardinal; + StaticTeam2BG: Cardinal; + StaticTeam2Deco: Cardinal; + StaticTeam3: Cardinal; + StaticTeam3BG: Cardinal; + StaticTeam3Deco: Cardinal; + TextWinner: Cardinal; + + DecoTex: Array[0..5] of Integer; + DecoColor: Array[0..5] of Record + R, G, B: Real; end; - MaxScore: word; + MaxScore: Word; constructor Create; override; - function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override; + function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override; procedure onShow; override; procedure SetAnimationProgress(Progress: real); override; end; @@ -86,10 +86,10 @@ uses USkins, UUnicodeUtils; -function TScreenPartyScore.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; +function TScreenPartyScore.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; begin Result := true; - if (PressedDown) then + If (PressedDown) Then begin // Key Down // check normal keys case UCS4UpperCase(CharCode) of @@ -106,21 +106,22 @@ 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 + else // to-do : Party begin - PartySession.EndRound; + PartySession.EndRound; } FadeTo(@ScreenPartyWin); - end; + //end; end; SDLK_RETURN: begin AudioPlayback.PlaySound(SoundLib.Start); - if (PartySession.CurRound < High(PartySession.Rounds)) then + // to-do : Party + {if (PartySession.CurRound < High(PartySession.Rounds)) then FadeTo(@ScreenPartyNewRound) - else + else } FadeTo(@ScreenPartyWin); end; end; @@ -131,8 +132,8 @@ constructor TScreenPartyScore.Create; var // I: integer; // Auto Removed, Unused Variable Tex: TTexture; - R, G, B: real; - Color: integer; + R, G, B: Real; + Color: Integer; begin inherited Create; @@ -197,11 +198,12 @@ end; procedure TScreenPartyScore.onShow; var - I, J: integer; - Placings: array [0..5] of byte; + I, J: Integer; + Placings: Array [0..5] of Byte; begin inherited; + //Get Maxscore MaxScore := 0; @@ -216,10 +218,11 @@ begin begin Placings[I] := 0; for J := 0 to ScreenSingModi.PlayerInfo.NumPlayers - 1 do - if (ScreenSingModi.PlayerInfo.Playerinfo[J].Score > ScreenSingModi.PlayerInfo.Playerinfo[I].Score) then + If (ScreenSingModi.PlayerInfo.Playerinfo[J].Score > ScreenSingModi.PlayerInfo.Playerinfo[I].Score) then Inc(Placings[I]); end; + //Set Static Length Static[StaticTeam1].Texture.ScaleW := ScreenSingModi.PlayerInfo.Playerinfo[0].Percentage / 100; Static[StaticTeam2].Texture.ScaleW := ScreenSingModi.PlayerInfo.Playerinfo[1].Percentage / 100; @@ -230,16 +233,16 @@ 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 - PartySession.EndRound; + //End Last Round // to-do : Party + //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 Text[TextScoreTeam1].Text := InttoStr(ScreenSingModi.PlayerInfo.Playerinfo[0].Score); - Text[TextNameTeam1].Text := string(ScreenSingModi.TeamInfo.Teaminfo[0].Name); + Text[TextNameTeam1].Text := String(ScreenSingModi.TeamInfo.Teaminfo[0].Name); //Set Deco Texture if Theme.PartyScore.DecoTextures.ChangeTextures then @@ -250,25 +253,25 @@ begin Static[StaticTeam1Deco].Texture.ColB := DecoColor[Placings[0]].B; end; - Text[TextScoreTeam1].Visible := true; - Text[TextNameTeam1].Visible := true; - Static[StaticTeam1].Visible := true; - Static[StaticTeam1BG].Visible := true; - Static[StaticTeam1Deco].Visible := true; + Text[TextScoreTeam1].Visible := True; + Text[TextNameTeam1].Visible := True; + Static[StaticTeam1].Visible := True; + Static[StaticTeam1BG].Visible := True; + Static[StaticTeam1Deco].Visible := True; end else begin - Text[TextScoreTeam1].Visible := false; - Text[TextNameTeam1].Visible := false; - Static[StaticTeam1].Visible := false; - Static[StaticTeam1BG].Visible := false; - Static[StaticTeam1Deco].Visible := false; + Text[TextScoreTeam1].Visible := False; + Text[TextNameTeam1].Visible := False; + Static[StaticTeam1].Visible := False; + Static[StaticTeam1BG].Visible := False; + Static[StaticTeam1Deco].Visible := False; end; if (ScreenSingModi.PlayerInfo.NumPlayers >= 2) then begin Text[TextScoreTeam2].Text := InttoStr(ScreenSingModi.PlayerInfo.Playerinfo[1].Score); - Text[TextNameTeam2].Text := string(ScreenSingModi.TeamInfo.Teaminfo[1].Name); + Text[TextNameTeam2].Text := String(ScreenSingModi.TeamInfo.Teaminfo[1].Name); //Set Deco Texture if Theme.PartyScore.DecoTextures.ChangeTextures then @@ -279,25 +282,25 @@ begin Static[StaticTeam2Deco].Texture.ColB := DecoColor[Placings[1]].B; end; - Text[TextScoreTeam2].Visible := true; - Text[TextNameTeam2].Visible := true; - Static[StaticTeam2].Visible := true; - Static[StaticTeam2BG].Visible := true; - Static[StaticTeam2Deco].Visible := true; + Text[TextScoreTeam2].Visible := True; + Text[TextNameTeam2].Visible := True; + Static[StaticTeam2].Visible := True; + Static[StaticTeam2BG].Visible := True; + Static[StaticTeam2Deco].Visible := True; end else begin - Text[TextScoreTeam2].Visible := false; - Text[TextNameTeam2].Visible := false; - Static[StaticTeam2].Visible := false; - Static[StaticTeam2BG].Visible := false; - Static[StaticTeam2Deco].Visible := false; + Text[TextScoreTeam2].Visible := False; + Text[TextNameTeam2].Visible := False; + Static[StaticTeam2].Visible := False; + Static[StaticTeam2BG].Visible := False; + Static[StaticTeam2Deco].Visible := False; end; if (ScreenSingModi.PlayerInfo.NumPlayers >= 3) then begin Text[TextScoreTeam3].Text := InttoStr(ScreenSingModi.PlayerInfo.Playerinfo[2].Score); - Text[TextNameTeam3].Text := string(ScreenSingModi.TeamInfo.Teaminfo[2].Name); + Text[TextNameTeam3].Text := String(ScreenSingModi.TeamInfo.Teaminfo[2].Name); //Set Deco Texture if Theme.PartyScore.DecoTextures.ChangeTextures then @@ -308,19 +311,19 @@ begin Static[StaticTeam3Deco].Texture.ColB := DecoColor[Placings[2]].B; end; - Text[TextScoreTeam3].Visible := true; - Text[TextNameTeam3].Visible := true; - Static[StaticTeam3].Visible := true; - Static[StaticTeam3BG].Visible := true; - Static[StaticTeam3Deco].Visible := true; + Text[TextScoreTeam3].Visible := True; + Text[TextNameTeam3].Visible := True; + Static[StaticTeam3].Visible := True; + Static[StaticTeam3BG].Visible := True; + Static[StaticTeam3Deco].Visible := True; end else begin - Text[TextScoreTeam3].Visible := false; - Text[TextNameTeam3].Visible := false; - Static[StaticTeam3].Visible := false; - Static[StaticTeam3BG].Visible := false; - Static[StaticTeam3Deco].Visible := false; + Text[TextScoreTeam3].Visible := False; + Text[TextNameTeam3].Visible := False; + Static[StaticTeam3].Visible := False; + Static[StaticTeam3BG].Visible := False; + Static[StaticTeam3Deco].Visible := False; end; end; -- cgit v1.2.3