Renamed ambiguous variable names
This commit is contained in:
1 parent
883b35d0f2
commit
1336a6fa36
17 files changed
+126
-133
No files matched your search
+13
-13
@@ -8,17 +8,17 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
private readonly SPlayer[,] _Rounds;
|
||||
|
||||
public CPoints(int NumRounds, SPlayer[] Player)
|
||||
public CPoints(int NumRounds, SPlayer[] Players)
|
||||
{
|
||||
_Rounds = new SPlayer[NumRounds, Player.Length];
|
||||
_Rounds = new SPlayer[NumRounds, Players.Length];
|
||||
|
||||
for (int round = 0; round < NumRounds; round++)
|
||||
{
|
||||
for (int player = 0; player < Player.Length; player++)
|
||||
for (int player = 0; player < Players.Length; player++)
|
||||
{
|
||||
_Rounds[round, player].ProfileID = Player[player].ProfileID;
|
||||
_Rounds[round, player].Name = Player[player].Name;
|
||||
_Rounds[round, player].Difficulty = Player[player].Difficulty;
|
||||
_Rounds[round, player].ProfileID = Players[player].ProfileID;
|
||||
_Rounds[round, player].Name = Players[player].Name;
|
||||
_Rounds[round, player].Difficulty = Players[player].Difficulty;
|
||||
_Rounds[round, player].Points = 0f;
|
||||
_Rounds[round, player].PointsGoldenNotes = 0f;
|
||||
_Rounds[round, player].PointsLineBonus = 0f;
|
||||
@@ -30,21 +30,21 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPoints(int Round, int SongID, SPlayer[] Player, bool Medley, bool Duet, bool ShortSong)
|
||||
public void SetPoints(int Round, int SongID, SPlayer[] Players, bool Medley, bool Duet, bool ShortSong)
|
||||
{
|
||||
long DateTicks = DateTime.Now.Ticks;
|
||||
for (int player = 0; player < Player.Length; player++)
|
||||
for (int player = 0; player < Players.Length; player++)
|
||||
{
|
||||
_Rounds[Round, player].SongID = SongID;
|
||||
_Rounds[Round, player].LineNr = Player[player].LineNr;
|
||||
_Rounds[Round, player].Points = Player[player].Points;
|
||||
_Rounds[Round, player].PointsGoldenNotes = Player[player].PointsGoldenNotes;
|
||||
_Rounds[Round, player].PointsLineBonus = Player[player].PointsLineBonus;
|
||||
_Rounds[Round, player].LineNr = Players[player].LineNr;
|
||||
_Rounds[Round, player].Points = Players[player].Points;
|
||||
_Rounds[Round, player].PointsGoldenNotes = Players[player].PointsGoldenNotes;
|
||||
_Rounds[Round, player].PointsLineBonus = Players[player].PointsLineBonus;
|
||||
_Rounds[Round, player].Medley = Medley;
|
||||
_Rounds[Round, player].Duet = Duet;
|
||||
_Rounds[Round, player].ShortSong = ShortSong;
|
||||
_Rounds[Round, player].DateTicks = DateTicks;
|
||||
_Rounds[Round, player].SongFinished = Player[player].SongFinished;
|
||||
_Rounds[Round, player].SongFinished = Players[player].SongFinished;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,11 +100,11 @@ namespace VocaluxeLib.Menu
|
||||
public void ReloadTextures() {}
|
||||
|
||||
#region Private
|
||||
private int GetIntValue(string _string)
|
||||
private int GetIntValue(string value)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Convert.ToInt32(_string);
|
||||
return Convert.ToInt32(value);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -112,14 +112,14 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
}
|
||||
|
||||
private STexture GetTextureValue(string _string)
|
||||
private STexture GetTextureValue(string value)
|
||||
{
|
||||
return CBase.Theme.GetSkinTexture(_string, _PartyModeID);
|
||||
return CBase.Theme.GetSkinTexture(value, _PartyModeID);
|
||||
}
|
||||
|
||||
private SColorF GetColorValue(string _string)
|
||||
private SColorF GetColorValue(string value)
|
||||
{
|
||||
return CBase.Theme.GetColor(_string, _PartyModeID);
|
||||
return CBase.Theme.GetColor(value, _PartyModeID);
|
||||
}
|
||||
#endregion Private
|
||||
|
||||
|
||||
@@ -866,7 +866,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
private struct Series
|
||||
{
|
||||
public int start;
|
||||
public int Start;
|
||||
public int end;
|
||||
public int length;
|
||||
}
|
||||
@@ -897,7 +897,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
if (sentences[i] == sentences[j] && sentences[i].Length > 0)
|
||||
{
|
||||
Series tempSeries = new Series();
|
||||
tempSeries.start = i;
|
||||
tempSeries.Start = i;
|
||||
tempSeries.end = i;
|
||||
|
||||
int max = 0;
|
||||
@@ -914,7 +914,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
break;
|
||||
}
|
||||
|
||||
tempSeries.length = tempSeries.end - tempSeries.start + 1;
|
||||
tempSeries.length = tempSeries.end - tempSeries.Start + 1;
|
||||
series.Add(tempSeries);
|
||||
}
|
||||
}
|
||||
@@ -953,7 +953,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
// set medley vars
|
||||
if (series.Count > 0 && series[longest].length > CBase.Settings.GetMedleyMinSeriesLength())
|
||||
{
|
||||
Medley.StartBeat = lines.Line[series[longest].start].FirstNoteBeat;
|
||||
Medley.StartBeat = lines.Line[series[longest].Start].FirstNoteBeat;
|
||||
Medley.EndBeat = lines.Line[series[longest].end].LastNoteBeat;
|
||||
|
||||
bool foundEnd = false;
|
||||
@@ -965,7 +965,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
if (!foundEnd)
|
||||
{
|
||||
for (int i = series[longest].start + 1; i < lines.LineCount - 1; i++)
|
||||
for (int i = series[longest].Start + 1; i < lines.LineCount - 1; i++)
|
||||
{
|
||||
if (CBase.Game.GetTimeFromBeats(Medley.StartBeat, BPM) + CBase.Settings.GetMedleyMinDuration() >
|
||||
CBase.Game.GetTimeFromBeats(lines.Line[i].LastNoteBeat, BPM))
|
||||
@@ -1005,11 +1005,11 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
//Check if stop is in series
|
||||
for (int i = 0; i < series.Count; i++)
|
||||
{
|
||||
if (lines.Line[series[i].start].FirstNoteBeat < stop && lines.Line[series[i].end].LastNoteBeat > stop)
|
||||
if (lines.Line[series[i].Start].FirstNoteBeat < stop && lines.Line[series[i].end].LastNoteBeat > stop)
|
||||
{
|
||||
if (stop < (lines.Line[series[i].start].FirstNoteBeat + ((lines.Line[series[i].end].LastNoteBeat - lines.Line[series[i].start].FirstNoteBeat) / 2)))
|
||||
if (stop < (lines.Line[series[i].Start].FirstNoteBeat + ((lines.Line[series[i].end].LastNoteBeat - lines.Line[series[i].Start].FirstNoteBeat) / 2)))
|
||||
{
|
||||
ShortEnd = lines.Line[series[i].start - 1].LastNote.EndBeat;
|
||||
ShortEnd = lines.Line[series[i].Start - 1].LastNote.EndBeat;
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -89,7 +89,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private readonly Stopwatch _timer = new Stopwatch();
|
||||
private readonly Stopwatch _VideoFadeTimer = new Stopwatch();
|
||||
private readonly List<int> _streams = new List<int>();
|
||||
private int _video = -1;
|
||||
private int _actsong = -1;
|
||||
private int _actsongstream = -1;
|
||||
protected STexture _vidtex = new STexture(-1);
|
||||
@@ -171,10 +170,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
get { return _actsongstream; }
|
||||
}
|
||||
|
||||
protected int _Video
|
||||
{
|
||||
get { return _video; }
|
||||
}
|
||||
protected int _Video { get; private set; }
|
||||
|
||||
protected int _ActSong
|
||||
{
|
||||
@@ -427,19 +423,19 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
if (_actsong != _PreviewSelected)
|
||||
SelectSong(_PreviewSelected);
|
||||
|
||||
if (_streams.Count > 0 && _video != -1)
|
||||
if (_streams.Count > 0 && _Video != -1)
|
||||
{
|
||||
if (CBase.Video.IsFinished(_video) || CBase.Sound.IsFinished(_actsongstream))
|
||||
if (CBase.Video.IsFinished(_Video) || CBase.Sound.IsFinished(_actsongstream))
|
||||
{
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
CBase.Video.Close(_Video);
|
||||
_Video = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
float time = CBase.Sound.GetPosition(_actsongstream);
|
||||
|
||||
float vtime = 0f;
|
||||
CBase.Video.GetFrame(_video, ref _vidtex, time, ref vtime);
|
||||
CBase.Video.GetFrame(_Video, ref _vidtex, time, ref vtime);
|
||||
if (_VideoFadeTimer.ElapsedMilliseconds <= 3000L)
|
||||
_vidtex.color.A = _VideoFadeTimer.ElapsedMilliseconds / 3000f;
|
||||
else
|
||||
@@ -462,8 +458,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
CBase.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
_streams.Clear();
|
||||
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
CBase.Video.Close(_Video);
|
||||
_Video = -1;
|
||||
|
||||
CBase.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
@@ -489,7 +485,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
if (!_Initialized || !_Visible)
|
||||
return;
|
||||
|
||||
if (_video != -1)
|
||||
if (_Video != -1)
|
||||
CBase.Drawing.DrawTexture(_vidtex, new SRectF(0, 0, 1280, 720, 0));
|
||||
}
|
||||
|
||||
@@ -608,12 +604,11 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() >= 0 && (CBase.Songs.GetNumVisibleSongs() > 0) && (nr >= 0) && ((_actsong != nr) || (_streams.Count == 0)))
|
||||
{
|
||||
foreach (int stream in _streams)
|
||||
CBase.Sound.FadeAndStop(stream, 0f, 1f);
|
||||
_streams.ForEach(soundStream => CBase.Sound.FadeAndStop(soundStream, 0f, 1f));
|
||||
_streams.Clear();
|
||||
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
CBase.Video.Close(_Video);
|
||||
_Video = -1;
|
||||
|
||||
CBase.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
@@ -622,27 +617,27 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_actsong = 0;
|
||||
|
||||
|
||||
int _stream = CBase.Sound.Load(Path.Combine(CBase.Songs.GetVisibleSong(_actsong).Folder, CBase.Songs.GetVisibleSong(_actsong).MP3FileName), true);
|
||||
CBase.Sound.SetStreamVolumeMax(_stream, _MaxVolume);
|
||||
CBase.Sound.SetStreamVolume(_stream, 0f);
|
||||
int stream = CBase.Sound.Load(Path.Combine(CBase.Songs.GetVisibleSong(_actsong).Folder, CBase.Songs.GetVisibleSong(_actsong).MP3FileName), true);
|
||||
CBase.Sound.SetStreamVolumeMax(stream, _MaxVolume);
|
||||
CBase.Sound.SetStreamVolume(stream, 0f);
|
||||
|
||||
float startposition = CBase.Songs.GetVisibleSong(_actsong).PreviewStart;
|
||||
|
||||
if (startposition == 0f)
|
||||
startposition = CBase.Sound.GetLength(_stream) / 4f;
|
||||
startposition = CBase.Sound.GetLength(stream) / 4f;
|
||||
|
||||
CBase.Sound.SetPosition(_stream, startposition);
|
||||
CBase.Sound.Play(_stream);
|
||||
CBase.Sound.Fade(_stream, 100f, 3f);
|
||||
_streams.Add(_stream);
|
||||
_actsongstream = _stream;
|
||||
CBase.Sound.SetPosition(stream, startposition);
|
||||
CBase.Sound.Play(stream);
|
||||
CBase.Sound.Fade(stream, 100f, 3f);
|
||||
_streams.Add(stream);
|
||||
_actsongstream = stream;
|
||||
|
||||
if (CBase.Songs.GetVisibleSong(_actsong).VideoFileName.Length > 0 && CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
_video = CBase.Video.Load(Path.Combine(CBase.Songs.GetVisibleSong(_actsong).Folder, CBase.Songs.GetVisibleSong(_actsong).VideoFileName));
|
||||
if (_video == -1)
|
||||
_Video = CBase.Video.Load(Path.Combine(CBase.Songs.GetVisibleSong(_actsong).Folder, CBase.Songs.GetVisibleSong(_actsong).VideoFileName));
|
||||
if (_Video == -1)
|
||||
return;
|
||||
CBase.Video.Skip(_video, startposition, CBase.Songs.GetVisibleSong(_actsong).VideoGap);
|
||||
CBase.Video.Skip(_Video, startposition, CBase.Songs.GetVisibleSong(_actsong).VideoGap);
|
||||
_VideoFadeTimer.Stop();
|
||||
_VideoFadeTimer.Reset();
|
||||
_VideoFadeTimer.Start();
|
||||
@@ -656,8 +651,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
CBase.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
_streams.Clear();
|
||||
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
CBase.Video.Close(_Video);
|
||||
_Video = -1;
|
||||
|
||||
CBase.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
|
||||
Reference in new issue
Block a user