fixed lyric fading (no popping effect any more)
This commit is contained in:
1 parent
36e15f2c55
commit
bca806b8d3
1 file changed
+15
-5
@@ -851,19 +851,29 @@ namespace Vocaluxe.Screens
|
|||||||
lines[i] = Song.Notes.GetLines(i);
|
lines[i] = Song.Notes.GetLines(i);
|
||||||
CLine[] line = lines[i].Line;
|
CLine[] line = lines[i].Line;
|
||||||
|
|
||||||
// find current line (it must be the same as in UpdateLyrics)
|
// find current line for lyric sub fading (it must be the same as in UpdateLyrics)
|
||||||
int CurrentLine = 0;
|
int CurrentLineSub = 0;
|
||||||
for (int j = 0; j < line.Length; j++)
|
for (int j = 0; j < line.Length; j++)
|
||||||
{
|
{
|
||||||
if (line[j].StartBeat <= _CurrentBeat)
|
if (line[j].StartBeat <= _CurrentBeat)
|
||||||
{
|
{
|
||||||
if (CGame.GetTimeFromBeats(line[j].FirstBeat, Song.BPM) <= _CurrentTime - Song.Gap + 10f)
|
if (CGame.GetTimeFromBeats(line[j].FirstBeat, Song.BPM) <= _CurrentTime - Song.Gap + 10f)
|
||||||
{
|
{
|
||||||
CurrentLine = j;
|
CurrentLineSub = j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// find current line for lyric main fading
|
||||||
|
int CurrentLine = 0;
|
||||||
|
for (int j = 0; j < line.Length; j++)
|
||||||
|
{
|
||||||
|
if (line[j].FirstBeat <= _CurrentBeat)
|
||||||
|
{
|
||||||
|
CurrentLine = j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// default values
|
// default values
|
||||||
Alpha[i * 2] = 1f;
|
Alpha[i * 2] = 1f;
|
||||||
Alpha[i * 2 + 1] = 1f;
|
Alpha[i * 2 + 1] = 1f;
|
||||||
@@ -919,10 +929,10 @@ namespace Vocaluxe.Screens
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sub
|
// sub
|
||||||
if (CurrentLine < line.Length - 2)
|
if (CurrentLineSub < line.Length - 2)
|
||||||
{
|
{
|
||||||
float diff = 0f;
|
float diff = 0f;
|
||||||
diff = CGame.GetTimeFromBeats(line[CurrentLine + 1].FirstBeat, Song.BPM) - CurrentTime;
|
diff = CGame.GetTimeFromBeats(line[CurrentLineSub + 1].FirstBeat, Song.BPM) - CurrentTime;
|
||||||
|
|
||||||
if (diff > dt)
|
if (diff > dt)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user