Added additional criteria to StepsCriteria and SongCriteria
Added new m_sSongName property to Song class Slight refactor in Song::LoadSongFromDir() to set m_sSongName Implemented the basics of #SONGSELECT course parameter
This commit is contained in:
+25
-2
@@ -32,7 +32,20 @@ ThemeMetric<bool> SHOW_SECTIONS_IN_LENGTH_SORT ( "MusicWheel", "ShowSectionsInLe
|
||||
|
||||
bool SongCriteria::Matches( const Song *pSong ) const
|
||||
{
|
||||
if( !m_vsGroupNames.size() > 0 && std::find(m_vsGroupNames.begin(), m_vsGroupNames.end(), pSong->m_sGroupName) == m_vsGroupNames.end() )
|
||||
if( m_vsGroupNames.size() > 0 && std::find(m_vsGroupNames.begin(), m_vsGroupNames.end(), pSong->m_sGroupName) == m_vsGroupNames.end() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_vsSongNames.size() > 0 && std::find(m_vsSongNames.begin(), m_vsSongNames.end(), pSong->m_sSongName) == m_vsSongNames.end()
|
||||
&& std::find(m_vsSongNames.begin(), m_vsSongNames.end(), pSong->m_sMainTitle) == m_vsSongNames.end()
|
||||
&& std::find(m_vsSongNames.begin(), m_vsSongNames.end(), pSong->m_sMainTitleTranslit) == m_vsSongNames.end() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(m_vsArtistNames.size() > 0 && std::find(m_vsArtistNames.begin(), m_vsArtistNames.end(), pSong->m_sArtist) == m_vsArtistNames.end()
|
||||
&& std::find(m_vsArtistNames.begin(), m_vsArtistNames.end(), pSong->m_sArtistTranslit) == m_vsArtistNames.end() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -79,7 +92,17 @@ bool SongCriteria::Matches( const Song *pSong ) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if( m_fMinDurationSeconds != -1 && pSong->m_fMusicLengthSeconds < m_fMinDurationSeconds )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_fMaxDurationSeconds != -1 && pSong->m_fMusicLengthSeconds > m_fMaxDurationSeconds )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
switch( m_Tutorial )
|
||||
{
|
||||
DEFAULT_FAIL(m_Tutorial);
|
||||
|
||||
Reference in New Issue
Block a user