[br:warps] just come cleanups

This commit is contained in:
AJ Kelly
2011-03-26 00:25:56 -05:00
parent 417848ce4e
commit 784dcb5f60
+1 -46
View File
@@ -239,7 +239,6 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
float fSecondsPerBeat = 60 / curBPM.m_fBPS; float fSecondsPerBeat = 60 / curBPM.m_fBPS;
// stop length (# measures to skip) = secsPerBeat * 8 // stop length (# measures to skip) = secsPerBeat * 8
float fSkipBeats = fFreezeSeconds/fSecondsPerBeat; float fSkipBeats = fFreezeSeconds/fSecondsPerBeat;
// location - stoplength = time to subtract from current.
// WarpSegment wsTemp( BeatToNoteRow(fFreezeBeat), [unknown] ); // WarpSegment wsTemp( BeatToNoteRow(fFreezeBeat), [unknown] );
// arrayWarpsFromNegativeStops.push_back( wsTemp ); // arrayWarpsFromNegativeStops.push_back( wsTemp );
@@ -379,53 +378,9 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
} }
} }
// warps (replacement for Negative BPM and Negative Stops) // Convert Negative BPMs and Negative Stops to WarpSegments.
/*
else if( sValueName=="WARPS" )
{
vector<RString> arrayWarpExpressions;
split( sParams[1], ",", arrayWarpExpressions );
for( unsigned f=0; f<arrayWarpExpressions.size(); f++ )
{
vector<RString> arrayWarpValues;
split( arrayWarpExpressions[f], "=", arrayWarpValues );
if( arrayWarpValues.size() != 2 )
{
// XXX: Hard to tell which file caused this.
LOG->UserLog( "Song file", "(UNKNOWN)", "has an invalid #%s value \"%s\" (must have exactly one '='), ignored.",
sValueName.c_str(), arrayWarpExpressions[f].c_str() );
continue;
}
const float fWarpStart = StringToFloat( arrayWarpValues[0] );
const float fWarpBeats = StringToFloat( arrayWarpValues[1] );
if( fWarpStart > 0.0f && fWarpBeats > 0.0f )
{
WarpSegment new_seg( BeatToNoteRow(fWarpStart), fWarpBeats );
out.AddWarpSegment( new_seg );
}
else
{
// Currently disallow negative warps, to prevent the same
// kind of problem that happened when Negative/Subtractive
// BPMs arrived on the StepMania scene. -aj
LOG->UserLog( "Song file", "(UNKNOWN)", "has an invalid warp at beat %f lasting %f beats.", fWarpStart, fWarpBeats );
}
}
}
*/
// Note: Even though it is possible to have Negative BPMs and Stops in
// a song along with Warps, we should not support files that contain
// both styles of warp tricks (Negatives vs. #WARPS).
// If Warps have been populated from Negative BPMs, then go through that
// instead of using the data in the Warps tag. This should be above,
// but it breaks compiling so...
if(arrayWarpsFromNegativeBPMs.size() > 0) if(arrayWarpsFromNegativeBPMs.size() > 0)
{ {
// zomg we already have some warps...
for( unsigned j=0; j<arrayWarpsFromNegativeBPMs.size(); j++ ) for( unsigned j=0; j<arrayWarpsFromNegativeBPMs.size(); j++ )
{ {
out.AddWarpSegment( arrayWarpsFromNegativeBPMs[j] ); out.AddWarpSegment( arrayWarpsFromNegativeBPMs[j] );