ksfdm |D| tag wasn't working because of me... sorry

This commit is contained in:
Alberto Ramos
2010-07-26 19:49:37 -06:00
parent 6db282f98b
commit 2a01c203f2
2 changed files with 10 additions and 6 deletions
+8 -4
View File
@@ -573,21 +573,25 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant
} }
else if (BeginsWith(NoteRowString, "|B")) else if (BeginsWith(NoteRowString, "|B"))
{ {
out.m_Timing.AddBPMSegment( BPMSegment( BeatToNoteRow(fCurBeat), (float)numTemp ) ); //out.m_Timing.AddBPMSegment( BPMSegment( BeatToNoteRow(fCurBeat), (float)numTemp ) );
out.m_Timing.SetBPMAtBeat( (float)numTemp, fCurBeat );
continue; continue;
} }
else if (BeginsWith(NoteRowString, "|E")) else if (BeginsWith(NoteRowString, "|E"))
{ {
//Finally! the |E| tag is working as it should. I can die happy now -DaisuMaster //Finally! the |E| tag is working as it should. I can die happy now -DaisuMaster
bool bDelay = true;
float fCurDelay = 60 / out.m_Timing.GetBPMAtBeat(fCurBeat) * (float)numTemp / iTickCount; float fCurDelay = 60 / out.m_Timing.GetBPMAtBeat(fCurBeat) * (float)numTemp / iTickCount;
out.m_Timing.AddStopSegment( StopSegment( BeatToNoteRow(fCurBeat), fCurDelay, true ) ); fCurDelay += out.m_Timing.GetStopAtRow(BeatToNoteRow(fCurBeat), bDelay);
out.m_Timing.SetStopAtBeat( fCurBeat, fCurDelay, true );
continue; continue;
} }
else if (BeginsWith(NoteRowString, "|D")) else if (BeginsWith(NoteRowString, "|D"))
{ {
bool bDelay = true; bool bDelay = true;
float fCurDelay = out.m_Timing.GetStopAtRow(i, bDelay); float fCurDelay = out.m_Timing.GetStopAtRow(BeatToNoteRow(fCurBeat), bDelay);
out.m_Timing.AddStopSegment( StopSegment( BeatToNoteRow(fCurBeat), fCurDelay, true ) ); fCurDelay += (float)numTemp / 1000;
out.m_Timing.SetStopAtBeat( fCurBeat, fCurDelay, true );
continue; continue;
} }
} }
+2 -2
View File
@@ -87,14 +87,14 @@ void TimingData::SetStopAtRow( int iRow, float fSeconds, bool bDelay )
if( i == m_StopSegments.size() ) // there is no BPMSegment at the current beat if( i == m_StopSegments.size() ) // there is no BPMSegment at the current beat
{ {
// create a new StopSegment // create a new StopSegment
if( fSeconds > 0 ) if( fSeconds > 0 || PREFSMAN->m_bQuirksMode )
{ {
AddStopSegment( StopSegment(iRow, fSeconds, bDelay) ); AddStopSegment( StopSegment(iRow, fSeconds, bDelay) );
} }
} }
else // StopSegment being modified is m_StopSegments[i] else // StopSegment being modified is m_StopSegments[i]
{ {
if( fSeconds > 0 ) if( fSeconds > 0 || PREFSMAN->m_bQuirksMode )
{ {
m_StopSegments[i].m_fStopSeconds = fSeconds; m_StopSegments[i].m_fStopSeconds = fSeconds;
//m_StopSegments[i].m_bDelay = bDelay; // use this? //m_StopSegments[i].m_bDelay = bDelay; // use this?