aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
authorb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-12 16:56:17 +0000
committerb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-12 16:56:17 +0000
commit8cc30e0a1603053ea7f4830187a47f958d6c5a4b (patch)
treee966d6c4d53ce6a1c5d43ff89ac5ffb395c1be51 /Game/Code/Classes
parentb4c6be78da83bd425b13a0e0a9e4812a6f6dbd81 (diff)
downloadusdx-8cc30e0a1603053ea7f4830187a47f958d6c5a4b.tar.gz
usdx-8cc30e0a1603053ea7f4830187a47f958d6c5a4b.tar.xz
usdx-8cc30e0a1603053ea7f4830187a47f958d6c5a4b.zip
some "progress" with the lyrics
don't understand, why my debug display and what's shown in thy lyric-bar doesn't match (as i see it in the code, it should be the same) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@700 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/ULyrics.pas36
1 files changed, 30 insertions, 6 deletions
diff --git a/Game/Code/Classes/ULyrics.pas b/Game/Code/Classes/ULyrics.pas
index 8eaa2a5f..70031ef0 100644
--- a/Game/Code/Classes/ULyrics.pas
+++ b/Game/Code/Classes/ULyrics.pas
@@ -342,7 +342,7 @@ begin
//Create LyricTexture
//Prepare Ogl
glGetIntegerv(GL_VIEWPORT, @ViewPort);
- glClearColor(0.0,0.0,0.0,0);
+ glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
{glMatrixMode(GL_PROJECTION);
glLoadIdentity;
@@ -356,9 +356,10 @@ begin
Display.ScreenShot;
//Copy to Texture
+ glEnable(GL_ALPHA);
glBindTexture(GL_TEXTURE_2D, LyricLine.Tex);
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 448, 512, 64, 0);
-
+ glDisable(GL_ALPHA);
//Clear Buffer
glClearColor(0,0,0,0);
glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
@@ -383,10 +384,10 @@ Procedure TLyricEngine.Draw (Beat: Real);
begin
DrawLyrics(Beat);
-
+/////// start of debug draw
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_Alpha {GL_ONE_MINUS_SRC_COLOR}, GL_ONE_MINUS_SRC_Alpha);
+ glBlendFunc(GL_SRC_Alpha, GL_ONE_MINUS_SRC_Alpha);
glBindTexture(GL_TEXTURE_2D, PUpperLine^.Tex);
glColor4f(1,1,0,1);
@@ -409,7 +410,7 @@ begin
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
-
+/////// end of debug draw
end;
//---------------
@@ -500,7 +501,7 @@ begin
//Draw complete Sentence
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_COLOR {GL_ONE_MINUS_SRC_COLOR}, GL_ONE_MINUS_SRC_COLOR);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBindTexture(GL_TEXTURE_2D, Line.Tex);
glColorRGB(LineColor_en);
@@ -517,6 +518,29 @@ begin
end
else
begin
+ //Get Start Position:
+ { Start of Line - Width of all Icons + LineWidth/2 (Center}
+ LyricX := X + {(W - ((IconSize + 1) * 6))/2 +} ((IconSize + 1) * 3);
+
+ LyricX2 := LyricX +500{ Line.Width};
+
+ //Draw complete Sentence
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glBindTexture(GL_TEXTURE_2D, Line.Tex);
+
+ glColorRGB(LineColor_akt);
+ glBegin(GL_QUADS);
+ glTexCoord2f(0, 1); glVertex2f(LyricX, Y);
+ glTexCoord2f(0, 0); glVertex2f(LyricX, Y + 64 * W / 512);
+ glTexCoord2f(1, 0); glVertex2f(LyricX2, Y + 64 * W / 512);
+ glTexCoord2f(1, 1); glVertex2f(LyricX2, Y);
+ glEnd;
+
+
+ glDisable(GL_BLEND);
+ glDisable(GL_TEXTURE_2D);
end;