Yeah, BPM segments, big one :D

This commit is contained in:
Thai Pangsakulyanont
2011-05-31 23:41:39 +07:00
parent 714427f154
commit 1d2dd19ab1
14 changed files with 150 additions and 135 deletions
+3 -3
View File
@@ -450,7 +450,7 @@ void BackgroundImpl::LoadFromRandom( float fFirstBeat, float fEndBeat, const Bac
bool bAtBeginningOfMeasure = false;
FOREACH_CONST( TimeSignatureSegment, timing.m_vTimeSignatureSegments, iter )
{
if( (bpmseg.m_iStartRow - iter->m_iStartRow) % iter->GetNoteRowsPerMeasure() == 0 )
if( (bpmseg.GetRow() - iter->m_iStartRow) % iter->GetNoteRowsPerMeasure() == 0 )
{
bAtBeginningOfMeasure = true;
break;
@@ -461,7 +461,7 @@ void BackgroundImpl::LoadFromRandom( float fFirstBeat, float fEndBeat, const Bac
continue; // skip
// start so that we don't create a BGChange right on top of fEndBeat
bool bInRange = bpmseg.m_iStartRow >= iStartRow && bpmseg.m_iStartRow < iEndRow;
bool bInRange = bpmseg.GetRow() >= iStartRow && bpmseg.GetRow() < iEndRow;
if( !bInRange )
continue; // skip
@@ -471,7 +471,7 @@ void BackgroundImpl::LoadFromRandom( float fFirstBeat, float fEndBeat, const Bac
BackgroundChange c = change;
c.m_def.m_sFile1 = bd.m_sFile1;
c.m_def.m_sFile2 = bd.m_sFile2;
c.m_fStartBeat = NoteRowToBeat(bpmseg.m_iStartRow);
c.m_fStartBeat = bpmseg.GetBeat();
m_Layer[0].m_aBGChanges.push_back( c );
}
}