From bc331f3fc60682ac22799cd6b50b64a73907f268 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 13 Jan 2010 00:07:34 +0000 Subject: [PATCH] add support for |E| tag from DirectMove KSF files. --- stepmania/src/NotesLoaderKSF.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/stepmania/src/NotesLoaderKSF.cpp b/stepmania/src/NotesLoaderKSF.cpp index 0bcfaae697..4382e5e16c 100644 --- a/stepmania/src/NotesLoaderKSF.cpp +++ b/stepmania/src/NotesLoaderKSF.cpp @@ -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 {