Added basic support for rap notes and golden rap notes
This commit is contained in:
1 parent
fda7d4acb3
commit
efead3615c
5 files changed
+21
-4
No files matched your search
@@ -302,6 +302,9 @@ namespace Vocaluxe.Base
|
|||||||
if(p == 0) tonePlayer = tone;
|
if(p == 0) tonePlayer = tone;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (notes[note].Type == ENoteType.Rap || notes[note].Type == ENoteType.RapGolden)
|
||||||
|
tonePlayer = tone;
|
||||||
|
|
||||||
Players[p].NoteDiff = Math.Abs(tone - tonePlayer);
|
Players[p].NoteDiff = Math.Abs(tone - tonePlayer);
|
||||||
bool hit = Players[p].NoteDiff <= (2 - (int)CProfiles.GetDifficulty(Players[p].ProfileID));
|
bool hit = Players[p].NoteDiff <= (2 - (int)CProfiles.GetDifficulty(Players[p].ProfileID));
|
||||||
|
|
||||||
@@ -311,7 +314,7 @@ namespace Vocaluxe.Base
|
|||||||
//CRecord.RecordSetTone(p, Tone);
|
//CRecord.RecordSetTone(p, Tone);
|
||||||
double points = (CSettings.MaxScore - CSettings.LinebonusScore) * (double)notes[note].PointsForBeat /
|
double points = (CSettings.MaxScore - CSettings.LinebonusScore) * (double)notes[note].PointsForBeat /
|
||||||
song.Notes.GetVoice(Players[p].VoiceNr).Points;
|
song.Notes.GetVoice(Players[p].VoiceNr).Points;
|
||||||
if (notes[note].Type == ENoteType.Golden)
|
if (notes[note].Type == ENoteType.Golden || notes[note].Type == ENoteType.RapGolden)
|
||||||
Players[p].PointsGoldenNotes += points;
|
Players[p].PointsGoldenNotes += points;
|
||||||
|
|
||||||
Players[p].Points += points;
|
Players[p].Points += points;
|
||||||
@@ -411,7 +414,7 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
if (note.StartBeat < nextStart)
|
if (note.StartBeat < nextStart)
|
||||||
{
|
{
|
||||||
if (note.Hit && note.HitNote.Type == ENoteType.Golden)
|
if (note.Hit && (note.HitNote.Type == ENoteType.Golden || note.HitNote.Type == ENoteType.RapGolden))
|
||||||
Players[p].PointsGoldenNotes += note.Points;
|
Players[p].PointsGoldenNotes += note.Points;
|
||||||
Players[p].Points += note.Points;
|
Players[p].Points += note.Points;
|
||||||
}
|
}
|
||||||
@@ -421,7 +424,7 @@ namespace Vocaluxe.Base
|
|||||||
}
|
}
|
||||||
while (line.NoteCount > n && n >= 0)
|
while (line.NoteCount > n && n >= 0)
|
||||||
{
|
{
|
||||||
if (line.Notes[n].Hit && line.Notes[n].HitNote.Type == ENoteType.Golden)
|
if (line.Notes[n].Hit && (line.Notes[n].HitNote.Type == ENoteType.Golden || line.Notes[n].HitNote.Type == ENoteType.RapGolden))
|
||||||
Players[p].PointsGoldenNotes -= line.Notes[n].Points;
|
Players[p].PointsGoldenNotes -= line.Notes[n].Points;
|
||||||
Players[p].Points -= line.Notes[n].Points;
|
Players[p].Points -= line.Notes[n].Points;
|
||||||
line.DeleteNote(n);
|
line.DeleteNote(n);
|
||||||
|
|||||||
@@ -364,7 +364,9 @@ namespace VocaluxeLib
|
|||||||
{
|
{
|
||||||
Normal,
|
Normal,
|
||||||
Golden,
|
Golden,
|
||||||
Freestyle
|
Freestyle,
|
||||||
|
Rap,
|
||||||
|
RapGolden
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum EMusicType
|
public enum EMusicType
|
||||||
|
|||||||
@@ -616,6 +616,10 @@ namespace VocaluxeLib.Songs
|
|||||||
noteType = ENoteType.Golden;
|
noteType = ENoteType.Golden;
|
||||||
else if (tag.Equals('F'))
|
else if (tag.Equals('F'))
|
||||||
noteType = ENoteType.Freestyle;
|
noteType = ENoteType.Freestyle;
|
||||||
|
else if (tag.Equals('R'))
|
||||||
|
noteType = ENoteType.Rap;
|
||||||
|
else if (tag.Equals('G'))
|
||||||
|
noteType = ENoteType.RapGolden;
|
||||||
else
|
else
|
||||||
noteType = ENoteType.Normal;
|
noteType = ENoteType.Normal;
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,10 @@ namespace VocaluxeLib.Songs
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case ENoteType.Normal:
|
case ENoteType.Normal:
|
||||||
|
case ENoteType.Rap:
|
||||||
return 1;
|
return 1;
|
||||||
case ENoteType.Golden:
|
case ENoteType.Golden:
|
||||||
|
case ENoteType.RapGolden:
|
||||||
return 2;
|
return 2;
|
||||||
case ENoteType.Freestyle:
|
case ENoteType.Freestyle:
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -187,6 +187,12 @@ namespace VocaluxeLib.Songs
|
|||||||
case ENoteType.Freestyle:
|
case ENoteType.Freestyle:
|
||||||
tag = "F";
|
tag = "F";
|
||||||
break;
|
break;
|
||||||
|
case ENoteType.Rap:
|
||||||
|
tag = "R";
|
||||||
|
break;
|
||||||
|
case ENoteType.RapGolden:
|
||||||
|
tag = "G";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException("Note type " + note.Type);
|
throw new NotImplementedException("Note type " + note.Type);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user