Renaming for namesheme
This commit is contained in:
1 parent
1336a6fa36
commit
67da90427b
131 files changed
+11905
-11812
No files matched your search
@@ -25,41 +25,41 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_Lines.Add(new CLines(lines));
|
||||
}
|
||||
|
||||
public CLines GetLines(int Index)
|
||||
public CLines GetLines(int index)
|
||||
{
|
||||
while (Index >= _Lines.Count)
|
||||
while (index >= _Lines.Count)
|
||||
_Lines.Add(new CLines());
|
||||
|
||||
return _Lines[Index];
|
||||
return _Lines[index];
|
||||
}
|
||||
|
||||
public int GetPoints(int Index)
|
||||
public int GetPoints(int index)
|
||||
{
|
||||
if (Index >= _Lines.Count)
|
||||
if (index >= _Lines.Count)
|
||||
return 0;
|
||||
|
||||
return _Lines[Index].Points;
|
||||
return _Lines[index].Points;
|
||||
}
|
||||
|
||||
public int GetNumLinesWithPoints(int Index)
|
||||
public int GetNumLinesWithPoints(int index)
|
||||
{
|
||||
if (Index >= _Lines.Count)
|
||||
if (index >= _Lines.Count)
|
||||
return 0;
|
||||
|
||||
return _Lines[Index].NumLinesWithPoints;
|
||||
return _Lines[index].NumLinesWithPoints;
|
||||
}
|
||||
|
||||
public void AddLines(CLines Lines)
|
||||
public void AddLines(CLines lines)
|
||||
{
|
||||
_Lines.Add(Lines);
|
||||
_Lines.Add(lines);
|
||||
}
|
||||
|
||||
public bool ReplaceLinesAt(int Index, CLines Lines)
|
||||
public bool ReplaceLinesAt(int index, CLines lines)
|
||||
{
|
||||
if (Index >= _Lines.Count)
|
||||
if (index >= _Lines.Count)
|
||||
return false;
|
||||
|
||||
_Lines[Index] = Lines;
|
||||
_Lines[index] = lines;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -68,10 +68,10 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_Lines.Clear();
|
||||
}
|
||||
|
||||
public void SetMedley(int StartBeat, int EndBeat)
|
||||
public void SetMedley(int startBeat, int endBeat)
|
||||
{
|
||||
foreach (CLines lines in _Lines)
|
||||
lines.SetMedley(StartBeat, EndBeat);
|
||||
lines.SetMedley(startBeat, endBeat);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,38 +108,38 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_Perfect = note._Perfect;
|
||||
}
|
||||
|
||||
public CNote(int StartBeat, int Duration, int Tone, string Text)
|
||||
public CNote(int startBeat, int duration, int tone, string text)
|
||||
: this()
|
||||
{
|
||||
this.StartBeat = StartBeat;
|
||||
this.Duration = Duration;
|
||||
this.Tone = Tone;
|
||||
this.StartBeat = startBeat;
|
||||
this.Duration = duration;
|
||||
this.Tone = tone;
|
||||
NoteType = ENoteType.Normal;
|
||||
this.Text = Text;
|
||||
this.Text = text;
|
||||
}
|
||||
|
||||
public CNote(int StartBeat, int Duration, int Tone, string Text, bool Hit)
|
||||
public CNote(int startBeat, int duration, int tone, string text, bool hit)
|
||||
: this()
|
||||
{
|
||||
this.StartBeat = StartBeat;
|
||||
this.Duration = Duration;
|
||||
this.Tone = Tone;
|
||||
this.StartBeat = startBeat;
|
||||
this.Duration = duration;
|
||||
this.Tone = tone;
|
||||
NoteType = ENoteType.Normal;
|
||||
this.Text = Text;
|
||||
this.Hit = Hit;
|
||||
this.Text = text;
|
||||
this.Hit = hit;
|
||||
}
|
||||
|
||||
public CNote(int StartBeat, int Duration, int Tone, string Text, ENoteType NoteType)
|
||||
: this(StartBeat, Duration, Tone, Text)
|
||||
public CNote(int startBeat, int duration, int tone, string text, ENoteType noteType)
|
||||
: this(startBeat, duration, tone, text)
|
||||
{
|
||||
this.NoteType = NoteType;
|
||||
this.NoteType = noteType;
|
||||
}
|
||||
|
||||
public CNote(int StartBeat, int Duration, int Tone, string Text, bool Hit, ENoteType NoteType)
|
||||
: this(StartBeat, Duration, Tone, Text)
|
||||
public CNote(int startBeat, int duration, int tone, string text, bool hit, ENoteType noteType)
|
||||
: this(startBeat, duration, tone, text)
|
||||
{
|
||||
this.NoteType = NoteType;
|
||||
this.Hit = Hit;
|
||||
this.NoteType = noteType;
|
||||
this.Hit = hit;
|
||||
}
|
||||
#endregion Constructors
|
||||
|
||||
@@ -237,24 +237,24 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
#endregion Properties
|
||||
|
||||
#region Methods
|
||||
public bool IsPerfect(CNote CompareNote)
|
||||
public bool IsPerfect(CNote compareNote)
|
||||
{
|
||||
bool Result = true;
|
||||
bool result = true;
|
||||
|
||||
if (!Hit)
|
||||
Result = false;
|
||||
result = false;
|
||||
|
||||
if (StartBeat != CompareNote.StartBeat)
|
||||
Result = false;
|
||||
if (StartBeat != compareNote.StartBeat)
|
||||
result = false;
|
||||
|
||||
if (EndBeat != CompareNote.EndBeat)
|
||||
Result = false;
|
||||
if (EndBeat != compareNote.EndBeat)
|
||||
result = false;
|
||||
|
||||
if (Tone != CompareNote.Tone)
|
||||
Result = false;
|
||||
if (Tone != compareNote.Tone)
|
||||
result = false;
|
||||
|
||||
Perfect = Result;
|
||||
return Result;
|
||||
Perfect = result;
|
||||
return result;
|
||||
}
|
||||
#endregion Methods
|
||||
}
|
||||
@@ -387,38 +387,38 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
{
|
||||
get
|
||||
{
|
||||
int Min = int.MaxValue;
|
||||
int Max = int.MinValue;
|
||||
int min = int.MaxValue;
|
||||
int max = int.MinValue;
|
||||
foreach (CNote note in _Notes)
|
||||
{
|
||||
if (note.Tone < Min)
|
||||
Min = note.Tone;
|
||||
if (note.Tone > Max)
|
||||
Max = note.Tone;
|
||||
if (note.Tone < min)
|
||||
min = note.Tone;
|
||||
if (note.Tone > max)
|
||||
max = note.Tone;
|
||||
}
|
||||
|
||||
return Min - (Max - Min) / 4;
|
||||
return min - (max - min) / 4;
|
||||
}
|
||||
}
|
||||
#endregion Properties
|
||||
|
||||
#region Methods
|
||||
public bool IsPerfect(CLine CompareLine)
|
||||
public bool IsPerfect(CLine compareLine)
|
||||
{
|
||||
if (_Notes.Count == 0)
|
||||
return false;
|
||||
|
||||
if (_Notes.Count != CompareLine.NoteCount)
|
||||
if (_Notes.Count != compareLine.NoteCount)
|
||||
return false;
|
||||
|
||||
if (CompareLine.Points == 0)
|
||||
if (compareLine.Points == 0)
|
||||
return false;
|
||||
|
||||
_PerfectLine = Points == CompareLine.Points;
|
||||
_PerfectLine = Points == compareLine.Points;
|
||||
return _PerfectLine;
|
||||
}
|
||||
|
||||
public int FindPreviousNote(int Beat)
|
||||
public int FindPreviousNote(int beat)
|
||||
{
|
||||
//If no notes -> No previous note
|
||||
if (_Notes.Count == 0)
|
||||
@@ -426,15 +426,15 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
int start = 0;
|
||||
int end = _Notes.Count - 1;
|
||||
//Ensure that start.StartBeat<=Beat && end.StartBeat>Beat
|
||||
if (_Notes[0].StartBeat > Beat)
|
||||
if (_Notes[0].StartBeat > beat)
|
||||
return -1;
|
||||
if (_Notes[end].StartBeat <= Beat)
|
||||
if (_Notes[end].StartBeat <= beat)
|
||||
return end;
|
||||
//Binary search
|
||||
while (end - start > 1)
|
||||
{
|
||||
int mid = (start + end) / 2;
|
||||
if (_Notes[mid].StartBeat <= Beat)
|
||||
if (_Notes[mid].StartBeat <= beat)
|
||||
start = mid;
|
||||
else
|
||||
end = mid;
|
||||
@@ -442,13 +442,13 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
return start;
|
||||
}
|
||||
|
||||
public bool AddNote(CNote Note)
|
||||
public bool AddNote(CNote note)
|
||||
{
|
||||
if (_Notes.Count == 0)
|
||||
_Notes.Add(Note);
|
||||
_Notes.Add(note);
|
||||
else
|
||||
{
|
||||
int insPos = FindPreviousNote(Note.StartBeat);
|
||||
int insPos = FindPreviousNote(note.StartBeat);
|
||||
//Flamefire: May be a performance hit as notes are also used for sung notes
|
||||
//But for song loading this might be very helpful!
|
||||
//Check for overlapping notes
|
||||
@@ -457,30 +457,30 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
if (insPos < _Notes.Count - 1 && _Notes[insPos+1].StartBeat > Note.EndBeat)
|
||||
return false;
|
||||
* */
|
||||
_Notes.Insert(insPos + 1, Note);
|
||||
_Notes.Insert(insPos + 1, note);
|
||||
}
|
||||
updateMinMaxBeat(Note);
|
||||
_UpdateMinMaxBeat(note);
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool DeleteNote(int Index)
|
||||
public bool DeleteNote(int index)
|
||||
{
|
||||
if (_Notes.Count > Index)
|
||||
if (_Notes.Count > index)
|
||||
{
|
||||
_Notes.RemoveAt(Index);
|
||||
if (Index == 0 || Index == _Notes.Count - 1)
|
||||
updateMinMaxBeat();
|
||||
_Notes.RemoveAt(index);
|
||||
if (index == 0 || index == _Notes.Count - 1)
|
||||
_UpdateMinMaxBeat();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool ReplaceNote(int Index, CNote Note)
|
||||
public bool ReplaceNote(int index, CNote note)
|
||||
{
|
||||
if (_Notes.Count > Index)
|
||||
if (_Notes.Count > index)
|
||||
{
|
||||
_Notes.RemoveAt(Index);
|
||||
return AddNote(Note);
|
||||
_Notes.RemoveAt(index);
|
||||
return AddNote(note);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -498,30 +498,30 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
public void DeleteAllNotes()
|
||||
{
|
||||
_Notes.Clear();
|
||||
updateMinMaxBeat();
|
||||
_UpdateMinMaxBeat();
|
||||
}
|
||||
|
||||
public void SetMedley(int StartBeat, int EndBeat)
|
||||
public void SetMedley(int startBeat, int endBeat)
|
||||
{
|
||||
foreach (CNote note in _Notes)
|
||||
{
|
||||
if (note.StartBeat < StartBeat || note.EndBeat > EndBeat)
|
||||
if (note.StartBeat < startBeat || note.EndBeat > endBeat)
|
||||
note.NoteType = ENoteType.Freestyle;
|
||||
}
|
||||
|
||||
_VisibleInTimeLine = _MinBeat >= StartBeat && _MaxBeat <= EndBeat;
|
||||
_VisibleInTimeLine = _MinBeat >= startBeat && _MaxBeat <= endBeat;
|
||||
}
|
||||
|
||||
private void updateMinMaxBeat(CNote Note)
|
||||
private void _UpdateMinMaxBeat(CNote note)
|
||||
{
|
||||
if (Note.StartBeat < _MinBeat)
|
||||
_MinBeat = Note.StartBeat;
|
||||
if (note.StartBeat < _MinBeat)
|
||||
_MinBeat = note.StartBeat;
|
||||
|
||||
if (Note.EndBeat > _MaxBeat)
|
||||
_MaxBeat = Note.EndBeat;
|
||||
if (note.EndBeat > _MaxBeat)
|
||||
_MaxBeat = note.EndBeat;
|
||||
}
|
||||
|
||||
private void updateMinMaxBeat()
|
||||
private void _UpdateMinMaxBeat()
|
||||
{
|
||||
if (_Notes.Count > 0)
|
||||
{
|
||||
@@ -617,7 +617,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
#region Methods
|
||||
//Find last line with StartBeat<=Beat
|
||||
public int FindPreviousLine(int Beat)
|
||||
public int FindPreviousLine(int beat)
|
||||
{
|
||||
//If no line -> No previous line
|
||||
if (_Lines.Count == 0)
|
||||
@@ -625,15 +625,15 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
int start = 0;
|
||||
int end = _Lines.Count - 1;
|
||||
//Ensure that start.StartBeat<=Beat && end.StartBeat>Beat
|
||||
if (_Lines[0].StartBeat > Beat)
|
||||
if (_Lines[0].StartBeat > beat)
|
||||
return -1;
|
||||
if (_Lines[end].StartBeat <= Beat)
|
||||
if (_Lines[end].StartBeat <= beat)
|
||||
return end;
|
||||
//Binary search
|
||||
while (end - start > 1)
|
||||
{
|
||||
int mid = (start + end) / 2;
|
||||
if (_Lines[mid].StartBeat <= Beat)
|
||||
if (_Lines[mid].StartBeat <= beat)
|
||||
start = mid;
|
||||
else
|
||||
end = mid;
|
||||
@@ -641,22 +641,22 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
return start;
|
||||
}
|
||||
|
||||
public void AddLine(CLine Line)
|
||||
public void AddLine(CLine line)
|
||||
{
|
||||
if (_Lines.Count == 0)
|
||||
_Lines.Add(Line);
|
||||
_Lines.Add(line);
|
||||
else
|
||||
{
|
||||
int insPos = FindPreviousLine(Line.StartBeat);
|
||||
_Lines.Insert(insPos + 1, Line);
|
||||
int insPos = FindPreviousLine(line.StartBeat);
|
||||
_Lines.Insert(insPos + 1, line);
|
||||
}
|
||||
}
|
||||
|
||||
public bool DeleteLine(int Index)
|
||||
public bool DeleteLine(int index)
|
||||
{
|
||||
if (_Lines.Count > Index)
|
||||
if (_Lines.Count > index)
|
||||
{
|
||||
_Lines.RemoveAt(Index);
|
||||
_Lines.RemoveAt(index);
|
||||
UpdateTimings();
|
||||
return true;
|
||||
}
|
||||
@@ -668,20 +668,20 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_Lines.Clear();
|
||||
}
|
||||
|
||||
public bool AddNote(CNote Note, bool updateTimings = false)
|
||||
public bool AddNote(CNote note, bool updateTimings = false)
|
||||
{
|
||||
int LineIndex = FindPreviousLine(Note.StartBeat);
|
||||
if (LineIndex < 0)
|
||||
int lineIndex = FindPreviousLine(note.StartBeat);
|
||||
if (lineIndex < 0)
|
||||
{
|
||||
//Note is before ALL lines
|
||||
CLine Line = new CLine();
|
||||
Line.StartBeat = Note.StartBeat;
|
||||
Line.AddNote(Note);
|
||||
_Lines.Insert(0, Line);
|
||||
CLine line = new CLine();
|
||||
line.StartBeat = note.StartBeat;
|
||||
line.AddNote(note);
|
||||
_Lines.Insert(0, line);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_Lines[LineIndex].AddNote(Note))
|
||||
if (!_Lines[lineIndex].AddNote(note))
|
||||
return false;
|
||||
}
|
||||
if (updateTimings)
|
||||
@@ -689,11 +689,11 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool InsertNote(CNote Note, int LineIndex, bool updateTimings = false)
|
||||
public bool InsertNote(CNote note, int lineIndex, bool updateTimings = false)
|
||||
{
|
||||
if (_Lines.Count > LineIndex && _Lines[LineIndex].StartBeat <= Note.StartBeat)
|
||||
if (_Lines.Count > lineIndex && _Lines[lineIndex].StartBeat <= note.StartBeat)
|
||||
{
|
||||
_Lines[LineIndex].AddNote(Note);
|
||||
_Lines[lineIndex].AddNote(note);
|
||||
if (updateTimings)
|
||||
UpdateTimings();
|
||||
return true;
|
||||
@@ -703,7 +703,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
public void UpdateTimings()
|
||||
{
|
||||
CNote LastNote, FirstNote;
|
||||
CNote lastNote;
|
||||
int min, max, s;
|
||||
|
||||
if (_Lines.Count > 0)
|
||||
@@ -711,13 +711,13 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
for (int i = 1; i < _Lines.Count; i++)
|
||||
{
|
||||
LastNote = _Lines[i - 1].LastNote;
|
||||
FirstNote = _Lines[i].FirstNote;
|
||||
lastNote = _Lines[i - 1].LastNote;
|
||||
CNote firstNote = _Lines[i].FirstNote;
|
||||
|
||||
if ((LastNote != null) && (FirstNote != null))
|
||||
if ((lastNote != null) && (firstNote != null))
|
||||
{
|
||||
min = LastNote.EndBeat;
|
||||
max = FirstNote.StartBeat;
|
||||
min = lastNote.EndBeat;
|
||||
max = firstNote.StartBeat;
|
||||
|
||||
switch (max - min)
|
||||
{
|
||||
@@ -743,15 +743,15 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
}
|
||||
}
|
||||
|
||||
LastNote = _Lines[_Lines.Count - 1].LastNote;
|
||||
if (LastNote != null)
|
||||
_Lines[_Lines.Count - 1].EndBeat = LastNote.EndBeat;
|
||||
lastNote = _Lines[_Lines.Count - 1].LastNote;
|
||||
if (lastNote != null)
|
||||
_Lines[_Lines.Count - 1].EndBeat = lastNote.EndBeat;
|
||||
}
|
||||
|
||||
public void SetMedley(int StartBeat, int EndBeat)
|
||||
public void SetMedley(int startBeat, int endBeat)
|
||||
{
|
||||
foreach (CLine line in _Lines)
|
||||
line.SetMedley(StartBeat, EndBeat);
|
||||
line.SetMedley(startBeat, endBeat);
|
||||
}
|
||||
#endregion Methods
|
||||
}
|
||||
|
||||
@@ -61,9 +61,9 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
set { _BarPos = value; }
|
||||
}
|
||||
|
||||
public CSingNotes(int PartyModeID)
|
||||
public CSingNotes(int partyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_PartyModeID = partyModeID;
|
||||
_Theme = new SThemeSingBar();
|
||||
_ThemeLoaded = false;
|
||||
|
||||
@@ -76,9 +76,9 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
return _Theme.Name;
|
||||
}
|
||||
|
||||
public bool LoadTheme(string XmlPath, string ElementName, CXMLReader xmlReader, int SkinIndex)
|
||||
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader, int skinIndex)
|
||||
{
|
||||
string item = XmlPath + "/" + ElementName;
|
||||
string item = xmlPath + "/" + elementName;
|
||||
_ThemeLoaded = true;
|
||||
|
||||
_ThemeLoaded &= xmlReader.GetValue(item + "/SkinLeft", ref _Theme.SkinLeftName, String.Empty);
|
||||
@@ -113,7 +113,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
if (_ThemeLoaded)
|
||||
{
|
||||
_Theme.Name = ElementName;
|
||||
_Theme.Name = elementName;
|
||||
LoadTextures();
|
||||
}
|
||||
|
||||
@@ -189,17 +189,17 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_ActID = 0;
|
||||
}
|
||||
|
||||
public virtual int AddPlayer(SRectF Rect, SColorF Color, int PlayerNr)
|
||||
public virtual int AddPlayer(SRectF rect, SColorF color, int playerNr)
|
||||
{
|
||||
SPlayerNotes notes = new SPlayerNotes();
|
||||
|
||||
notes.Rect = Rect;
|
||||
notes.Color = Color;
|
||||
notes.Rect = rect;
|
||||
notes.Color = color;
|
||||
notes.Alpha = 1f;
|
||||
notes.ID = ++_ActID;
|
||||
notes.Lines = null;
|
||||
notes.LineNr = -1;
|
||||
notes.PlayerNr = PlayerNr;
|
||||
notes.PlayerNr = playerNr;
|
||||
notes.Timer = new Stopwatch();
|
||||
notes.GoldenStars = new List<CParticleEffect>();
|
||||
notes.Flares = new List<CParticleEffect>();
|
||||
@@ -210,27 +210,27 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
return notes.ID;
|
||||
}
|
||||
|
||||
public virtual void RemovePlayer(int ID) {}
|
||||
public virtual void RemovePlayer(int iD) {}
|
||||
|
||||
public virtual void AddLine(int ID, CLine[] Line, int LineNr, int Player)
|
||||
public virtual void AddLine(int iD, CLine[] line, int lineNr, int player)
|
||||
{
|
||||
if (Line == null)
|
||||
if (line == null)
|
||||
return;
|
||||
|
||||
int n = FindPlayerLine(ID);
|
||||
int n = _FindPlayerLine(iD);
|
||||
if (n == -1)
|
||||
return;
|
||||
|
||||
if (LineNr == _PlayerNotes[n].LineNr)
|
||||
if (lineNr == _PlayerNotes[n].LineNr)
|
||||
return;
|
||||
|
||||
SPlayerNotes notes = _PlayerNotes[n];
|
||||
|
||||
if (Line.Length == 0 || Line.Length <= LineNr)
|
||||
if (line.Length == 0 || line.Length <= lineNr)
|
||||
return;
|
||||
|
||||
notes.Lines = Line;
|
||||
notes.LineNr = LineNr;
|
||||
notes.Lines = line;
|
||||
notes.LineNr = lineNr;
|
||||
notes.GoldenStars.Clear();
|
||||
notes.Flares.Clear();
|
||||
notes.PerfectNoteEffect.Clear();
|
||||
@@ -239,38 +239,38 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_PlayerNotes.Add(notes);
|
||||
}
|
||||
|
||||
public virtual void RemoveLine(int ID) {}
|
||||
public virtual void RemoveLine(int iD) {}
|
||||
|
||||
public virtual void AddNote(int ID, CNote Note) {}
|
||||
public virtual void AddNote(int iD, CNote note) {}
|
||||
|
||||
public virtual void SetAlpha(int ID, float Alpha)
|
||||
public virtual void SetAlpha(int iD, float alpha)
|
||||
{
|
||||
int n = FindPlayerLine(ID);
|
||||
int n = _FindPlayerLine(iD);
|
||||
if (n == -1)
|
||||
return;
|
||||
|
||||
SPlayerNotes pn = _PlayerNotes[n];
|
||||
pn.Alpha = Alpha;
|
||||
pn.Alpha = alpha;
|
||||
_PlayerNotes[n] = pn;
|
||||
}
|
||||
|
||||
public virtual float GetAlpha(int ID)
|
||||
public virtual float GetAlpha(int iD)
|
||||
{
|
||||
int n = FindPlayerLine(ID);
|
||||
int n = _FindPlayerLine(iD);
|
||||
if (n == -1)
|
||||
return 0f;
|
||||
|
||||
return _PlayerNotes[n].Alpha;
|
||||
}
|
||||
|
||||
public virtual void Draw(int ID, int Player)
|
||||
public virtual void Draw(int iD, int player)
|
||||
{
|
||||
Draw(ID, null, Player);
|
||||
Draw(iD, null, player);
|
||||
}
|
||||
|
||||
public virtual void Draw(int ID, List<CLine> SingLine, int Player)
|
||||
public virtual void Draw(int iD, List<CLine> singLine, int player)
|
||||
{
|
||||
int n = FindPlayerLine(ID);
|
||||
int n = _FindPlayerLine(iD);
|
||||
if (n == -1)
|
||||
return;
|
||||
|
||||
@@ -283,19 +283,19 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
if (_PlayerNotes[n].Lines.Length <= _PlayerNotes[n].LineNr)
|
||||
return;
|
||||
|
||||
CLine Line = _PlayerNotes[n].Lines[_PlayerNotes[n].LineNr];
|
||||
CLine line = _PlayerNotes[n].Lines[_PlayerNotes[n].LineNr];
|
||||
|
||||
if (CBase.Config.GetDrawNoteLines() == EOffOn.TR_CONFIG_ON)
|
||||
DrawNoteLines(_PlayerNotes[n].Rect, new SColorF(0.5f, 0.5f, 0.5f, 0.5f * _PlayerNotes[n].Alpha));
|
||||
_DrawNoteLines(_PlayerNotes[n].Rect, new SColorF(0.5f, 0.5f, 0.5f, 0.5f * _PlayerNotes[n].Alpha));
|
||||
|
||||
if (Line.NoteCount == 0)
|
||||
if (line.NoteCount == 0)
|
||||
return;
|
||||
|
||||
float w = _PlayerNotes[n].Rect.W;
|
||||
float h = _PlayerNotes[n].Rect.H;
|
||||
float dh = h / CBase.Settings.GetNumNoteLines() * (2f - (int)CBase.Game.GetPlayer()[_PlayerNotes[n].PlayerNr].Difficulty) / 4f;
|
||||
|
||||
float beats = Line.LastNoteBeat - Line.FirstNoteBeat + 1;
|
||||
float beats = line.LastNoteBeat - line.FirstNoteBeat + 1;
|
||||
|
||||
if (beats == 0)
|
||||
return;
|
||||
@@ -306,35 +306,35 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_PlayerNotes[n].Color.B,
|
||||
_PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha);
|
||||
|
||||
float BaseLine = Line.BaseLine;
|
||||
int Nr = 1;
|
||||
foreach (CNote note in Line.Notes)
|
||||
float baseLine = line.BaseLine;
|
||||
int nr = 1;
|
||||
foreach (CNote note in line.Notes)
|
||||
{
|
||||
if (note.NoteType != ENoteType.Freestyle)
|
||||
{
|
||||
float width = note.Duration / beats * w;
|
||||
|
||||
SRectF rect = new SRectF(
|
||||
_PlayerNotes[n].Rect.X + (note.StartBeat - Line.FirstNoteBeat) / beats * w,
|
||||
_PlayerNotes[n].Rect.Y + (CBase.Settings.GetNumNoteLines() - 1 - (note.Tone - BaseLine) / 2) / CBase.Settings.GetNumNoteLines() * h - dh,
|
||||
_PlayerNotes[n].Rect.X + (note.StartBeat - line.FirstNoteBeat) / beats * w,
|
||||
_PlayerNotes[n].Rect.Y + (CBase.Settings.GetNumNoteLines() - 1 - (note.Tone - baseLine) / 2) / CBase.Settings.GetNumNoteLines() * h - dh,
|
||||
width,
|
||||
h / CBase.Settings.GetNumNoteLines() + 2 * dh,
|
||||
_PlayerNotes[n].Rect.Z
|
||||
);
|
||||
|
||||
DrawNoteBG(rect, color, 1f, _PlayerNotes[n].Timer);
|
||||
DrawNote(rect, new SColorF(5f, 5f, 5f, 0.7f * _PlayerNotes[n].Alpha), 0.7f);
|
||||
_DrawNoteBG(rect, color, 1f, _PlayerNotes[n].Timer);
|
||||
_DrawNote(rect, new SColorF(5f, 5f, 5f, 0.7f * _PlayerNotes[n].Alpha), 0.7f);
|
||||
|
||||
if (note.NoteType == ENoteType.Golden)
|
||||
{
|
||||
AddGoldenNote(rect, n, Nr);
|
||||
Nr++;
|
||||
_AddGoldenNote(rect, n, nr);
|
||||
nr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CBase.Config.GetDrawToneHelper() == EOffOn.TR_CONFIG_ON)
|
||||
DrawToneHelper(n, (int)BaseLine, (CBase.Game.GetMidBeatD() - Line.FirstNoteBeat) / beats * w);
|
||||
_DrawToneHelper(n, (int)baseLine, (CBase.Game.GetMidBeatD() - line.FirstNoteBeat) / beats * w);
|
||||
|
||||
int i = 0;
|
||||
while (i < _PlayerNotes[n].PerfectLineTwinkle.Count)
|
||||
@@ -348,7 +348,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
foreach (CParticleEffect perfline in _PlayerNotes[n].PerfectLineTwinkle)
|
||||
perfline.Draw();
|
||||
|
||||
if (SingLine == null || SingLine.Count == 0 || CBase.Game.GetPlayer()[Player].CurrentLine == -1 || SingLine.Count <= CBase.Game.GetPlayer()[Player].CurrentLine)
|
||||
if (singLine == null || singLine.Count == 0 || CBase.Game.GetPlayer()[player].CurrentLine == -1 || singLine.Count <= CBase.Game.GetPlayer()[player].CurrentLine)
|
||||
{
|
||||
foreach (CParticleEffect stars in _PlayerNotes[n].GoldenStars)
|
||||
{
|
||||
@@ -358,9 +358,9 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (CNote note in SingLine[CBase.Game.GetPlayer()[Player].CurrentLine].Notes)
|
||||
foreach (CNote note in singLine[CBase.Game.GetPlayer()[player].CurrentLine].Notes)
|
||||
{
|
||||
if (note.StartBeat >= Line.FirstNoteBeat && note.EndBeat <= Line.LastNoteBeat)
|
||||
if (note.StartBeat >= line.FirstNoteBeat && note.EndBeat <= line.LastNoteBeat)
|
||||
{
|
||||
float width = note.Duration / beats * w;
|
||||
|
||||
@@ -368,8 +368,8 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
width -= (1 - (CBase.Game.GetMidBeatD() - CBase.Game.GetCurrentBeatD())) / beats * w;
|
||||
|
||||
SRectF rect = new SRectF(
|
||||
_PlayerNotes[n].Rect.X + (note.StartBeat - Line.FirstNoteBeat) / beats * w,
|
||||
_PlayerNotes[n].Rect.Y + (CBase.Settings.GetNumNoteLines() - 1 - (note.Tone - BaseLine) / 2) / CBase.Settings.GetNumNoteLines() * h - dh,
|
||||
_PlayerNotes[n].Rect.X + (note.StartBeat - line.FirstNoteBeat) / beats * w,
|
||||
_PlayerNotes[n].Rect.Y + (CBase.Settings.GetNumNoteLines() - 1 - (note.Tone - baseLine) / 2) / CBase.Settings.GetNumNoteLines() * h - dh,
|
||||
width,
|
||||
h / CBase.Settings.GetNumNoteLines() + 2 * dh,
|
||||
_PlayerNotes[n].Rect.Z
|
||||
@@ -379,30 +379,30 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
if (!note.Hit)
|
||||
f = 0.4f;
|
||||
|
||||
DrawNote(rect, color, f);
|
||||
_DrawNote(rect, color, f);
|
||||
|
||||
if (note.EndBeat >= CBase.Game.GetCurrentBeatD() && note.Hit && note.NoteType == ENoteType.Golden)
|
||||
{
|
||||
SRectF re = new SRectF(rect);
|
||||
re.W = (CBase.Game.GetMidBeatD() - note.StartBeat) / beats * w;
|
||||
AddFlare(re, n);
|
||||
_AddFlare(re, n);
|
||||
}
|
||||
|
||||
if (note.Perfect && note.EndBeat < CBase.Game.GetCurrentBeatD())
|
||||
{
|
||||
AddPerfectNote(rect, n);
|
||||
_AddPerfectNote(rect, n);
|
||||
note.Perfect = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int currentLine = CBase.Game.GetPlayer()[Player].SingLine.Count - 1;
|
||||
int currentLine = CBase.Game.GetPlayer()[player].SingLine.Count - 1;
|
||||
if (currentLine > 0)
|
||||
{
|
||||
if (CBase.Game.GetPlayer()[Player].SingLine[currentLine - 1].PerfectLine)
|
||||
if (CBase.Game.GetPlayer()[player].SingLine[currentLine - 1].PerfectLine)
|
||||
{
|
||||
AddPerfectLine(n);
|
||||
CBase.Game.GetPlayer()[Player].SingLine[currentLine - 1].PerfectLine = false;
|
||||
_AddPerfectLine(n);
|
||||
CBase.Game.GetPlayer()[player].SingLine[currentLine - 1].PerfectLine = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -448,15 +448,15 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
LoadTextures();
|
||||
}
|
||||
|
||||
private int FindPlayerLine(int ID)
|
||||
private int _FindPlayerLine(int iD)
|
||||
{
|
||||
if (ID < 0 || ID > _PlayerNotes.Count)
|
||||
if (iD < 0 || iD > _PlayerNotes.Count)
|
||||
return -1;
|
||||
|
||||
int n = -1;
|
||||
for (int i = 0; i < _PlayerNotes.Count; i++)
|
||||
{
|
||||
if (_PlayerNotes[i].ID == ID)
|
||||
if (_PlayerNotes[i].ID == iD)
|
||||
{
|
||||
n = i;
|
||||
break;
|
||||
@@ -466,128 +466,128 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
return n;
|
||||
}
|
||||
|
||||
private void DrawNote(SRectF Rect, SColorF Color)
|
||||
private void _DrawNote(SRectF rect, SColorF color)
|
||||
{
|
||||
DrawNote(Rect, Color, 1f);
|
||||
_DrawNote(rect, color, 1f);
|
||||
}
|
||||
|
||||
private void DrawNote(SRectF Rect, SColorF Color, float factor)
|
||||
private void _DrawNote(SRectF rect, SColorF color, float factor)
|
||||
{
|
||||
const int spacing = 0;
|
||||
|
||||
float d = (1f - factor) / 2 * Rect.H;
|
||||
float d = (1f - factor) / 2 * rect.H;
|
||||
float dw = d;
|
||||
|
||||
if (2 * dw > Rect.W)
|
||||
dw = Rect.W / 2;
|
||||
if (2 * dw > rect.W)
|
||||
dw = rect.W / 2;
|
||||
|
||||
SRectF r = new SRectF(
|
||||
Rect.X + dw + spacing,
|
||||
Rect.Y + d + spacing,
|
||||
Rect.W - 2 * dw - 2 * spacing,
|
||||
Rect.H - 2 * d - 2 * spacing,
|
||||
Rect.Z
|
||||
rect.X + dw + spacing,
|
||||
rect.Y + d + spacing,
|
||||
rect.W - 2 * dw - 2 * spacing,
|
||||
rect.H - 2 * d - 2 * spacing,
|
||||
rect.Z
|
||||
);
|
||||
|
||||
STexture NoteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
STexture NoteMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
|
||||
STexture NoteEnd = CBase.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
|
||||
STexture noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
STexture noteMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
|
||||
STexture noteEnd = CBase.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
|
||||
|
||||
float dx = NoteBegin.width * r.H / NoteBegin.height;
|
||||
float dx = noteBegin.Width * r.H / noteBegin.Height;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
|
||||
|
||||
CBase.Drawing.DrawTexture(NoteBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), Color);
|
||||
CBase.Drawing.DrawTexture(noteBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), color);
|
||||
|
||||
if (r.W - 2 * dx >= 2 * dx)
|
||||
CBase.Drawing.DrawTexture(NoteMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), Color);
|
||||
CBase.Drawing.DrawTexture(noteMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), color);
|
||||
else
|
||||
CBase.Drawing.DrawTexture(NoteMiddle, new SRectF(r.X + dx, r.Y, 2 * dx, r.H, r.Z), Color, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z));
|
||||
CBase.Drawing.DrawTexture(noteMiddle, new SRectF(r.X + dx, r.Y, 2 * dx, r.H, r.Z), color, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z));
|
||||
|
||||
CBase.Drawing.DrawTexture(NoteEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), Color);
|
||||
CBase.Drawing.DrawTexture(noteEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), color);
|
||||
}
|
||||
|
||||
private void DrawNoteBG(SRectF Rect, SColorF Color, float factor, Stopwatch Timer)
|
||||
private void _DrawNoteBG(SRectF rect, SColorF color, float factor, Stopwatch timer)
|
||||
{
|
||||
const int spacing = 0;
|
||||
const float period = 1.5f; //[s]
|
||||
|
||||
if (!Timer.IsRunning)
|
||||
Timer.Start();
|
||||
if (!timer.IsRunning)
|
||||
timer.Start();
|
||||
|
||||
if (Timer.ElapsedMilliseconds / 1000f > period)
|
||||
if (timer.ElapsedMilliseconds / 1000f > period)
|
||||
{
|
||||
Timer.Reset();
|
||||
Timer.Start();
|
||||
timer.Reset();
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
float alpha = (float)((Math.Cos((Timer.ElapsedMilliseconds / 1000f) / period * Math.PI * 2) + 1) / 2.0) / 2f + 0.5f;
|
||||
float d = (1f - factor) / 2 * Rect.H;
|
||||
float alpha = (float)((Math.Cos((timer.ElapsedMilliseconds / 1000f) / period * Math.PI * 2) + 1) / 2.0) / 2f + 0.5f;
|
||||
float d = (1f - factor) / 2 * rect.H;
|
||||
float dw = d;
|
||||
if (2 * dw > Rect.W)
|
||||
dw = Rect.W / 2;
|
||||
if (2 * dw > rect.W)
|
||||
dw = rect.W / 2;
|
||||
|
||||
SRectF r = new SRectF(
|
||||
Rect.X + dw + spacing,
|
||||
Rect.Y + d + spacing,
|
||||
Rect.W - 2 * dw - 2 * spacing,
|
||||
Rect.H - 2 * d - 2 * spacing,
|
||||
Rect.Z
|
||||
rect.X + dw + spacing,
|
||||
rect.Y + d + spacing,
|
||||
rect.W - 2 * dw - 2 * spacing,
|
||||
rect.H - 2 * d - 2 * spacing,
|
||||
rect.Z
|
||||
);
|
||||
|
||||
STexture NoteBackgroundBegin = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
STexture NoteBackgroundMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
STexture NoteBackgroundEnd = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
STexture noteBackgroundBegin = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
STexture noteBackgroundMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
STexture noteBackgroundEnd = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
|
||||
float dx = NoteBackgroundBegin.width * r.H / NoteBackgroundBegin.height;
|
||||
float dx = noteBackgroundBegin.Width * r.H / noteBackgroundBegin.Height;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
|
||||
SColorF col = new SColorF(Color.R, Color.G, Color.B, Color.A * alpha);
|
||||
SColorF col = new SColorF(color.R, color.G, color.B, color.A * alpha);
|
||||
|
||||
CBase.Drawing.DrawTexture(NoteBackgroundBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), col);
|
||||
CBase.Drawing.DrawTexture(noteBackgroundBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), col);
|
||||
|
||||
if (r.W - 2 * dx >= 2 * dx)
|
||||
CBase.Drawing.DrawTexture(NoteBackgroundMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), col);
|
||||
CBase.Drawing.DrawTexture(noteBackgroundMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), col);
|
||||
else
|
||||
CBase.Drawing.DrawTexture(NoteBackgroundMiddle, new SRectF(r.X + dx, r.Y, 2 * dx, r.H, r.Z), col, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z));
|
||||
CBase.Drawing.DrawTexture(noteBackgroundMiddle, new SRectF(r.X + dx, r.Y, 2 * dx, r.H, r.Z), col, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z));
|
||||
|
||||
CBase.Drawing.DrawTexture(NoteBackgroundEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), col);
|
||||
CBase.Drawing.DrawTexture(noteBackgroundEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), col);
|
||||
}
|
||||
|
||||
protected void DrawNoteLines(SRectF Rect, SColorF Color)
|
||||
protected void _DrawNoteLines(SRectF rect, SColorF color)
|
||||
{
|
||||
for (int i = 0; i < CBase.Settings.GetNumNoteLines() - 1; i++)
|
||||
{
|
||||
float y = Rect.Y + Rect.H / CBase.Settings.GetNumNoteLines() * (i + 1);
|
||||
CBase.Drawing.DrawColor(Color, new SRectF(Rect.X, y, Rect.W, 1, -1.0f));
|
||||
float y = rect.Y + rect.H / CBase.Settings.GetNumNoteLines() * (i + 1);
|
||||
CBase.Drawing.DrawColor(color, new SRectF(rect.X, y, rect.W, 1, -1.0f));
|
||||
}
|
||||
}
|
||||
|
||||
private void AddGoldenNote(SRectF Rect, int n, int Nr)
|
||||
private void _AddGoldenNote(SRectF rect, int n, int nr)
|
||||
{
|
||||
AddGoldenNote(Rect, n, Nr, 1f);
|
||||
_AddGoldenNote(rect, n, nr, 1f);
|
||||
}
|
||||
|
||||
private void AddGoldenNote(SRectF Rect, int n, int Nr, float factor)
|
||||
private void _AddGoldenNote(SRectF rect, int n, int nr, float factor)
|
||||
{
|
||||
const int spacing = 0;
|
||||
|
||||
if (Nr > _PlayerNotes[n].GoldenStars.Count)
|
||||
if (nr > _PlayerNotes[n].GoldenStars.Count)
|
||||
{
|
||||
float d = (1f - factor) / 2 * Rect.H;
|
||||
float d = (1f - factor) / 2 * rect.H;
|
||||
float dw = d;
|
||||
|
||||
if (2 * dw > Rect.W)
|
||||
dw = Rect.W / 2;
|
||||
if (2 * dw > rect.W)
|
||||
dw = rect.W / 2;
|
||||
|
||||
SRectF r = new SRectF(
|
||||
Rect.X + dw + spacing,
|
||||
Rect.Y + d + spacing,
|
||||
Rect.W - 2 * dw - 2 * spacing,
|
||||
Rect.H - 2 * d - 2 * spacing,
|
||||
Rect.Z
|
||||
rect.X + dw + spacing,
|
||||
rect.Y + d + spacing,
|
||||
rect.W - 2 * dw - 2 * spacing,
|
||||
rect.H - 2 * d - 2 * spacing,
|
||||
rect.Z
|
||||
);
|
||||
|
||||
int numstars = (int)(r.W * 0.25f);
|
||||
@@ -596,58 +596,58 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
}
|
||||
}
|
||||
|
||||
private void AddFlare(SRectF Rect, int n)
|
||||
private void _AddFlare(SRectF rect, int n)
|
||||
{
|
||||
AddFlare(Rect, n, 1f);
|
||||
_AddFlare(rect, n, 1f);
|
||||
}
|
||||
|
||||
private void AddFlare(SRectF Rect, int n, float factor)
|
||||
private void _AddFlare(SRectF rect, int n, float factor)
|
||||
{
|
||||
const int spacing = 0;
|
||||
|
||||
float d = (1f - factor) / 2 * Rect.H;
|
||||
float d = (1f - factor) / 2 * rect.H;
|
||||
float dw = d;
|
||||
|
||||
if (2 * dw > Rect.W)
|
||||
dw = Rect.W / 2;
|
||||
if (2 * dw > rect.W)
|
||||
dw = rect.W / 2;
|
||||
|
||||
SRectF r = new SRectF(
|
||||
Rect.X + dw + spacing + Rect.W - 2 * dw - 2 * spacing,
|
||||
Rect.Y + d + spacing,
|
||||
rect.X + dw + spacing + rect.W - 2 * dw - 2 * spacing,
|
||||
rect.Y + d + spacing,
|
||||
0f,
|
||||
Rect.H - 2 * d - 2 * spacing,
|
||||
Rect.Z
|
||||
rect.H - 2 * d - 2 * spacing,
|
||||
rect.Z
|
||||
);
|
||||
|
||||
CParticleEffect flares = new CParticleEffect(_PartyModeID, 15, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticleType.Flare);
|
||||
_PlayerNotes[n].Flares.Add(flares);
|
||||
}
|
||||
|
||||
private void AddPerfectNote(SRectF Rect, int n)
|
||||
private void _AddPerfectNote(SRectF rect, int n)
|
||||
{
|
||||
AddPerfectNote(Rect, n, 1f);
|
||||
_AddPerfectNote(rect, n, 1f);
|
||||
}
|
||||
|
||||
private void AddPerfectNote(SRectF Rect, int n, float factor)
|
||||
private void _AddPerfectNote(SRectF rect, int n, float factor)
|
||||
{
|
||||
const int spacing = 0;
|
||||
|
||||
float d = (1f - factor) / 2 * Rect.H;
|
||||
float d = (1f - factor) / 2 * rect.H;
|
||||
float dw = d;
|
||||
|
||||
if (2 * dw > Rect.W)
|
||||
dw = Rect.W / 2;
|
||||
if (2 * dw > rect.W)
|
||||
dw = rect.W / 2;
|
||||
|
||||
SRectF r = new SRectF(
|
||||
Rect.X + dw + spacing,
|
||||
Rect.Y + d + spacing,
|
||||
Rect.W - 2 * dw - 2 * spacing,
|
||||
Rect.H - 2 * d - 2 * spacing,
|
||||
Rect.Z
|
||||
rect.X + dw + spacing,
|
||||
rect.Y + d + spacing,
|
||||
rect.W - 2 * dw - 2 * spacing,
|
||||
rect.H - 2 * d - 2 * spacing,
|
||||
rect.Z
|
||||
);
|
||||
|
||||
STexture NoteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
float dx = NoteBegin.width * r.H / NoteBegin.height;
|
||||
STexture noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
float dx = noteBegin.Width * r.H / noteBegin.Height;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
|
||||
@@ -656,7 +656,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
r.Y,
|
||||
dx * 0.5f,
|
||||
dx * 0.2f,
|
||||
Rect.Z
|
||||
rect.Z
|
||||
);
|
||||
|
||||
CParticleEffect stars = new CParticleEffect(_PartyModeID, CBase.Game.GetRandom(2) + 1, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinPerfectNoteStarName, 35,
|
||||
@@ -664,34 +664,34 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_PlayerNotes[n].PerfectNoteEffect.Add(stars);
|
||||
}
|
||||
|
||||
private void AddPerfectLine(int n)
|
||||
private void _AddPerfectLine(int n)
|
||||
{
|
||||
CParticleEffect twinkle = new CParticleEffect(_PartyModeID, 200, _PlayerNotes[n].Color, _PlayerNotes[n].Rect, _Theme.SkinGoldenStarName, 25, EParticleType.Twinkle);
|
||||
_PlayerNotes[n].PerfectLineTwinkle.Add(twinkle);
|
||||
}
|
||||
|
||||
private void DrawToneHelper(int n, int BaseLine, float OffsetX)
|
||||
private void _DrawToneHelper(int n, int baseLine, float offsetX)
|
||||
{
|
||||
int TonePlayer = CBase.Record.GetToneAbs(_PlayerNotes[n].PlayerNr);
|
||||
int tonePlayer = CBase.Record.GetToneAbs(_PlayerNotes[n].PlayerNr);
|
||||
|
||||
SRectF noteBounds = _PlayerNotes[n].Rect;
|
||||
|
||||
while (TonePlayer - BaseLine < 0)
|
||||
TonePlayer += 12;
|
||||
while (tonePlayer - baseLine < 0)
|
||||
tonePlayer += 12;
|
||||
|
||||
while (TonePlayer - BaseLine > 12)
|
||||
TonePlayer -= 12;
|
||||
while (tonePlayer - baseLine > 12)
|
||||
tonePlayer -= 12;
|
||||
|
||||
if (OffsetX < 0f)
|
||||
OffsetX = 0f;
|
||||
if (offsetX < 0f)
|
||||
offsetX = 0f;
|
||||
|
||||
if (OffsetX > noteBounds.W)
|
||||
OffsetX = noteBounds.W;
|
||||
if (offsetX > noteBounds.W)
|
||||
offsetX = noteBounds.W;
|
||||
|
||||
float dy = noteBounds.H / CBase.Settings.GetNumNoteLines();
|
||||
SRectF drawRect = new SRectF(
|
||||
noteBounds.X - dy + OffsetX,
|
||||
noteBounds.Y + dy * (CBase.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
noteBounds.X - dy + offsetX,
|
||||
noteBounds.Y + dy * (CBase.Settings.GetNumNoteLines() - 1 - (tonePlayer - baseLine) / 2f),
|
||||
dy,
|
||||
dy,
|
||||
noteBounds.Z
|
||||
@@ -703,25 +703,25 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_PlayerNotes[n].Color.B,
|
||||
_PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha);
|
||||
|
||||
STexture ToneHelper = CBase.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CBase.Drawing.DrawTexture(ToneHelper, drawRect, color);
|
||||
STexture toneHelper = CBase.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CBase.Drawing.DrawTexture(toneHelper, drawRect, color);
|
||||
|
||||
|
||||
while (TonePlayer - BaseLine < 12)
|
||||
TonePlayer += 12;
|
||||
while (tonePlayer - baseLine < 12)
|
||||
tonePlayer += 12;
|
||||
|
||||
while (TonePlayer - BaseLine > 24)
|
||||
TonePlayer -= 12;
|
||||
while (tonePlayer - baseLine > 24)
|
||||
tonePlayer -= 12;
|
||||
|
||||
drawRect = new SRectF(
|
||||
noteBounds.X - dy + OffsetX,
|
||||
noteBounds.Y + dy * (CBase.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
noteBounds.X - dy + offsetX,
|
||||
noteBounds.Y + dy * (CBase.Settings.GetNumNoteLines() - 1 - (tonePlayer - baseLine) / 2f),
|
||||
dy,
|
||||
dy,
|
||||
noteBounds.Z
|
||||
);
|
||||
|
||||
CBase.Drawing.DrawTexture(ToneHelper, drawRect, color);
|
||||
CBase.Drawing.DrawTexture(toneHelper, drawRect, color);
|
||||
}
|
||||
|
||||
#region ThemeEdit
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
class CSingNotesClassic : CSingNotes
|
||||
{
|
||||
public CSingNotesClassic(int PartyModeID)
|
||||
: base(PartyModeID) {}
|
||||
public CSingNotesClassic(int partyModeID)
|
||||
: base(partyModeID) {}
|
||||
}
|
||||
}
|
||||
@@ -5,18 +5,18 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
public interface ISingNotes
|
||||
{
|
||||
void Reset();
|
||||
int AddPlayer(SRectF Rect, SColorF Color, int PlayerNr);
|
||||
void RemovePlayer(int ID);
|
||||
int AddPlayer(SRectF rect, SColorF color, int playerNr);
|
||||
void RemovePlayer(int iD);
|
||||
|
||||
void AddLine(int ID, CLine[] Line, int LineNr, int Player);
|
||||
void RemoveLine(int ID);
|
||||
void AddLine(int iD, CLine[] line, int lineNr, int player);
|
||||
void RemoveLine(int iD);
|
||||
|
||||
void AddNote(int ID, CNote Note);
|
||||
void AddNote(int iD, CNote note);
|
||||
|
||||
void SetAlpha(int ID, float Alpha);
|
||||
float GetAlpha(int ID);
|
||||
void SetAlpha(int iD, float alpha);
|
||||
float GetAlpha(int iD);
|
||||
|
||||
void Draw(int ID, int Player);
|
||||
void Draw(int ID, List<CLine> SingLine, int Player);
|
||||
void Draw(int iD, int player);
|
||||
void Draw(int iD, List<CLine> singLine, int player);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user