Merge pull request #1010 from nixtrix/firstsecond
Checking for first second now ignores autokeysounds
This commit is contained in:
+10
-2
@@ -422,7 +422,7 @@ int NoteData::GetFirstRow() const
|
|||||||
for( int t=0; t < GetNumTracks(); t++ )
|
for( int t=0; t < GetNumTracks(); t++ )
|
||||||
{
|
{
|
||||||
int iRow = -1;
|
int iRow = -1;
|
||||||
if( !GetNextTapNoteRowForTrack( t, iRow ) )
|
if( !GetNextTapNoteRowForTrack( t, iRow, true ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( iEarliestRowFoundSoFar == -1 )
|
if( iEarliestRowFoundSoFar == -1 )
|
||||||
@@ -972,7 +972,7 @@ int NoteData::GetNumTracksHeldAtRow( int row )
|
|||||||
return viTracks.size();
|
return viTracks.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut ) const
|
bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut, bool ignoreAutoKeysounds ) const
|
||||||
{
|
{
|
||||||
const TrackMap &mapTrack = m_TapNotes[track];
|
const TrackMap &mapTrack = m_TapNotes[track];
|
||||||
|
|
||||||
@@ -987,6 +987,14 @@ bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut ) const
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
ASSERT( iter->first > rowInOut );
|
ASSERT( iter->first > rowInOut );
|
||||||
|
|
||||||
|
// If we want to ignore autokeysounds, keep going until we find a real note.
|
||||||
|
if(ignoreAutoKeysounds) {
|
||||||
|
while(iter->second.type == TapNoteType_AutoKeysound) {
|
||||||
|
iter++;
|
||||||
|
if(iter==mapTrack.end()) return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
rowInOut = iter->first;
|
rowInOut = iter->first;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -243,7 +243,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/* Returns the row of the first TapNote on the track that has a row greater than rowInOut. */
|
/* Returns the row of the first TapNote on the track that has a row greater than rowInOut. */
|
||||||
bool GetNextTapNoteRowForTrack( int track, int &rowInOut ) const;
|
bool GetNextTapNoteRowForTrack( int track, int &rowInOut, bool ignoreKeySounds=false ) const;
|
||||||
bool GetNextTapNoteRowForAllTracks( int &rowInOut ) const;
|
bool GetNextTapNoteRowForAllTracks( int &rowInOut ) const;
|
||||||
bool GetPrevTapNoteRowForTrack( int track, int &rowInOut ) const;
|
bool GetPrevTapNoteRowForTrack( int track, int &rowInOut ) const;
|
||||||
bool GetPrevTapNoteRowForAllTracks( int &rowInOut ) const;
|
bool GetPrevTapNoteRowForAllTracks( int &rowInOut ) const;
|
||||||
|
|||||||
@@ -1118,7 +1118,6 @@ bool BMSChartReader::ReadNoteData()
|
|||||||
TimingData td;
|
TimingData td;
|
||||||
|
|
||||||
td.m_fBeat0OffsetInSeconds = out->m_Timing.m_fBeat0OffsetInSeconds;
|
td.m_fBeat0OffsetInSeconds = out->m_Timing.m_fBeat0OffsetInSeconds;
|
||||||
|
|
||||||
nd.SetNumTracks( tracks );
|
nd.SetNumTracks( tracks );
|
||||||
td.SetBPMAtRow( 0, currentBPM = initialBPM );
|
td.SetBPMAtRow( 0, currentBPM = initialBPM );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user