From b49192ef9d03915744a65009e25f06fafd72bd30 Mon Sep 17 00:00:00 2001 From: mogguh Date: Mon, 23 Apr 2007 21:38:08 +0000 Subject: Feature: SingBar is now moveable via theme/skin (affects UDraw.pas, UThemes.pas, UScreenSing.pas) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@128 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UDraw.pas | 100 +++++++++++++++++++++++++------------- Game/Code/Classes/UThemes.pas | 27 ++++++++++ Game/Code/Screens/UScreenSing.pas | 18 +++++++ 3 files changed, 112 insertions(+), 33 deletions(-) (limited to 'Game/Code') diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index bd6b5db6..d18830ba 100644 --- a/Game/Code/Classes/UDraw.pas +++ b/Game/Code/Classes/UDraw.pas @@ -730,6 +730,7 @@ begin end //SingBar Mod + //modded again to make it moveable: it's working, so why try harder else if Ini.Oscilloscope = 2 then begin A := GetTickCount div 33; if A <> Tickold then begin @@ -741,37 +742,53 @@ begin end; //for end; //if if PlayersPlay = 1 then begin - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1SingBar.x, Theme.Sing.StaticP1SingBar.y, Theme.Sing.StaticP1SingBar.w, Theme.Sing.StaticP1SingBar.h , Player[0].ScorePercent); end; if PlayersPlay = 2 then begin - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); - SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent); end; if PlayersPlay = 3 then begin - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); - SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); - SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent); end; if PlayersPlay = 4 then begin if ScreenAct = 1 then begin - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); - SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent); end; if ScreenAct = 2 then begin - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); - SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); + //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[3].ScorePercent); end; end; if PlayersPlay = 6 then begin if ScreenAct = 1 then begin - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); - SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); - SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); - end; + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent); + end; if ScreenAct = 2 then begin - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); - SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[4].ScorePercent); - SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[5].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); + //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[4].ScorePercent); + //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[5].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[3].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[4].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[5].ScorePercent); end; end; end; @@ -1134,6 +1151,7 @@ begin end //SingBar Mod + // was fürn sinn hattn der quark hier? else if ((Ini.Oscilloscope = 2) AND (DLLMan.Selected.ShowRateBar_O)) OR (DLLMan.Selected.ShowRateBar) then begin A := GetTickCount div 33; if A <> Tickold then begin @@ -1146,52 +1164,68 @@ begin end; //if if PlayersPlay = 1 then begin if PlayerInfo.Playerinfo[0].Enabled then - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1SingBar.x, Theme.Sing.StaticP1SingBar.y, Theme.Sing.StaticP1SingBar.w, Theme.Sing.StaticP1SingBar.h , Player[0].ScorePercent); end; if PlayersPlay = 2 then begin if PlayerInfo.Playerinfo[0].Enabled then - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent); if PlayerInfo.Playerinfo[1].Enabled then - SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent); end; if PlayersPlay = 3 then begin if PlayerInfo.Playerinfo[0].Enabled then - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent); if PlayerInfo.Playerinfo[1].Enabled then - SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent); if PlayerInfo.Playerinfo[2].Enabled then - SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); + //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent); end; if PlayersPlay = 4 then begin if ScreenAct = 1 then begin if PlayerInfo.Playerinfo[0].Enabled then - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent); if PlayerInfo.Playerinfo[1].Enabled then - SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent); end; if ScreenAct = 2 then begin if PlayerInfo.Playerinfo[2].Enabled then - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[2].ScorePercent); if PlayerInfo.Playerinfo[3].Enabled then - SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); + //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[3].ScorePercent); end; end; if PlayersPlay = 6 then begin if ScreenAct = 1 then begin if PlayerInfo.Playerinfo[0].Enabled then - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent); if PlayerInfo.Playerinfo[1].Enabled then - SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent); if PlayerInfo.Playerinfo[2].Enabled then - SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); + //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent); end; if ScreenAct = 2 then begin if PlayerInfo.Playerinfo[3].Enabled then - SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); + //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[3].ScorePercent); if PlayerInfo.Playerinfo[4].Enabled then - SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[4].ScorePercent); + //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[4].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[4].ScorePercent); if PlayerInfo.Playerinfo[5].Enabled then - SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[5].ScorePercent); + //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[5].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[5].ScorePercent); end; end; end; diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas index 4f4ab2b9..33cf4258 100644 --- a/Game/Code/Classes/UThemes.pas +++ b/Game/Code/Classes/UThemes.pas @@ -272,6 +272,15 @@ type TextP1: TThemeText; TextP1Score: TThemeText; + //moveable singbar mod + StaticP1SingBar: TThemeStatic; + StaticP1ThreePSingBar: TThemeStatic; + StaticP1TwoPSingBar: TThemeStatic; + StaticP2RSingBar: TThemeStatic; + StaticP2MSingBar: TThemeStatic; + StaticP3SingBar: TThemeStatic; + //eoa moveable singbar + //added for ps3 skin //game in 2/4 player modi StaticP1TwoP: TThemeStatic; @@ -914,6 +923,15 @@ begin // Sing ThemeLoadBasic(Sing, 'Sing'); + //moveable singbar mod + ThemeLoadStatic(Sing.StaticP1SingBar, 'SingP1SingBar'); + ThemeLoadStatic(Sing.StaticP1TwoPSingBar, 'SingP1TwoPSingBar'); + ThemeLoadStatic(Sing.StaticP1ThreePSingBar, 'SingP1ThreePSingBar'); + ThemeLoadStatic(Sing.StaticP2RSingBar, 'SingP2RSingBar'); + ThemeLoadStatic(Sing.StaticP2MSingBar, 'SingP2MSingBar'); + ThemeLoadStatic(Sing.StaticP3SingBar, 'SingP3SingBar'); + //eoa moveable singbar + ThemeLoadStatic(Sing.StaticP1, 'SingP1Static'); ThemeLoadText(Sing.TextP1, 'SingP1Text'); ThemeLoadStatic(Sing.StaticP1ScoreBG, 'SingP1Static2'); @@ -1814,6 +1832,15 @@ begin ThemeSaveStatic(Sing.StaticP1ScoreBG, 'SingP1Static2'); ThemeSaveText(Sing.TextP1Score, 'SingP1TextScore'); + //moveable singbar mod + ThemeSaveStatic(Sing.StaticP1SingBar, 'SingP1SingBar'); + ThemeSaveStatic(Sing.StaticP1TwoPSingBar, 'SingP1TwoPSingBar'); + ThemeSaveStatic(Sing.StaticP1ThreePSingBar, 'SingP1ThreePSingBar'); + ThemeSaveStatic(Sing.StaticP2RSingBar, 'SingP2RSingBar'); + ThemeSaveStatic(Sing.StaticP2MSingBar, 'SingP2MSingBar'); + ThemeSaveStatic(Sing.StaticP3SingBar, 'SingP3SingBar'); + //eoa moveable singbar + //Added for ps3 skin //This one is shown in 2/4P mode ThemeSaveStatic(Sing.StaticP1TwoP, 'SingP1TwoPStatic'); diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index 6cd444a2..01195db2 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -19,6 +19,15 @@ type TextP1: integer; TextP1Score: integer; + //moveable singbar mod + StaticP1SingBar: integer; + StaticP1ThreePSingBar: integer; + StaticP1TwoPSingBar: integer; + StaticP2RSingBar: integer; + StaticP2MSingBar: integer; + StaticP3SingBar: integer; + //eoa moveable singbar + //Added for ps3 skin //shown when game is in 2/4 player modus StaticP1TwoP: integer; @@ -170,6 +179,15 @@ begin TextP1 := AddText(Theme.Sing.TextP1); TextP1Score := AddText(Theme.Sing.TextP1Score); + //moveable singbar mod + StaticP1SingBar := AddStatic(Theme.Sing.StaticP1SingBar); + StaticP1ThreePSingBar := AddStatic(Theme.Sing.StaticP1ThreePSingBar); + StaticP1TwoPSingBar := AddStatic(Theme.Sing.StaticP2RSingBar); + StaticP2RSingBar := AddStatic(Theme.Sing.StaticP2RSingBar); + StaticP2MSingBar := AddStatic(Theme.Sing.StaticP2MSingBar); + StaticP3SingBar := AddStatic(Theme.Sing.StaticP3SingBar); + //eoa moveable singbar + //Added for ps3 skin //This one is shown in 2/4P mode StaticP1TwoP := AddStatic(Theme.Sing.StaticP1TwoP); -- cgit v1.2.3