aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/screens/UScreenPartyScore.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 14:42:01 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 14:42:01 +0000
commit3dc26d2e5c5b360f844ea23c3f60ea4178f6f883 (patch)
tree2ddcbe47e8dd263197346d7fb523558455bef476 /unicode/src/screens/UScreenPartyScore.pas
parent94cefdb78044e0f9996e3032de34b690de98b708 (diff)
downloadusdx-3dc26d2e5c5b360f844ea23c3f60ea4178f6f883.tar.gz
usdx-3dc26d2e5c5b360f844ea23c3f60ea4178f6f883.tar.xz
usdx-3dc26d2e5c5b360f844ea23c3f60ea4178f6f883.zip
merge with current trunk revision 1827
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1855 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'unicode/src/screens/UScreenPartyScore.pas')
-rw-r--r--unicode/src/screens/UScreenPartyScore.pas145
1 files changed, 71 insertions, 74 deletions
diff --git a/unicode/src/screens/UScreenPartyScore.pas b/unicode/src/screens/UScreenPartyScore.pas
index 5934a389..6b6d98e6 100644
--- a/unicode/src/screens/UScreenPartyScore.pas
+++ b/unicode/src/screens/UScreenPartyScore.pas
@@ -44,32 +44,32 @@ uses
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,22 +106,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;
@@ -132,8 +131,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;
@@ -198,12 +197,11 @@ 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;
@@ -218,11 +216,10 @@ 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;
@@ -233,16 +230,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 // 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
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
@@ -253,25 +250,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
@@ -282,25 +279,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
@@ -311,19 +308,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;