use Get/SetTapNote
This commit is contained in:
@@ -49,7 +49,7 @@ int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float
|
|||||||
{
|
{
|
||||||
for( int t=0; t<m_iNumTracks; t++ )
|
for( int t=0; t<m_iNumTracks; t++ )
|
||||||
{
|
{
|
||||||
if( m_TapNotes[t][i] != '0' && m_TapNoteScores[t][i] == tns )
|
if( this->GetTapNote(t, i) != TAP_EMPTY && m_TapNoteScores[t][i] == tns )
|
||||||
iNumSuccessfulTapNotes++;
|
iNumSuccessfulTapNotes++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ int NoteDataWithScoring::GetNumDoublesWithScore( TapNoteScore tns, const float f
|
|||||||
TapNoteScore minTapNoteScore = TNS_PERFECT;
|
TapNoteScore minTapNoteScore = TNS_PERFECT;
|
||||||
for( int t=0; t<m_iNumTracks; t++ )
|
for( int t=0; t<m_iNumTracks; t++ )
|
||||||
{
|
{
|
||||||
if( m_TapNotes[t][i] != '0' )
|
if( GetTapNote(t, i) != TAP_EMPTY )
|
||||||
{
|
{
|
||||||
iNumNotesThisIndex++;
|
iNumNotesThisIndex++;
|
||||||
minTapNoteScore = min( minTapNoteScore, m_TapNoteScores[t][i] );
|
minTapNoteScore = min( minTapNoteScore, m_TapNoteScores[t][i] );
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ struct NoteDataWithScoring : public NoteData
|
|||||||
inline bool IsRowComplete( int index )
|
inline bool IsRowComplete( int index )
|
||||||
{
|
{
|
||||||
for( int t=0; t<m_iNumTracks; t++ )
|
for( int t=0; t<m_iNumTracks; t++ )
|
||||||
if( m_TapNotes[t][index] != '0' && m_TapNoteScores[t][index] < TNS_GREAT )
|
if( GetTapNote(t, index) != TAP_EMPTY && m_TapNoteScores[t][index] < TNS_GREAT )
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Notes &out )
|
|||||||
mapBMSTrackToDanceNote( iTrackNum, iColumnNumber, cNoteChar );
|
mapBMSTrackToDanceNote( iTrackNum, iColumnNumber, cNoteChar );
|
||||||
|
|
||||||
if( iColumnNumber != -1 )
|
if( iColumnNumber != -1 )
|
||||||
pNoteData->m_TapNotes[iColumnNumber][iNoteIndex] = cNoteChar;
|
pNoteData->SetTapNote(iColumnNumber, iNoteIndex, cNoteChar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,33 +123,33 @@ void NotesWriterDWI::WriteDWINotesField( FILE* fp, const Notes &out, int start )
|
|||||||
case NOTES_TYPE_DANCE_COUPLE:
|
case NOTES_TYPE_DANCE_COUPLE:
|
||||||
case NOTES_TYPE_DANCE_DOUBLE:
|
case NOTES_TYPE_DANCE_DOUBLE:
|
||||||
fprintf( fp, NotesToDWIString(
|
fprintf( fp, NotesToDWIString(
|
||||||
notedata.m_TapNotes[start+0][row],
|
notedata.GetTapNote(start+0, row),
|
||||||
notedata.m_TapNotes[start+1][row],
|
notedata.GetTapNote(start+1, row),
|
||||||
notedata.m_TapNotes[start+2][row],
|
notedata.GetTapNote(start+2, row),
|
||||||
notedata.m_TapNotes[start+3][row] ) );
|
notedata.GetTapNote(start+3, row) ) );
|
||||||
|
|
||||||
// Blank out the notes so we don't write them again if the incrementer is small
|
// Blank out the notes so we don't write them again if the incrementer is small
|
||||||
notedata.m_TapNotes[start+0][row] = '0';
|
notedata.SetTapNote(start+0, row, TAP_EMPTY);
|
||||||
notedata.m_TapNotes[start+1][row] = '0';
|
notedata.SetTapNote(start+1, row, TAP_EMPTY);
|
||||||
notedata.m_TapNotes[start+2][row] = '0';
|
notedata.SetTapNote(start+2, row, TAP_EMPTY);
|
||||||
notedata.m_TapNotes[start+3][row] = '0';
|
notedata.SetTapNote(start+3, row, TAP_EMPTY);
|
||||||
break;
|
break;
|
||||||
case NOTES_TYPE_DANCE_SOLO:
|
case NOTES_TYPE_DANCE_SOLO:
|
||||||
fprintf( fp, NotesToDWIString(
|
fprintf( fp, NotesToDWIString(
|
||||||
notedata.m_TapNotes[0][row],
|
notedata.GetTapNote(0, row),
|
||||||
notedata.m_TapNotes[1][row],
|
notedata.GetTapNote(1, row),
|
||||||
notedata.m_TapNotes[2][row],
|
notedata.GetTapNote(2, row),
|
||||||
notedata.m_TapNotes[3][row],
|
notedata.GetTapNote(3, row),
|
||||||
notedata.m_TapNotes[4][row],
|
notedata.GetTapNote(4, row),
|
||||||
notedata.m_TapNotes[5][row] ) );
|
notedata.GetTapNote(5, row) ) );
|
||||||
|
|
||||||
// Blank out the notes so we don't write them again if the incrementer is small
|
// Blank out the notes so we don't write them again if the incrementer is small
|
||||||
notedata.m_TapNotes[start+0][row] = '0';
|
notedata.SetTapNote(start+0, row, TAP_EMPTY);
|
||||||
notedata.m_TapNotes[start+1][row] = '0';
|
notedata.SetTapNote(start+1, row, TAP_EMPTY);
|
||||||
notedata.m_TapNotes[start+2][row] = '0';
|
notedata.SetTapNote(start+2, row, TAP_EMPTY);
|
||||||
notedata.m_TapNotes[start+3][row] = '0';
|
notedata.SetTapNote(start+3, row, TAP_EMPTY);
|
||||||
notedata.m_TapNotes[start+4][row] = '0';
|
notedata.SetTapNote(start+4, row, TAP_EMPTY);
|
||||||
notedata.m_TapNotes[start+5][row] = '0';
|
notedata.SetTapNote(start+5, row, TAP_EMPTY);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0); // not a type supported by DWI. We shouldn't have called in here if that's the case
|
ASSERT(0); // not a type supported by DWI. We shouldn't have called in here if that's the case
|
||||||
|
|||||||
Reference in New Issue
Block a user