From 5ed6620bad808381fce94f2cd67ee911b4d45bff Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Wed, 21 Mar 2007 19:19:04 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyWin.pas | 157 ++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 Game/Code/Screens/UScreenPartyWin.pas (limited to 'Game/Code/Screens/UScreenPartyWin.pas') diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas new file mode 100644 index 00000000..ac5f38d9 --- /dev/null +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -0,0 +1,157 @@ +unit UScreenPartyWin; + +interface + +uses + UMenu, SDL, UDisplay, UMusic, SysUtils, UThemes; + +type + TScreenPartyWin = class(TMenu) + public + TextScoreTeam1: Cardinal; + TextScoreTeam2: Cardinal; + TextScoreTeam3: Cardinal; + TextNameTeam1: Cardinal; + TextNameTeam2: Cardinal; + TextNameTeam3: Cardinal; + StaticTeam1: Cardinal; + StaticTeam2: Cardinal; + StaticTeam3: Cardinal; + TextWinner: Cardinal; + + constructor Create; override; + function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override; + procedure onShow; override; + procedure SetAnimationProgress(Progress: real); override; + end; + +implementation + +uses UGraphic, UMain, UParty, UScreenSingModi, ULanguage; + +function TScreenPartyWin.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; +begin + Result := true; + If (PressedDown) Then + begin // Key Down + case PressedKey of + SDLK_Q: + begin + Result := false; + end; + + SDLK_ESCAPE : + begin + Music.PlayStart; + FadeTo(@ScreenMain); + end; + + SDLK_RETURN: + begin + Music.PlayStart; + FadeTo(@ScreenMain); + end; + end; + end; +end; + +constructor TScreenPartyWin.Create; +var + I: integer; +begin + inherited Create; + + AddBackground(Theme.PartyWin.Background.Tex); + + TextScoreTeam1 := AddText (Theme.PartyWin.TextScoreTeam1); + TextScoreTeam2 := AddText (Theme.PartyWin.TextScoreTeam2); + TextScoreTeam3 := AddText (Theme.PartyWin.TextScoreTeam3); + TextNameTeam1 := AddText (Theme.PartyWin.TextNameTeam1); + TextNameTeam2 := AddText (Theme.PartyWin.TextNameTeam2); + TextNameTeam3 := AddText (Theme.PartyWin.TextNameTeam3); + + StaticTeam1 := AddStatic (Theme.PartyWin.StaticTeam1); + StaticTeam2 := AddStatic (Theme.PartyWin.StaticTeam2); + StaticTeam3 := AddStatic (Theme.PartyWin.StaticTeam3); + + TextWinner := AddText (Theme.PartyWin.TextWinner); + + for I := 0 to High(Theme.PartyWin.Static) do + AddStatic(Theme.PartyWin.Static[I]); + + for I := 0 to High(Theme.PartyWin.Text) do + AddText(Theme.PartyWin.Text[I]); +end; + +procedure TScreenPartyWin.onShow; +var + I: Integer; +begin + + //Set Winnertext + Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.GetWinnerString(255)]); + + 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); + + Text[TextScoreTeam1].Visible := True; + Text[TextNameTeam1].Visible := True; + Static[StaticTeam1].Visible := True; + end + else + begin + Text[TextScoreTeam1].Visible := False; + Text[TextNameTeam1].Visible := False; + Static[StaticTeam1].Visible := False; + end; + + if (PartySession.Teams.NumTeams >= 2) then + begin + Text[TextScoreTeam2].Text := InttoStr(PartySession.Teams.TeamInfo[1].Score); + Text[TextNameTeam2].Text := String(PartySession.Teams.TeamInfo[1].Name); + + Text[TextScoreTeam2].Visible := True; + Text[TextNameTeam2].Visible := True; + Static[StaticTeam2].Visible := True; + end + else + begin + Text[TextScoreTeam2].Visible := False; + Text[TextNameTeam2].Visible := False; + Static[StaticTeam2].Visible := False; + end; + + if (PartySession.Teams.NumTeams >= 3) then + begin + Text[TextScoreTeam3].Text := InttoStr(PartySession.Teams.TeamInfo[2].Score); + Text[TextNameTeam3].Text := String(PartySession.Teams.TeamInfo[2].Name); + + Text[TextScoreTeam3].Visible := True; + Text[TextNameTeam3].Visible := True; + Static[StaticTeam3].Visible := True; + end + else + begin + Text[TextScoreTeam3].Visible := False; + Text[TextNameTeam3].Visible := False; + Static[StaticTeam3].Visible := False; + end; + + +// LCD.WriteText(1, ' Choose mode: '); +// UpdateLCD; +end; + +procedure TScreenPartyWin.SetAnimationProgress(Progress: real); +begin + {if (ScreenSingModi.PlayerInfo.NumPlayers >= 1) then + Static[StaticTeam1].Texture.ScaleW := Progress * ScreenSingModi.PlayerInfo.Playerinfo[0].Score / maxScore; + if (ScreenSingModi.PlayerInfo.NumPlayers >= 2) then + Static[StaticTeam2].Texture.ScaleW := Progress * ScreenSingModi.PlayerInfo.Playerinfo[1].Score / maxScore; + if (ScreenSingModi.PlayerInfo.NumPlayers >= 3) then + Static[StaticTeam3].Texture.ScaleW := Progress * ScreenSingModi.PlayerInfo.Playerinfo[2].Score / maxScore;} +end; + +end. -- cgit v1.2.3 From bda4fa8e57ca63a1d591433f120b4226d6a5d327 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Sun, 29 Apr 2007 17:50:29 +0000 Subject: Added 2 new Buttons to ScreenMain: Multi and Stats Updated Language Fiels to Fit with new Buttons Some CodeClean Up in Menu Class and in Screens Some minor Bug fixes I forgot about Added ability to group Buttons within a Screen New Theme Object: ButtonCollection: Same Attributes as a Button Plus FirstChild: Defining the First Button in the Group. For Example: SingSolo is 1, SingMulti Button is 2, in ScreenMain Added Attribute to Theme Button: Parent: Number of the assigned Group, 0 for no Group Used new Abilitys in MainScreen git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@149 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyWin.pas | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'Game/Code/Screens/UScreenPartyWin.pas') diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas index ac5f38d9..ff65e82f 100644 --- a/Game/Code/Screens/UScreenPartyWin.pas +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -61,8 +61,6 @@ var begin inherited Create; - AddBackground(Theme.PartyWin.Background.Tex); - TextScoreTeam1 := AddText (Theme.PartyWin.TextScoreTeam1); TextScoreTeam2 := AddText (Theme.PartyWin.TextScoreTeam2); TextScoreTeam3 := AddText (Theme.PartyWin.TextScoreTeam3); @@ -76,11 +74,7 @@ begin TextWinner := AddText (Theme.PartyWin.TextWinner); - for I := 0 to High(Theme.PartyWin.Static) do - AddStatic(Theme.PartyWin.Static[I]); - - for I := 0 to High(Theme.PartyWin.Text) do - AddText(Theme.PartyWin.Text[I]); + LoadFromTheme(Theme.PartyWin); end; procedure TScreenPartyWin.onShow; -- cgit v1.2.3 From e0b0396acf6101acf2608d9fe4b36fa735196b2a Mon Sep 17 00:00:00 2001 From: mota23 Date: Wed, 9 May 2007 03:26:41 +0000 Subject: Some Themework done. Added new Statics to PartyWin. [PartyWinStaticTeam(n)BG and Deco] Fix: bug in PartyScore (esc skipped to PartyNewRound where PartyWin should come) Disabled Esc in PartyWin. To do: Sing-Screen, Stats git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@183 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyWin.pas | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'Game/Code/Screens/UScreenPartyWin.pas') diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas index ff65e82f..a6486f67 100644 --- a/Game/Code/Screens/UScreenPartyWin.pas +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -15,10 +15,16 @@ type TextNameTeam2: Cardinal; TextNameTeam3: Cardinal; StaticTeam1: Cardinal; + StaticTeam1BG: Cardinal; + StaticTeam1Deco: Cardinal; StaticTeam2: Cardinal; + StaticTeam2BG: Cardinal; + StaticTeam2Deco: Cardinal; StaticTeam3: Cardinal; + StaticTeam3BG: Cardinal; + StaticTeam3Deco: Cardinal; TextWinner: Cardinal; - + constructor Create; override; function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override; procedure onShow; override; @@ -40,11 +46,11 @@ begin Result := false; end; - SDLK_ESCAPE : + {SDLK_ESCAPE : begin Music.PlayStart; FadeTo(@ScreenMain); - end; + end;} SDLK_RETURN: begin @@ -69,8 +75,14 @@ begin TextNameTeam3 := AddText (Theme.PartyWin.TextNameTeam3); StaticTeam1 := AddStatic (Theme.PartyWin.StaticTeam1); + StaticTeam1BG := AddStatic (Theme.PartyWin.StaticTeam1BG); + StaticTeam1Deco := AddStatic (Theme.PartyWin.StaticTeam1Deco); StaticTeam2 := AddStatic (Theme.PartyWin.StaticTeam2); + StaticTeam2BG := AddStatic (Theme.PartyWin.StaticTeam2BG); + StaticTeam2Deco := AddStatic (Theme.PartyWin.StaticTeam2Deco); StaticTeam3 := AddStatic (Theme.PartyWin.StaticTeam3); + StaticTeam3BG := AddStatic (Theme.PartyWin.StaticTeam3BG); + StaticTeam3Deco := AddStatic (Theme.PartyWin.StaticTeam3Deco); TextWinner := AddText (Theme.PartyWin.TextWinner); @@ -93,12 +105,16 @@ begin 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; end; if (PartySession.Teams.NumTeams >= 2) then @@ -109,12 +125,16 @@ begin 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; end; if (PartySession.Teams.NumTeams >= 3) then @@ -125,12 +145,16 @@ begin 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; end; -- cgit v1.2.3 From 4036ca0937c05444b23018a19d69d1aef90495db Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Sat, 12 May 2007 09:17:15 +0000 Subject: Party Win Screen now works the way it should. The Statics are sorted by Score git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@190 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyWin.pas | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'Game/Code/Screens/UScreenPartyWin.pas') diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas index a6486f67..1c4549a4 100644 --- a/Game/Code/Screens/UScreenPartyWin.pas +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -46,11 +46,11 @@ begin Result := false; end; - {SDLK_ESCAPE : + SDLK_ESCAPE : begin Music.PlayStart; FadeTo(@ScreenMain); - end;} + end; SDLK_RETURN: begin @@ -92,15 +92,18 @@ end; procedure TScreenPartyWin.onShow; var I: Integer; + Placing: TeamOrderArray; begin - + //Get Team Placing + Placing := PartySession.GetTeamOrder; + //Set Winnertext - Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.GetWinnerString(255)]); + 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[0].Score); - Text[TextNameTeam1].Text := String(PartySession.Teams.TeamInfo[0].Name); + Text[TextScoreTeam1].Text := InttoStr(PartySession.Teams.TeamInfo[Placing[0]].Score); + Text[TextNameTeam1].Text := String(PartySession.Teams.TeamInfo[Placing[0]].Name); Text[TextScoreTeam1].Visible := True; Text[TextNameTeam1].Visible := True; @@ -119,8 +122,8 @@ begin if (PartySession.Teams.NumTeams >= 2) then begin - Text[TextScoreTeam2].Text := InttoStr(PartySession.Teams.TeamInfo[1].Score); - Text[TextNameTeam2].Text := String(PartySession.Teams.TeamInfo[1].Name); + Text[TextScoreTeam2].Text := InttoStr(PartySession.Teams.TeamInfo[Placing[1]].Score); + Text[TextNameTeam2].Text := String(PartySession.Teams.TeamInfo[Placing[1]].Name); Text[TextScoreTeam2].Visible := True; Text[TextNameTeam2].Visible := True; @@ -139,8 +142,8 @@ begin if (PartySession.Teams.NumTeams >= 3) then begin - Text[TextScoreTeam3].Text := InttoStr(PartySession.Teams.TeamInfo[2].Score); - Text[TextNameTeam3].Text := String(PartySession.Teams.TeamInfo[2].Name); + Text[TextScoreTeam3].Text := InttoStr(PartySession.Teams.TeamInfo[Placing[2]].Score); + Text[TextNameTeam3].Text := String(PartySession.Teams.TeamInfo[Placing[2]].Name); Text[TextScoreTeam3].Visible := True; Text[TextNameTeam3].Visible := True; -- cgit v1.2.3 From 56980dfdb5a44e03608689d3cd479d5c1c4a6dc4 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Fri, 8 Jun 2007 18:29:33 +0000 Subject: Party Win Screen now changes the colors of the TeamBgs automaticly when Color = TeamColor Changed Deluxe Team to fit the Changes git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@249 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyWin.pas | 77 +++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) (limited to 'Game/Code/Screens/UScreenPartyWin.pas') diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas index 1c4549a4..76d0420f 100644 --- a/Game/Code/Screens/UScreenPartyWin.pas +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -93,6 +93,14 @@ procedure TScreenPartyWin.onShow; var I: Integer; Placing: TeamOrderArray; + Function GetTeamColor(Team: Byte): Cardinal; + var + NameString: String; + begin + NameString := 'P' + InttoStr(Team+1) + 'Dark'; + + Result := ColorExists(NameString); + end; begin //Get Team Placing Placing := PartySession.GetTeamOrder; @@ -110,6 +118,29 @@ begin Static[StaticTeam1].Visible := True; Static[StaticTeam1BG].Visible := True; Static[StaticTeam1Deco].Visible := True; + + //Set Static Color to Team Color + If (Theme.PartyWin.StaticTeam1BG.Color = 'TeamColor') then + begin + I := GetTeamColor(Placing[0]); + if (I <> -1) then + begin + Static[StaticTeam1BG].Texture.ColR := Color[I].RGB.R; + Static[StaticTeam1BG].Texture.ColG := Color[I].RGB.G; + Static[StaticTeam1BG].Texture.ColB := Color[I].RGB.B; + end; + end; + + If (Theme.PartyWin.StaticTeam1.Color = 'TeamColor') then + begin + I := GetTeamColor(Placing[0]); + if (I <> -1) then + begin + Static[StaticTeam1].Texture.ColR := Color[I].RGB.R; + Static[StaticTeam1].Texture.ColG := Color[I].RGB.G; + Static[StaticTeam1].Texture.ColB := Color[I].RGB.B; + end; + end; end else begin @@ -130,6 +161,29 @@ begin Static[StaticTeam2].Visible := True; Static[StaticTeam2BG].Visible := True; Static[StaticTeam2Deco].Visible := True; + + //Set Static Color to Team Color + If (Theme.PartyWin.StaticTeam2BG.Color = 'TeamColor') then + begin + I := GetTeamColor(Placing[1]); + if (I <> -1) then + begin + Static[StaticTeam2BG].Texture.ColR := Color[I].RGB.R; + Static[StaticTeam2BG].Texture.ColG := Color[I].RGB.G; + Static[StaticTeam2BG].Texture.ColB := Color[I].RGB.B; + end; + end; + + If (Theme.PartyWin.StaticTeam2.Color = 'TeamColor') then + begin + I := GetTeamColor(Placing[1]); + if (I <> -1) then + begin + Static[StaticTeam2].Texture.ColR := Color[I].RGB.R; + Static[StaticTeam2].Texture.ColG := Color[I].RGB.G; + Static[StaticTeam2].Texture.ColB := Color[I].RGB.B; + end; + end; end else begin @@ -150,6 +204,29 @@ begin Static[StaticTeam3].Visible := True; Static[StaticTeam3BG].Visible := True; Static[StaticTeam3Deco].Visible := True; + + //Set Static Color to Team Color + If (Theme.PartyWin.StaticTeam3BG.Color = 'TeamColor') then + begin + I := GetTeamColor(Placing[2]); + if (I <> -1) then + begin + Static[StaticTeam3BG].Texture.ColR := Color[I].RGB.R; + Static[StaticTeam3BG].Texture.ColG := Color[I].RGB.G; + Static[StaticTeam3BG].Texture.ColB := Color[I].RGB.B; + end; + end; + + If (Theme.PartyWin.StaticTeam3.Color = 'TeamColor') then + begin + I := GetTeamColor(Placing[2]); + if (I <> -1) then + begin + Static[StaticTeam3].Texture.ColR := Color[I].RGB.R; + Static[StaticTeam3].Texture.ColG := Color[I].RGB.G; + Static[StaticTeam3].Texture.ColB := Color[I].RGB.B; + end; + end; end else begin -- cgit v1.2.3 From 3043d3db91c3a541881aa951bbd4f8ccb5e3ce40 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Wed, 5 Sep 2007 12:35:19 +0000 Subject: modified ParseInput so Backspace will perform same function as ESC in most screens ( Except where text input is required, and backspace is used for text input ) This has been done, so that when used with Windows Media Center IR Remotes ( needs SDL 1.2 dll at runtime ) users can navigate throug the game without sitting in front of the PC keyboard. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@370 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyWin.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Game/Code/Screens/UScreenPartyWin.pas') diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas index 76d0420f..fecca3d1 100644 --- a/Game/Code/Screens/UScreenPartyWin.pas +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -46,7 +46,9 @@ begin Result := false; end; - SDLK_ESCAPE : + + SDLK_ESCAPE, + SDLK_BACKSPACE : begin Music.PlayStart; FadeTo(@ScreenMain); -- cgit v1.2.3 From 44554c7908f7e2405a249331f00a35703f5939c2 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Thu, 11 Oct 2007 12:02:20 +0000 Subject: Added IAudioPlayback Interface and implementation for BASS. Created "AudioPlayback" Global Singleton, which removed the need for the "Music" Global variable. This was done because global singleton objects are a recognized better "design pattern" achieving the same thing as global variables, but in a nicer way. I will be working to a) separate IAudioPlayback in to separate "Playback" and "Input" Interfaces b) build a FFMpeg class that implements IAudioPlayback git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@504 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyWin.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Game/Code/Screens/UScreenPartyWin.pas') diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas index fecca3d1..3c7ad921 100644 --- a/Game/Code/Screens/UScreenPartyWin.pas +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -50,13 +50,13 @@ begin SDLK_ESCAPE, SDLK_BACKSPACE : begin - Music.PlayStart; + AudioPlayback.PlayStart; FadeTo(@ScreenMain); end; SDLK_RETURN: begin - Music.PlayStart; + AudioPlayback.PlayStart; FadeTo(@ScreenMain); end; end; -- cgit v1.2.3 From 391d30716d48dc709f6444b19c008e82311623b9 Mon Sep 17 00:00:00 2001 From: eddie-0815 Date: Thu, 1 Nov 2007 19:34:40 +0000 Subject: Mac OS X version compiles and links. I hope I didn't break too many files on windows/linux. Added switches.inc to all files. Changed many IFDEFs. For Windows-only code please use MSWINDOWS instead of WIN32 now. WIN32 is also used by the Mac port. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@546 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyWin.pas | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Game/Code/Screens/UScreenPartyWin.pas') diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas index 3c7ad921..9806159a 100644 --- a/Game/Code/Screens/UScreenPartyWin.pas +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -2,6 +2,8 @@ unit UScreenPartyWin; interface +{$I switches.inc} + uses UMenu, SDL, UDisplay, UMusic, SysUtils, UThemes; -- cgit v1.2.3 From 5e733f7e9cb2118651df90171db1892c9155e089 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Sun, 4 Nov 2007 21:00:20 +0000 Subject: Partymodule finished. All PartyScreens and SingScreen needs some adapting. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@583 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyWin.pas | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Game/Code/Screens/UScreenPartyWin.pas') diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas index 9806159a..d8a3bd71 100644 --- a/Game/Code/Screens/UScreenPartyWin.pas +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -96,7 +96,7 @@ end; procedure TScreenPartyWin.onShow; var I: Integer; - Placing: TeamOrderArray; + Placing: Integer; Function GetTeamColor(Team: Byte): Cardinal; var NameString: String; @@ -106,13 +106,13 @@ var Result := ColorExists(NameString); end; begin + // to-do : Party //Get Team Placing - Placing := PartySession.GetTeamOrder; - - //Set Winnertext - Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.Teams.Teaminfo[Placing[0]].Name]); + //Placing := PartySession.GetTeamOrder; - if (PartySession.Teams.NumTeams >= 1) then + //Set Winnertext + //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); @@ -239,7 +239,7 @@ begin Static[StaticTeam3].Visible := False; Static[StaticTeam3BG].Visible := False; Static[StaticTeam3Deco].Visible := False; - end; + end; } // LCD.WriteText(1, ' Choose mode: '); -- cgit v1.2.3 From dee94f5dae9e6b5ae6c7b54a12a567745abc8dc3 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 5 Feb 2008 20:36:19 +0000 Subject: General: - cleanup and adaption of SingDrawOscilloscope Portaudio/SDL audio output: - stuttering in portaudio output has been fixed (SDL_MixBuffers cannot be used without initializing the SDL audio stuff first, so it is not usable with portaudio. Now SDL is used for audio-output instead of portaudio (although the file-name is UAudioPlayback_Portaudio.pas at the moment). - cleaner file closing - volume adjustment UMusic: - cleanup of the audio-interfaces - introduced TNoteType = (ntFreestyle, ntNormal, ntGolden) - some bug-fixes - introduced TSoundLibrary. This is library for all in-game sounds used by USDX. Instead of calling AudioPlayer.PlaySwoosh you should call AudioPlayer.PlaySound(SoundLib.Swoosh) now. You might call SoundLib.Swoosh.Play too, but this is not recommended at the moment because SoundLib.Swoosh could be nil if the file was not found. The SoundLibrary approach is much cleaner than the previous one. The AudioPlayer does not have to specify a Play... and Stop... method for every available sound anymore. In addition it is not an AudioPlayers responsibility to init the in-game sounds. URecord: - polish to english translation of some variables - CaptureSoundLeft/Right is CaptureChannel[0/1] now - TSoundCardInput -> TAudioInputDeviceSource - TGenericSoundCard.Input -> TGenericSoundCard.Source - autocorrelation algorithm more readable now - Clean-up of the audio-input interface - moved cloned code of the input-classes to one base class (TAudioInputBase) - Cleaner finalization - Start-/StopCapture will not crash anymore in the recording-options menu - Fixed several bugs in the autocorrelation stuff (e.g. wrong usage of $10000) - SzczytJest (now ToneValid) was not used correctly. ToneValid is set to true if a valid tone was found (= the sound was louder than the threshold -> no background noise). If i remember correctly the sound was accepted although the tone was invalid. So the old data was used although noone was singing. This resulted in some sort of ghost-singer effect. UIni: - moved TIni.Card to TScreenOptionsRecord.Card because it is not stored in the ini-file and will not be in the future. - TIni.CardList ist now TIni.InputDeviceConfig. The name cardlist was misleading because it just specifies input- but no output-devices. In addition a soundcard can have multiple input-devices (at least in linux). - bugfix on InputDeviceConfig (formerly CardList) usage. USDX expected that the indices of the corresponding elements in TIni.InputDeviceConfig[] and TAudioInputProcessor.Device[] were the same. This is wrong. If device 2 was defined at first place in the ini and device 1 at the second, the indices of the two arrays didn't match (they were swapped) erroneously. To fix this and to support the item listed below the index to TIni.InputDeviceConfig[] is now stored in TAudioInputDevice.CfgIndex. NOTE: InputDeviceConfig[] contains configurations of non-available (unplugged) devices. Iterate over TAudioInputProcessor.Device[] for available devices. - configurations of external devices that are not plugged in will not be deleted anymore. - multiple definitions of one device in the ini-file will not crash USDX anymore - CardList[I].ChannelL/R now are InputDeviceConfig[I].ChannelToPlayerMap[0/1]. I think the new name is more intuitive because it maps a channel to a player number. Now the both vars are joint to one array. Now it is possible to use loops to process them and we might support more than two input channels on one device in the future (if such devices exist) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@827 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyWin.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Game/Code/Screens/UScreenPartyWin.pas') diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas index d8a3bd71..5960db06 100644 --- a/Game/Code/Screens/UScreenPartyWin.pas +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -52,13 +52,13 @@ begin SDLK_ESCAPE, SDLK_BACKSPACE : begin - AudioPlayback.PlayStart; + AudioPlayback.PlaySound(SoundLib.Start); FadeTo(@ScreenMain); end; SDLK_RETURN: begin - AudioPlayback.PlayStart; + AudioPlayback.PlaySound(SoundLib.Start); FadeTo(@ScreenMain); end; end; -- cgit v1.2.3