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