Add Miss Combo support in #COMBOS tag.

This commit is contained in:
Jason Felds
2011-07-09 02:28:15 -04:00
parent 222587f388
commit 08d5f8f722
17 changed files with 190 additions and 43 deletions
+5 -3
View File
@@ -94,17 +94,19 @@ void SSCLoader::ProcessCombos( TimingData &out, const RString line, const int ro
{
vector<RString> arrayComboValues;
split( arrayComboExpressions[f], "=", arrayComboValues );
if( arrayComboValues.size() != 2 )
unsigned size = arrayComboValues.size();
if( size < 2 )
{
LOG->UserLog("Song file",
this->GetSongTitle(),
"has an invalid #COMBOS value \"%s\" (must have exactly one '='), ignored.",
"has an invalid #COMBOS value \"%s\" (must have at least one '='), ignored.",
arrayComboExpressions[f].c_str() );
continue;
}
const float fComboBeat = StringToFloat( arrayComboValues[0] );
const int iCombos = StringToInt( arrayComboValues[1] );
ComboSegment new_seg( fComboBeat, iCombos );
const int iMisses = (size == 2 ? iCombos : StringToInt(arrayComboValues[2]));
ComboSegment new_seg( fComboBeat, iCombos, iMisses );
out.AddComboSegment( new_seg );
}
}