Attempt to fix Editor bug with Delays.

This commit is contained in:
Jason Felds
2011-02-12 17:57:27 -05:00
parent 33e714c6a0
commit 60b5be592c
4 changed files with 11 additions and 29 deletions
+4 -17
View File
@@ -176,40 +176,27 @@ void TimingData::SetTickcountAtRow( int iRow, int iTicks )
}
}
float TimingData::GetStopAtRow( int iNoteRow, bool &bDelayOut ) const
float TimingData::GetStopAtRow( int iNoteRow, bool bDelay ) const
{
bDelayOut = false; // not a delay by default
for( unsigned i=0; i<m_StopSegments.size(); i++ )
{
if( m_StopSegments[i].m_iStartRow == iNoteRow )
if( m_StopSegments[i].m_bDelay == bDelay && m_StopSegments[i].m_iStartRow == iNoteRow )
{
bDelayOut = m_StopSegments[i].m_bDelay;
return m_StopSegments[i].m_fStopSeconds;
}
}
return 0;
}
float TimingData::GetStopAtRow( int iRow ) const
{
for( unsigned i = 0; i < m_StopSegments.size(); i++ )
{
if ( !m_StopSegments[i].m_bDelay && m_StopSegments[i].m_iStartRow == iRow )
return m_StopSegments[i].m_fStopSeconds;
}
return 0;
return GetStopAtRow( iRow, false );
}
float TimingData::GetDelayAtRow( int iRow ) const
{
for( unsigned i = 0; i < m_StopSegments.size(); i++ )
{
if ( m_StopSegments[i].m_bDelay && m_StopSegments[i].m_iStartRow == iRow )
return m_StopSegments[i].m_fStopSeconds;
}
return 0;
return GetStopAtRow( iRow, true );
}
int TimingData::GetWarpToRow( int iWarpBeginRow ) const