add support for |E| tag from DirectMove KSF files.

This commit is contained in:
AJ Kelly
2010-01-13 00:07:34 +00:00
parent 5a82cbefea
commit bc331f3fc6
+10 -4
View File
@@ -200,7 +200,7 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, const Song &song,
sRowString.c_str() );
return false;
}
if( BeginsWith(sRowString, "|B") || BeginsWith(sRowString, "|D") )
if( BeginsWith(sRowString, "|B") || BeginsWith(sRowString, "|D") || BeginsWith(sRowString, "|E") )
{
// These don't have to be worried about here: the changes and stops were already added.
continue;
@@ -470,8 +470,8 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant
/* This is where the DMRequired test will take place. */
if( NoteRowString.size() != 13)
{
if (BeginsWith(NoteRowString, "|T") ||
BeginsWith(NoteRowString, "|B") || BeginsWith(NoteRowString, "|D") )
if (BeginsWith(NoteRowString, "|T") || BeginsWith(NoteRowString, "|B") ||
BeginsWith(NoteRowString, "|D") || BeginsWith(NoteRowString, "|E") )
{
bDMRequired = true;
RString temp = NoteRowString.substr(2,NoteRowString.size()-3);
@@ -488,12 +488,18 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant
speedToChange = numTemp;
continue;
}
else
else if (BeginsWith(NoteRowString, "|D"))
{
bBPMStopNeeded = true;
timeToStop = numTemp / 1000.0f;
continue;
}
else if (BeginsWith(NoteRowString, "|E"))
{
bBPMStopNeeded = true;
timeToStop = (60 / out.m_Timing.GetBPMAtBeat(NoteRowToBeat(i)) * numTemp) / (float)iTickCount;
continue;
}
}
else
{