"Combine" processing for BPMs and stops.
Prep for replacing with new negative-converting algorithm.
This commit is contained in:
@@ -362,6 +362,14 @@ void SMLoader::ProcessStops( TimingData &out, const vector< pair<float, float> >
|
||||
}
|
||||
}
|
||||
|
||||
void SMLoader::ProcessBPMsAndStops(TimingData &out,
|
||||
const vector< pair<float, float> > &vBPMs,
|
||||
const vector< pair<float, float> > &vStops)
|
||||
{
|
||||
ProcessBPMs(out, vBPMs);
|
||||
ProcessStops(out, vStops);
|
||||
}
|
||||
|
||||
void SMLoader::ProcessDelays( TimingData &out, const RString line, const int rowsPerBeat )
|
||||
{
|
||||
vector<RString> arrayDelayExpressions;
|
||||
@@ -958,8 +966,7 @@ bool SMLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCache
|
||||
}
|
||||
|
||||
// Turn negative time changes into warps
|
||||
ProcessBPMs(out.m_SongTiming, vBPMChanges);
|
||||
ProcessStops(out.m_SongTiming, vStops);
|
||||
ProcessBPMsAndStops(out.m_SongTiming, vBPMChanges, vStops);
|
||||
out.m_SongTiming.SortSegments( SEGMENT_WARP );
|
||||
|
||||
TidyUpData( out, bFromCache );
|
||||
|
||||
@@ -96,6 +96,14 @@ struct SMLoader
|
||||
* @param vStops the vector of Stops data. */
|
||||
void ProcessStops(TimingData & out,
|
||||
const vector< pair<float, float> > &vStops);
|
||||
/**
|
||||
* @brief Process BPM and stop segments from the data.
|
||||
* @param out the TimingData being modified.
|
||||
* @param vBPMs the vector of BPM changes.
|
||||
* @param vStops the vector of stops. */
|
||||
void ProcessBPMsAndStops(TimingData &out,
|
||||
const vector< pair<float, float> > &vBPMs,
|
||||
const vector< pair<float, float> > &vStops);
|
||||
/**
|
||||
* @brief Process the Delay Segments from the string.
|
||||
* @param out the TimingData being modified.
|
||||
|
||||
@@ -304,8 +304,7 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
// This should generally return song timing
|
||||
TimingData &timing = (state == SMA_GETTING_STEP_INFO
|
||||
? pNewNotes->m_Timing : out.m_SongTiming);
|
||||
ProcessBPMs( timing, vBPMChanges );
|
||||
ProcessStops( timing, vStops );
|
||||
ProcessBPMsAndStops(timing, vBPMChanges, vStops);
|
||||
|
||||
state = SMA_GETTING_STEP_INFO;
|
||||
pNewNotes = new Steps(&out);
|
||||
@@ -459,8 +458,7 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
// Handle timing changes and convert negative bpms/stops
|
||||
TimingData &timing = (state == SMA_GETTING_STEP_INFO
|
||||
? pNewNotes->m_Timing : out.m_SongTiming);
|
||||
ProcessBPMs( timing, vBPMChanges );
|
||||
ProcessStops( timing, vStops );
|
||||
ProcessBPMsAndStops(timing, vBPMChanges, vStops);
|
||||
}
|
||||
else if( sValueName=="TIMESIGNATURES" || sValueName=="LEADTRACK" )
|
||||
;
|
||||
|
||||
@@ -565,8 +565,7 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
else if( sValueName=="NOTEDATA" )
|
||||
{
|
||||
// Process timings and convert negative bpms/stops
|
||||
SMLoader::ProcessBPMs(out.m_SongTiming, vBPMChanges);
|
||||
SMLoader::ProcessStops(out.m_SongTiming, vStops);
|
||||
SMLoader::ProcessBPMsAndStops(out.m_SongTiming, vBPMChanges, vStops);
|
||||
|
||||
state = GETTING_STEP_INFO;
|
||||
pNewNotes = out.CreateSteps();
|
||||
@@ -656,8 +655,7 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
// Process timings and convert negative bpms/stops
|
||||
if( !vBPMChanges.empty() )
|
||||
bHasOwnTiming = true;
|
||||
SMLoader::ProcessBPMs(stepsTiming, vBPMChanges);
|
||||
SMLoader::ProcessStops(stepsTiming, vStops);
|
||||
SMLoader::ProcessBPMsAndStops(stepsTiming, vBPMChanges, vStops);
|
||||
|
||||
state = GETTING_SONG_INFO;
|
||||
if( bHasOwnTiming )
|
||||
@@ -808,8 +806,7 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
// Process timings and convert negative bpms/stops
|
||||
if( !vBPMChanges.empty() )
|
||||
bHasOwnTiming = true;
|
||||
SMLoader::ProcessBPMs(stepsTiming, vBPMChanges);
|
||||
SMLoader::ProcessStops(stepsTiming, vStops);
|
||||
SMLoader::ProcessBPMsAndStops(stepsTiming, vBPMChanges, vStops);
|
||||
|
||||
state = GETTING_SONG_INFO;
|
||||
if( bHasOwnTiming )
|
||||
@@ -1047,8 +1044,7 @@ bool SSCLoader::LoadEditFromMsd(const MsdFile &msd,
|
||||
return true;
|
||||
|
||||
// Process timings and convert negative bpms/stops
|
||||
SMLoader::ProcessBPMs(stepsTiming, vBPMChanges);
|
||||
SMLoader::ProcessStops(stepsTiming, vStops);
|
||||
SMLoader::ProcessBPMsAndStops(stepsTiming, vBPMChanges, vStops);
|
||||
|
||||
if( bSSCFormat )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user