From e8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 28 Oct 2008 18:57:02 +0000 Subject: - glPrint(Pchar) -> glPrint(string) - glPrintLetter removed - font engine handles FT_PIXEL_MODE_MONO as FT_Glyph_To_Bitmap(FT_RENDER_MODE_NORMAL) might return a 1bit/pixel black/white image instead of 8bit/pixel gray shaded one (happened with 16px japanese glyphs of simsun.ttf, latin ones were correct). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1482 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/ULyrics.pas | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/base/ULyrics.pas') diff --git a/src/base/ULyrics.pas b/src/base/ULyrics.pas index 5c5449b1..82982981 100644 --- a/src/base/ULyrics.pas +++ b/src/base/ULyrics.pas @@ -428,7 +428,7 @@ begin CurWord := @LyricLine.Words[I]; SetFontItalic(CurWord.Freestyle); SetFontPos(PosX, Y); - glPrint(PChar(CurWord.Text)); + glPrint(CurWord.Text); PosX := PosX + CurWord.Width; end; end; @@ -464,7 +464,7 @@ begin // set font size to a reasonable value LyricLine.Height := RequestHeight * 0.9; SetFontSize(LyricLine.Height); - LyricLine.Width := glTextWidth(PChar(LyricLine.Text)); + LyricLine.Width := glTextWidth(LyricLine.Text); // change font-size to fit into the lyric bar if (LyricLine.Width > RequestWidth) then @@ -475,7 +475,7 @@ begin LyricLine.Height := 1; SetFontSize(LyricLine.Height); - LyricLine.Width := glTextWidth(PChar(LyricLine.Text)); + LyricLine.Width := glTextWidth(LyricLine.Text); end; // calc word positions and widths @@ -496,7 +496,7 @@ begin end; CurWord.X := PosX; - CurWord.Width := glTextWidth(PChar(CurWord.Text)); + CurWord.Width := glTextWidth(CurWord.Text); PosX := PosX + CurWord.Width; SetFontItalic(false); end; @@ -540,7 +540,6 @@ begin SetFontStyle(FontStyle); ResetFont(); SetFontSize(Line.Height); - glColor4f(1, 1, 1, 1); // center lyrics LyricX := X + (W - Line.Width) / 2; @@ -670,8 +669,6 @@ begin // draw the ball onto the current word if (LyricsEffect = lfxBall) then begin - glDisable(GL_TEXTURE_2D); - glDisable(GL_BLEND); DrawBall(LyricX + CurWord.X + CurWord.Width * Progress, LyricY - 15 - 15*sin(Progress * Pi), Alpha); end; -- cgit v1.2.3