aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/ULyrics.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-28 18:57:02 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-28 18:57:02 +0000
commite8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec (patch)
tree832c59176b260af0a3e89f058699cec2b9a7dca0 /src/base/ULyrics.pas
parentc01eba6a6494bb583b5bf43bea404b918b5c9c63 (diff)
downloadusdx-e8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec.tar.gz
usdx-e8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec.tar.xz
usdx-e8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec.zip
- 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
Diffstat (limited to 'src/base/ULyrics.pas')
-rw-r--r--src/base/ULyrics.pas11
1 files changed, 4 insertions, 7 deletions
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;