aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2011-04-20 11:01:31 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2011-04-20 11:01:31 +0000
commitfb9fe1202a541b911332e69d7c157197dcb9cc61 (patch)
treede00b2b8580ce2f118b4cef0a7f24acb2a90da0f
parentaa36a7f8abc90d07b454c97dce141f9921c7bc35 (diff)
downloadusdx-fb9fe1202a541b911332e69d7c157197dcb9cc61.tar.gz
usdx-fb9fe1202a541b911332e69d7c157197dcb9cc61.tar.xz
usdx-fb9fe1202a541b911332e69d7c157197dcb9cc61.zip
new option: "LyricGolden" On/Off: draw golden lyrics yellow instead of blue.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2826 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Game/Code/Classes/UIni.pas11
-rw-r--r--Game/Code/Classes/ULyrics.pas94
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas40
-rw-r--r--Game/Code/Screens/UScreenSing.pas75
4 files changed, 137 insertions, 83 deletions
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas
index 8323345b..3546e196 100644
--- a/Game/Code/Classes/UIni.pas
+++ b/Game/Code/Classes/UIni.pas
@@ -62,6 +62,7 @@ type
LyricsFont: integer;
LyricsEffect: integer;
Solmization: integer;
+ LyricsGolden: integer;
// Themes
Theme: integer;
@@ -182,6 +183,7 @@ const
ILyricsFont: array[0..2] of string = ('Plain', 'OLine1', 'OLine2');
ILyricsEffect: array[0..3] of string = ('Simple', 'Zoom', 'Slide', 'Ball');
ISolmization: array[0..3] of string = ('Off', 'Euro', 'Jap', 'American');
+ ILyricsGolden: array[0..1] of string = ('Off', 'On');
IColor: array[0..8] of string = ('Blue', 'Green', 'Pink', 'Red', 'Violet', 'Orange', 'Yellow', 'Brown', 'Black');
@@ -477,6 +479,11 @@ begin
for Pet := 0 to High(ISolmization) do
if Tekst = ISolmization[Pet] then Ini.Solmization := Pet;
+ // LyricsGolden
+ Tekst := IniFile.ReadString('Lyrics', 'LyricsGolden', ILyricsGolden[0]);
+ for Pet := 0 to High(ILyricsGolden) do
+ if Tekst = ILyricsGolden[Pet] then Ini.LyricsGolden := Pet;
+
// Theme
//Theme List Patch
@@ -862,6 +869,10 @@ begin
Tekst := ISolmization[Ini.Solmization];
IniFile.WriteString('Lyrics', 'Solmization', Tekst);
+ // LyricsGolden
+ Tekst := ILyricsGolden[Ini.LyricsGolden];
+ IniFile.WriteString('Lyrics', 'LyricsGolden', Tekst);
+
// Theme
Tekst := ITheme[Ini.Theme];
IniFile.WriteString('Themes', 'Theme', Tekst);
diff --git a/Game/Code/Classes/ULyrics.pas b/Game/Code/Classes/ULyrics.pas
index 0b301260..6f374d1e 100644
--- a/Game/Code/Classes/ULyrics.pas
+++ b/Game/Code/Classes/ULyrics.pas
@@ -1,7 +1,7 @@
unit ULyrics;
interface
-uses SysUtils, gl, glext, UMusic;
+uses SysUtils, gl, glext, UMusic, UIni;
type
TWord = record
@@ -10,6 +10,7 @@ type
Size: real;
Width: real;
Text: string;
+ Color: integer; //0=normal, 1=golden
ColR: real;
ColG: real;
ColB: real;
@@ -49,12 +50,13 @@ type
procedure DrawScaled(W: integer);
procedure DrawSlide(W: integer);
public
- ColR: real;
- ColG: real;
- ColB: real;
- ColSR: real;
- ColSG: real;
- ColSB: real;
+ ColR: array [0..1] of real;
+ ColG: array [0..1] of real;
+ ColB: array [0..1] of real;
+ ColSR: array [0..1] of real;
+ ColSG: array [0..1] of real;
+ ColSB: array [0..1] of real;
+
Italic: boolean;
Text: string; // LCD
@@ -69,7 +71,7 @@ type
property Scale: real write SetScale;
property Style: integer write SetStyle;
property FontStyle: integer write SetFStyle;
- procedure AddWord(Text: string);
+ procedure AddWord(Text: string; Golden: boolean);
procedure AddCzesc(CP, NrCzesci: integer); //AddLine?
procedure ChangeCurText(Text: String);
@@ -140,43 +142,51 @@ procedure TLyric.SetSelected(Value: integer);
var
W: integer;
begin
- if (StyleI = 0) or (StyleI = 2) or (StyleI = 4) then begin
- if (SelectedI > -1) and (SelectedI <= High(Word)) then begin
+ if (StyleI = 0) or (StyleI = 2) or (StyleI = 4) then
+ begin
+ if (SelectedI > -1) and (SelectedI <= High(Word)) then
+ begin
Word[SelectedI].Selected := false;
- Word[SelectedI].ColR := ColR;
- Word[SelectedI].ColG := ColG;
- Word[SelectedI].ColB := ColB;
+ Word[SelectedI].ColR := ColR[Word[SelectedI].Color];
+ Word[SelectedI].ColG := ColG[Word[SelectedI].Color];
+ Word[SelectedI].ColB := ColB[Word[SelectedI].Color];
Word[SelectedI].Done := 0;
end;
SelectedI := Value;
- if (Value > -1) and (Value <= High(Word)) then begin
+ if (Value > -1) and (Value <= High(Word)) then
+ begin
Word[Value].Selected := true;
- Word[Value].ColR := ColSR;
- Word[Value].ColG := ColSG;
- Word[Value].ColB := ColSB;
+ Word[Value].ColR := ColSR[Word[Value].Color];
+ Word[Value].ColG := ColSG[Word[Value].Color];
+ Word[Value].ColB := ColSB[Word[Value].Color];
Word[Value].Scale := ScaleR;
end;
end;
- if (StyleI = 1) or (StyleI = 3) then begin
- if (SelectedI > -1) and (SelectedI <= High(Word)) then begin
- for W := SelectedI to High(Word) do begin
+ if (StyleI = 1) or (StyleI = 3) then
+ begin
+ if (SelectedI > -1) and (SelectedI <= High(Word)) then
+ begin
+ for W := SelectedI to High(Word) do
+ begin
Word[W].Selected := false;
- Word[W].ColR := ColR;
- Word[W].ColG := ColG;
- Word[W].ColB := ColB;
+ Word[W].ColR := ColR[Word[W].Color];
+ Word[W].ColG := ColG[Word[W].Color];
+ Word[W].ColB := ColB[Word[W].Color];
Word[W].Done := 0;
end;
end;
SelectedI := Value;
- if (Value > -1) and (Value <= High(Word)) then begin
- for W := 0 to Value do begin
+ if (Value > -1) and (Value <= High(Word)) then
+ begin
+ for W := 0 to Value do
+ begin
Word[W].Selected := true;
- Word[W].ColR := ColSR;
- Word[W].ColG := ColSG;
- Word[W].ColB := ColSB;
+ Word[W].ColR := ColSR[Word[W].Color];
+ Word[W].ColG := ColSG[Word[W].Color];
+ Word[W].ColB := ColSB[Word[W].Color];
Word[W].Scale := ScaleR;
Word[W].Done := 1;
end;
@@ -210,7 +220,7 @@ begin
FontStyleI := Value;
end;
-procedure TLyric.AddWord(Text: string);
+procedure TLyric.AddWord(Text: string; Golden: boolean);
var
WordNum: integer;
begin
@@ -229,9 +239,16 @@ begin
SetFontSize(SizeR);
Word[WordNum].Width := glTextWidth(pchar(Text));
Word[WordNum].Text := Text;
- Word[WordNum].ColR := ColR;
- Word[WordNum].ColG := ColG;
- Word[WordNum].ColB := ColB;
+
+ if not Golden or (Ini.LyricsGolden=0) then
+ Word[WordNum].Color := 0
+ else
+ Word[WordNum].Color := 1;
+
+ Word[WordNum].ColR := ColR[Word[WordNum].Color];
+ Word[WordNum].ColG := ColG[Word[WordNum].Color];
+ Word[WordNum].ColB := ColB[Word[WordNum].Color];
+
Word[WordNum].Scale := 1;
Word[WordNum].Done := 0;
Word[WordNum].Italic := Italic;
@@ -249,13 +266,13 @@ begin
for N := 0 to Czesci[CP].Czesc[NrCzesci].HighNut do
begin
Italic := Czesci[CP].Czesc[NrCzesci].Nuta[N].FreeStyle;
- AddWord(Czesci[CP].Czesc[NrCzesci].Nuta[N].Tekst);
+ AddWord(Czesci[CP].Czesc[NrCzesci].Nuta[N].Tekst, Czesci[CP].Czesc[NrCzesci].Nuta[N].Wartosc=2);
Text := Text + Czesci[CP].Czesc[NrCzesci].Nuta[N].Tekst;
end;
end else
begin
Italic := false;
- AddWord(' ');
+ AddWord(' ', false);
Text := ' ';
end;
Selected := -1;
@@ -263,9 +280,6 @@ end;
procedure TLyric.Clear;
begin
-{ ColR := Skin_FontR;
- ColG := Skin_FontG;
- ColB := Skin_FontB;}
SetLength(Word, 0);
Text := '';
SelectedI := -1;
@@ -364,9 +378,9 @@ begin
SetFontSize(Word[W].Size);
SetFontItalic(Word[W].Italic);
if D = 0 then
- glColor4f(ColR, ColG, ColB, Alpha)
+ glColor4f(Word[W].ColR, Word[W].ColG, Word[W].ColB, Alpha)
else
- glColor4f(ColSR, ColSG, ColSB, Alpha);
+ glColor4f(ColSR[Word[W].Color], ColSG[Word[W].Color], ColSB[Word[W].Color], Alpha);
glPrint(pchar(Word[W].Text));
end;
@@ -395,7 +409,7 @@ begin
SetFontSize(Word[W].Size);
SetFontItalic(Word[W].Italic);
glColor4f(Word[W].ColR, Word[W].ColG, Word[W].ColB, Alpha);
- glPrintDone(pchar(Word[W].Text), D, ColR, ColG, ColB, Alpha);
+ glPrintDone(pchar(Word[W].Text), D, ColR[Word[W].Color], ColG[Word[W].Color], ColB[Word[W].Color], Alpha);
end;
function TLyric.SelectedLetter; // LCD
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index 39ddbf68..b232ff19 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -2670,12 +2670,20 @@ begin
EditorLyric[I].Align := 1;
EditorLyric[I].Size := 13;
- EditorLyric[I].ColR := 0;
- EditorLyric[I].ColG := 0;
- EditorLyric[I].ColB := 0;
- EditorLyric[I].ColSR := Skin_FontHighlightR;
- EditorLyric[I].ColSG := Skin_FontHighlightG;
- EditorLyric[I].ColSB := Skin_FontHighlightB;
+ EditorLyric[I].ColR[0] := 0;
+ EditorLyric[I].ColG[0] := 0;
+ EditorLyric[I].ColB[0] := 0;
+ EditorLyric[I].ColSR[0] := Skin_FontHighlightR;
+ EditorLyric[I].ColSG[0] := Skin_FontHighlightG;
+ EditorLyric[I].ColSB[0] := Skin_FontHighlightB;
+
+ EditorLyric[I].ColR[1] := 0;
+ EditorLyric[I].ColG[1] := 0;
+ EditorLyric[I].ColB[1] := 0;
+ EditorLyric[I].ColSR[1] := Skin_FontHighlightR;
+ EditorLyric[I].ColSG[1] := Skin_FontHighlightG;
+ EditorLyric[I].ColSB[1] := Skin_FontHighlightB;
+
EditorLyric[I].Style := 0;
EditorLyric[I].AddCzesc(I, Czesci[I].Akt);
EditorLyric[I].Selected := 0;
@@ -2969,12 +2977,20 @@ begin
EditorLyric[I].Align := 1;
EditorLyric[I].Size := 13;
- EditorLyric[I].ColR := 0;
- EditorLyric[I].ColG := 0;
- EditorLyric[I].ColB := 0;
- EditorLyric[I].ColSR := Skin_FontHighlightR;
- EditorLyric[I].ColSG := Skin_FontHighlightG;
- EditorLyric[I].ColSB := Skin_FontHighlightB;
+ EditorLyric[I].ColR[0] := 0;
+ EditorLyric[I].ColG[0] := 0;
+ EditorLyric[I].ColB[0] := 0;
+ EditorLyric[I].ColSR[0] := Skin_FontHighlightR;
+ EditorLyric[I].ColSG[0] := Skin_FontHighlightG;
+ EditorLyric[I].ColSB[0] := Skin_FontHighlightB;
+
+ EditorLyric[I].ColR[1] := 0;
+ EditorLyric[I].ColG[1] := 0;
+ EditorLyric[I].ColB[1] := 0;
+ EditorLyric[I].ColSR[1] := Skin_FontHighlightR;
+ EditorLyric[I].ColSG[1] := Skin_FontHighlightG;
+ EditorLyric[I].ColSB[1] := Skin_FontHighlightB;
+
EditorLyric[I].Style := 0;
EditorLyric[I].AddCzesc(I, Czesci[I].Akt);
EditorLyric[I].Selected := 0;
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 9ea55e95..a7bcdc75 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -1314,43 +1314,51 @@ begin
begin
Lyric.FontStyle := 0;
Lyric.Size := 14; // 13
- Lyric.ColR := Skin_FontR;
- Lyric.ColG := Skin_FontG;
- Lyric.ColB := Skin_FontB;
- Lyric.ColSR := 5/255; //26
- Lyric.ColSG := 163/255; //165
- Lyric.ColSB := 210/255; //220
+ Lyric.ColR[0] := Skin_FontR;
+ Lyric.ColG[0] := Skin_FontG;
+ Lyric.ColB[0] := Skin_FontB;
+ Lyric.ColSR[0] := 5/255; //26
+ Lyric.ColSG[0] := 163/255; //165
+ Lyric.ColSB[0] := 210/255; //220
end;
1:
begin
Lyric.FontStyle := 2;
Lyric.Size := 14;
- Lyric.ColR := 0.6;
- Lyric.ColG := 0.6;
- Lyric.ColB := 1;
- Lyric.ColSR := 0.25;
- Lyric.ColSG := 0.25;
- Lyric.ColSB := 1;
+ Lyric.ColR[0] := 0.6;
+ Lyric.ColG[0] := 0.6;
+ Lyric.ColB[0] := 1;
+ Lyric.ColSR[0] := 0.25;
+ Lyric.ColSG[0] := 0.25;
+ Lyric.ColSB[0] := 1;
end;
2:
begin
Lyric.FontStyle := 3;
Lyric.Size := 12;
- Lyric.ColR := 0.6;
- Lyric.ColG := 0.6;
- Lyric.ColB := 1;
- Lyric.ColSR := 0.25;
- Lyric.ColSG := 0.25;
- Lyric.ColSB := 1;
+ Lyric.ColR[0] := 0.6;
+ Lyric.ColG[0] := 0.6;
+ Lyric.ColB[0] := 1;
+ Lyric.ColSR[0] := 0.25;
+ Lyric.ColSG[0] := 0.25;
+ Lyric.ColSB[0] := 1;
end;
- end; // case
+ end; // case
+
+ // Golden Note Color
+ Lyric.ColR[1] := 0.95;
+ Lyric.ColG[1] := 0.95;
+ Lyric.ColB[1] := 0.55;
+ Lyric.ColSR[1] := 0.9;
+ Lyric.ColSG[1] := 0.9;
+ Lyric.ColSB[1] := 0.2;
- case Ini.LyricsEffect of
+ case Ini.LyricsEffect of
0: Lyric.Style := 1; // 0 - one selected, 1 - selected all to the current
1: Lyric.Style := 2;
2: Lyric.Style := 3;
3: Lyric.Style := 4;
- end; // case
+ end; // case
end;
procedure TScreenSing.SetLyricFontSub(Lyric: TLyric);
@@ -1361,27 +1369,32 @@ begin
begin
Lyric.FontStyle := 0;
Lyric.Size := 14; // 13
- Lyric.ColR := 0.4; //0.6
- Lyric.ColG := 0.4; //0.6
- Lyric.ColB := 0.4; //0.6
+ Lyric.ColR[0] := 0.4; //0.6
+ Lyric.ColG[0] := 0.4; //0.6
+ Lyric.ColB[0] := 0.4; //0.6
end;
1:
begin
Lyric.FontStyle := 2;
Lyric.Size := 14;
- Lyric.ColR := 0.8;
- Lyric.ColG := 0.8;
- Lyric.ColB := 0.8;
+ Lyric.ColR[0] := 0.8;
+ Lyric.ColG[0] := 0.8;
+ Lyric.ColB[0] := 0.8;
end;
2:
begin
Lyric.FontStyle := 3;
Lyric.Size := 12;
- Lyric.ColR := 0.8;
- Lyric.ColG := 0.8;
- Lyric.ColB := 0.8;
+ Lyric.ColR[0] := 0.8;
+ Lyric.ColG[0] := 0.8;
+ Lyric.ColB[0] := 0.8;
end;
- end; // case
+ end; // case
+
+ // Golden Note Color
+ Lyric.ColR[1] := 0.95;
+ Lyric.ColG[1] := 0.95;
+ Lyric.ColB[1] := 0.75;
end;
procedure TScreenSing.LoadNextSong;