From aac5710fb482e3a3f957ee63932e50e7a74e4a5c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 26 Mar 2011 01:08:05 -0500 Subject: [PATCH] [br:warps] my changes to NotesLoaderSM for Negative Stops -> Warps. (still not working, sadly) --- src/NotesLoaderSM.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/NotesLoaderSM.cpp b/src/NotesLoaderSM.cpp index 6232593e7f..65fdaaab86 100644 --- a/src/NotesLoaderSM.cpp +++ b/src/NotesLoaderSM.cpp @@ -236,12 +236,11 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out ) // get BPM at current row: BPMSegment curBPM = out.GetBPMSegmentAtRow(BeatToNoteRow(fFreezeBeat)); - float fSecondsPerBeat = 60 / curBPM.m_fBPS; - // stop length (# measures to skip) = secsPerBeat * 8 + float fSecondsPerBeat = 60 / curBPM.GetBPM(); float fSkipBeats = fFreezeSeconds/fSecondsPerBeat; - // WarpSegment wsTemp( BeatToNoteRow(fFreezeBeat), [unknown] ); - // arrayWarpsFromNegativeStops.push_back( wsTemp ); + WarpSegment wsTemp( BeatToNoteRow(fFreezeBeat), BeatToNoteRow(fFreezeBeat+fSkipBeats) ); + arrayWarpsFromNegativeStops.push_back( wsTemp ); if( PREFSMAN->m_bQuirksMode ) { @@ -386,8 +385,17 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out ) out.AddWarpSegment( arrayWarpsFromNegativeBPMs[j] ); } } - // warp sorting will need to take place. - //sort(out.m_WarpSegments.begin(), out.m_WarpSegments.end()); + // do the same for Warps from Negative Stops. + /* + if(arrayWarpsFromNegativeStops.size() > 0) + { + for( unsigned j=0; j