Reduce dependency on MAX_BEATS
This commit is contained in:
@@ -30,10 +30,13 @@ void NoteDataWithScoring::Init()
|
|||||||
m_fHoldNoteLife.clear();
|
m_fHoldNoteLife.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float fStartBeat, const float fEndBeat )
|
int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float fStartBeat, float fEndBeat )
|
||||||
{
|
{
|
||||||
int iNumSuccessfulTapNotes = 0;
|
int iNumSuccessfulTapNotes = 0;
|
||||||
|
|
||||||
|
if(fEndBeat == -1)
|
||||||
|
fEndBeat = GetMaxBeat()+1;
|
||||||
|
|
||||||
unsigned iStartIndex = BeatToNoteRow( fStartBeat );
|
unsigned iStartIndex = BeatToNoteRow( fStartBeat );
|
||||||
unsigned iEndIndex = BeatToNoteRow( fEndBeat );
|
unsigned iEndIndex = BeatToNoteRow( fEndBeat );
|
||||||
|
|
||||||
@@ -49,10 +52,13 @@ int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float
|
|||||||
return iNumSuccessfulTapNotes;
|
return iNumSuccessfulTapNotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
int NoteDataWithScoring::GetNumDoublesWithScore( TapNoteScore tns, const float fStartBeat, const float fEndBeat )
|
int NoteDataWithScoring::GetNumDoublesWithScore( TapNoteScore tns, const float fStartBeat, float fEndBeat )
|
||||||
{
|
{
|
||||||
int iNumSuccessfulDoubles = 0;
|
int iNumSuccessfulDoubles = 0;
|
||||||
|
|
||||||
|
if(fEndBeat == -1)
|
||||||
|
fEndBeat = GetMaxBeat()+1;
|
||||||
|
|
||||||
unsigned iStartIndex = BeatToNoteRow( fStartBeat );
|
unsigned iStartIndex = BeatToNoteRow( fStartBeat );
|
||||||
unsigned iEndIndex = BeatToNoteRow( fEndBeat );
|
unsigned iEndIndex = BeatToNoteRow( fEndBeat );
|
||||||
|
|
||||||
@@ -75,10 +81,13 @@ int NoteDataWithScoring::GetNumDoublesWithScore( TapNoteScore tns, const float f
|
|||||||
return iNumSuccessfulDoubles;
|
return iNumSuccessfulDoubles;
|
||||||
}
|
}
|
||||||
|
|
||||||
int NoteDataWithScoring::GetNumHoldNotesWithScore( HoldNoteScore hns, const float fStartBeat, const float fEndBeat )
|
int NoteDataWithScoring::GetNumHoldNotesWithScore( HoldNoteScore hns, const float fStartBeat, float fEndBeat )
|
||||||
{
|
{
|
||||||
int iNumSuccessfulHolds = 0;
|
int iNumSuccessfulHolds = 0;
|
||||||
|
|
||||||
|
if(fEndBeat == -1)
|
||||||
|
fEndBeat = GetMaxBeat()+1;
|
||||||
|
|
||||||
for( int i=0; i<GetNumHoldNotes(); i++ )
|
for( int i=0; i<GetNumHoldNotes(); i++ )
|
||||||
{
|
{
|
||||||
const HoldNote &hn = GetHoldNote(i);
|
const HoldNote &hn = GetHoldNote(i);
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ public:
|
|||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
// statistics
|
// statistics
|
||||||
int GetNumTapNotesWithScore( TapNoteScore tns, const float fStartBeat = 0, const float fEndBeat = MAX_BEATS );
|
int GetNumTapNotesWithScore( TapNoteScore tns, const float fStartBeat = 0, const float fEndBeat = -1 );
|
||||||
int GetNumDoublesWithScore( TapNoteScore tns, const float fStartBeat = 0, const float fEndBeat = MAX_BEATS );
|
int GetNumDoublesWithScore( TapNoteScore tns, const float fStartBeat = 0, const float fEndBeat = -1 );
|
||||||
int GetNumHoldNotesWithScore( HoldNoteScore hns, const float fStartBeat = 0, const float fEndBeat = MAX_BEATS );
|
int GetNumHoldNotesWithScore( HoldNoteScore hns, const float fStartBeat = 0, const float fEndBeat = -1 );
|
||||||
|
|
||||||
TapNoteScore GetTapNoteScore(unsigned track, unsigned row) const;
|
TapNoteScore GetTapNoteScore(unsigned track, unsigned row) const;
|
||||||
void SetTapNoteScore(unsigned track, unsigned row, TapNoteScore tns);
|
void SetTapNoteScore(unsigned track, unsigned row, TapNoteScore tns);
|
||||||
|
|||||||
Reference in New Issue
Block a user