Added basic support for rap notes and golden rap notes

This commit is contained in:
Gary Kertopermono committed 2019-04-08 15:16:00 +02:00
1 parent fda7d4acb3
commit efead3615c
5 files changed
+21 -4

No files matched your search

+6 -3
View File
@@ -302,6 +302,9 @@ namespace Vocaluxe.Base
if(p == 0) tonePlayer = tone;
#endif
if (notes[note].Type == ENoteType.Rap || notes[note].Type == ENoteType.RapGolden)
tonePlayer = tone;
Players[p].NoteDiff = Math.Abs(tone - tonePlayer);
bool hit = Players[p].NoteDiff <= (2 - (int)CProfiles.GetDifficulty(Players[p].ProfileID));
@@ -311,7 +314,7 @@ namespace Vocaluxe.Base
//CRecord.RecordSetTone(p, Tone);
double points = (CSettings.MaxScore - CSettings.LinebonusScore) * (double)notes[note].PointsForBeat /
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].Points += points;
@@ -411,7 +414,7 @@ namespace Vocaluxe.Base
{
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].Points += note.Points;
}
@@ -421,7 +424,7 @@ namespace Vocaluxe.Base
}
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].Points -= line.Notes[n].Points;
line.DeleteNote(n);
+3 -1
View File
@@ -364,7 +364,9 @@ namespace VocaluxeLib
{
Normal,
Golden,
Freestyle
Freestyle,
Rap,
RapGolden
}
public enum EMusicType
+4
View File
@@ -616,6 +616,10 @@ namespace VocaluxeLib.Songs
noteType = ENoteType.Golden;
else if (tag.Equals('F'))
noteType = ENoteType.Freestyle;
else if (tag.Equals('R'))
noteType = ENoteType.Rap;
else if (tag.Equals('G'))
noteType = ENoteType.RapGolden;
else
noteType = ENoteType.Normal;
+2
View File
@@ -49,8 +49,10 @@ namespace VocaluxeLib.Songs
switch (Type)
{
case ENoteType.Normal:
case ENoteType.Rap:
return 1;
case ENoteType.Golden:
case ENoteType.RapGolden:
return 2;
case ENoteType.Freestyle:
return 0;
+6
View File
@@ -187,6 +187,12 @@ namespace VocaluxeLib.Songs
case ENoteType.Freestyle:
tag = "F";
break;
case ENoteType.Rap:
tag = "R";
break;
case ENoteType.RapGolden:
tag = "G";
break;
default:
throw new NotImplementedException("Note type " + note.Type);
}