Add support for #DISPLAYBPM in DWI and SM files

This commit is contained in:
Chris Danford
2003-05-23 01:14:43 +00:00
parent 167cc3aaef
commit 6ee884aed2
10 changed files with 108 additions and 17 deletions
+16
View File
@@ -147,6 +147,22 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
else if( 0==stricmp(sValueName,"SAMPLELENGTH") )
out.m_fMusicSampleLengthSeconds = TimeToSeconds( sParams[1] );
else if( 0==stricmp(sValueName,"DISPLAYBPM") )
{
// #DISPLAYBPM:[xxx,xxx]|[xxx]|[*];
if( sParams[1] == "*" )
out.m_DisplayBPMType = Song::DISPLAY_RANDOM;
else
{
out.m_DisplayBPMType = Song::DISPLAY_SPECIFIED;
out.m_fDisplayBPMMin = (float)atof( sParams[1] );
if( sParams[2].empty() )
out.m_fDisplayBPMMax = out.m_fDisplayBPMMin;
else
out.m_fDisplayBPMMax = (float)atof( sParams[2] );
}
}
else if( 0==stricmp(sValueName,"OFFSET") )
out.m_fBeat0OffsetInSeconds = (float)atof( sParams[1] );