aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
authormogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-03 21:09:24 +0000
committermogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-03 21:09:24 +0000
commit0f327cf133373168d94538686b57c22ba364f2a8 (patch)
tree6bdddf941c78a34563c15c942f3aec6a47287915 /Game/Code/Classes
parent3114977b5509c775c93d5ba3d5220a1ff9d363a7 (diff)
downloadusdx-0f327cf133373168d94538686b57c22ba364f2a8.tar.gz
usdx-0f327cf133373168d94538686b57c22ba364f2a8.tar.xz
usdx-0f327cf133373168d94538686b57c22ba364f2a8.zip
Feature: It's now possible to move/skin the time progress thing (no fix positions anymore) (affected: UDraw.pas, UGraphic.pas, UThemes.pas, UScreenSing.pas, UScreenSingModi.pas)
Theme/Skin: Added the time stuff beneath the lyrics (as "the others" did too) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@164 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r--Game/Code/Classes/UDraw.pas65
-rw-r--r--Game/Code/Classes/UGraphic.pas6
-rw-r--r--Game/Code/Classes/UThemes.pas18
3 files changed, 61 insertions, 28 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas
index f5722175..41225c0d 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -12,6 +12,11 @@ procedure SingDrawBeatDelimeters(Left, Top, Right: real; NrCzesci: integer);
procedure SingDrawCzesc(Left, Top, Right: real; NrCzesci: integer; Space: integer);
procedure SingDrawPlayerCzesc(X, Y, W: real; NrGracza: integer; Space: integer);
procedure SingDrawPlayerBGCzesc(Left, Top, Right: real; NrCzesci, NrGracza: integer; Space: integer);
+
+// TimeBar mod
+procedure SingDrawTimeBar();
+// eoa TimeBar mod
+
{ for no use since we have UGraphicClasses
procedure SingDrawStar(X, Y, A: real);
procedure SingGoldenStar(X, Y, A: real);
@@ -615,20 +620,9 @@ begin
// background //BG Fullsize Mod
//SingDrawBackground;
- // time bar
-// Log.LogStatus('Time Bar', 'SingDraw');
- glBegin(GL_QUADS);
- glColor3f(0.9, 0.9, 0.9);
- glVertex2f(140 + 10*ScreenX, 21);
- glVertex2f(140 + 10*ScreenX, 29);
- glVertex2f(330 + 10*ScreenX, 29);
- glVertex2f(330 + 10*ScreenX, 21);
- glColor3f(Skin_TimeR, Skin_TimeG, Skin_TimeB);
- glVertex2f(140 + 10*ScreenX, 21);
- glVertex2f(140 + 10*ScreenX, 29);
- glVertex2f(140 + 10*ScreenX+(330-140)*(Czas.Teraz/Czas.Razem), 29);
- glVertex2f(140 + 10*ScreenX+(330-140)*(Czas.Teraz/Czas.Razem), 21);
- glEnd;
+ //TimeBar mod
+ SingDrawTimeBar();
+ //eoa TimeBar mod
// rysuje paski pod nutami
if PlayersPlay = 1 then
@@ -1020,18 +1014,7 @@ begin
// time bar
// Log.LogStatus('Time Bar', 'SingDraw');
- glBegin(GL_QUADS);
- glColor3f(0.9, 0.9, 0.9);
- glVertex2f(140 + 10*ScreenX, 21);
- glVertex2f(140 + 10*ScreenX, 29);
- glVertex2f(330 + 10*ScreenX, 29);
- glVertex2f(330 + 10*ScreenX, 21);
- glColor3f(Skin_TimeR, Skin_TimeG, Skin_TimeB);
- glVertex2f(140 + 10*ScreenX, 21);
- glVertex2f(140 + 10*ScreenX, 29);
- glVertex2f(140 + 10*ScreenX+(330-140)*(Czas.Teraz/Czas.Razem), 29);
- glVertex2f(140 + 10*ScreenX+(330-140)*(Czas.Teraz/Czas.Razem), 21);
- glEnd;
+ SingDrawTimeBar();
if DLLMan.Selected.ShowNotes then
begin
@@ -1652,5 +1635,35 @@ begin
glDisable(GL_TEXTURE_2D);
end;
+procedure SingDrawTimeBar();
+var x,y: real;
+ width, height: real;
+begin
+ x := Theme.Sing.StaticTimeProgress.x;
+ y := Theme.Sing.StaticTimeProgress.y;
+ width:= Theme.Sing.StaticTimeProgress.w;
+ height:= Theme.Sing.StaticTimeProgress.h;
+
+ glColor4f(Theme.Sing.StaticTimeProgress.ColR,
+ Theme.Sing.StaticTimeProgress.ColG,
+ Theme.Sing.StaticTimeProgress.ColB, 1); //Set Color
+
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_BLEND);
+
+ glBindTexture(GL_TEXTURE_2D, Tex_TimeProgress.TexNum);
+
+ glBegin(GL_QUADS);
+ glTexCoord2f(0, 0); glVertex2f(x,y);
+ glTexCoord2f(0, 1); glVertex2f(x+width*(Czas.Teraz/Czas.Razem), y);
+ glTexCoord2f(1, 1); glVertex2f(x+width*(Czas.Teraz/Czas.Razem), y+height);
+ glTexCoord2f(1, 0); glVertex2f(x, y+height);
+ glEnd;
+
+ glDisable(GL_TEXTURE_2D);
+ glDisable(GL_BLEND);
+ glcolor4f(1,1,1,1);
+end;
+
end.
diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas
index 8b17a73d..7fd159f7 100644
--- a/Game/Code/Classes/UGraphic.pas
+++ b/Game/Code/Classes/UGraphic.pas
@@ -93,7 +93,7 @@ var
Tex_Lyric_Help_Bar: TTexture;
FullScreen: boolean;
-
+ Tex_TimeProgress: TTexture;
//Sing Bar Mod
Tex_SingBar_Back: TTexture;
@@ -211,6 +211,10 @@ begin
Tex_Lyric_Help_Bar := Texture.LoadTexture(pchar(Skin.GetTextureFileName('LyricHelpBar')), 'BMP', 'Transparent', $FF00FF);
+ //TimeBar mod
+ Tex_TimeProgress := Texture.LoadTexture(pchar(Skin.GetTextureFileName('TimeBar')));
+ //eoa TimeBar mod
+
//SingBar Mod
Tex_SingBar_Back := Texture.LoadTexture(pchar(Skin.GetTextureFileName('SingBarBack')), 'JPG', 'Plain', 0);
Tex_SingBar_Bar := Texture.LoadTexture(pchar(Skin.GetTextureFileName('SingBarBar')), 'JPG', 'Plain', 0);
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas
index ee88ca9c..7f4763c3 100644
--- a/Game/Code/Classes/UThemes.pas
+++ b/Game/Code/Classes/UThemes.pas
@@ -296,9 +296,15 @@ type
end;
TThemeSing = class(TThemeBasic)
+
+ //TimeBar mod
+ StaticTimeProgress: TThemeStatic;
+ TextTimeText : TThemeText;
+ //eoa TimeBar mod
+
StaticP1: TThemeStatic;
- StaticP1ScoreBG: TThemeStatic; //Static for ScoreBG
TextP1: TThemeText;
+ StaticP1ScoreBG: TThemeStatic; //Static for ScoreBG
TextP1Score: TThemeText;
//moveable singbar mod
@@ -988,6 +994,11 @@ begin
// Sing
ThemeLoadBasic(Sing, 'Sing');
+ //TimeBar mod
+ ThemeLoadStatic(Sing.StaticTimeProgress, 'SingTimeProgress');
+ ThemeLoadText(Sing.TextTimeText, 'SingTimeText');
+ //eoa TimeBar mod
+
//moveable singbar mod
ThemeLoadStatic(Sing.StaticP1SingBar, 'SingP1SingBar');
ThemeLoadStatic(Sing.StaticP1TwoPSingBar, 'SingP1TwoPSingBar');
@@ -1973,6 +1984,11 @@ begin
ThemeSaveBasic(Sing, 'Sing');
+ //TimeBar mod
+ ThemeSaveStatic(Sing.StaticTimeProgress, 'SingTimeProgress');
+ ThemeSaveText(Sing.TextTimeText, 'SingTimeText');
+ //eoa TimeBar mod
+
ThemeSaveStatic(Sing.StaticP1, 'SingP1Static');
ThemeSaveText(Sing.TextP1, 'SingP1Text');
ThemeSaveStatic(Sing.StaticP1ScoreBG, 'SingP1Static2');