[scroll] 90% of scroll segments
This commit is contained in:
@@ -176,6 +176,36 @@ void SSCLoader::ProcessSpeeds( TimingData &out, const RString sParam )
|
||||
}
|
||||
}
|
||||
|
||||
void SSCLoader::ProcessScrolls( TimingData &out, const RString sParam )
|
||||
{
|
||||
vector<RString> vs1;
|
||||
split( sParam, ",", vs1 );
|
||||
|
||||
FOREACH_CONST( RString, vs1, s1 )
|
||||
{
|
||||
vector<RString> vs2;
|
||||
split( *s1, "=", vs2 );
|
||||
|
||||
if( vs2.size() < 2 )
|
||||
{
|
||||
LOG->UserLog( "Song file", "(UNKNOWN)", "has an scroll change with %i values.", (int)vs2.size() );
|
||||
continue;
|
||||
}
|
||||
|
||||
const float fBeat = StringToFloat( vs2[0] );
|
||||
|
||||
ScrollSegment seg( fBeat, StringToFloat( vs2[1] ) );
|
||||
|
||||
if( fBeat < 0 )
|
||||
{
|
||||
LOG->UserLog( "Song file", "(UNKNOWN)", "has an scroll change with beat %f.", fBeat );
|
||||
continue;
|
||||
}
|
||||
|
||||
out.AddScrollSegment( seg );
|
||||
}
|
||||
}
|
||||
|
||||
void SSCLoader::ProcessFakes( TimingData &out, const RString sParam )
|
||||
{
|
||||
vector<RString> arrayFakeExpressions;
|
||||
@@ -601,6 +631,11 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach
|
||||
ProcessSpeeds( stepsTiming, sParams[1] );
|
||||
}
|
||||
|
||||
else if( sValueName=="SCROLLS" )
|
||||
{
|
||||
ProcessScrolls( stepsTiming, sParams[1] );
|
||||
}
|
||||
|
||||
else if( sValueName=="FAKES" )
|
||||
{
|
||||
ProcessFakes( stepsTiming, sParams[1] );
|
||||
|
||||
Reference in New Issue
Block a user