Add Song::SongHasNoteType, moved from ScreenSelectGroup.

This commit is contained in:
Glenn Maynard
2002-08-20 06:47:30 +00:00
parent 2d39de68e9
commit 2e78a4d08f
3 changed files with 16 additions and 16 deletions
+4 -16
View File
@@ -78,25 +78,13 @@ ScreenSelectGroup::ScreenSelectGroup()
aAllSongs.Copy( SONGMAN->m_pSongs );
// Filter out Songs that can't be played by the current Style
NotesType nt = GAMESTATE->GetCurrentStyleDef()->m_NotesType;
for( i=aAllSongs.GetSize()-1; i>=0; i-- ) // foreach Song, back to front
{
Song* pSong = aAllSongs[i];
bool bSongCanBePlayedByCurrentStyle = false;
for( int j=0; j<pSong->m_apNotes.GetSize(); j++ ) // foreach Notes
NotesType nt = GAMESTATE->GetCurrentStyleDef()->m_NotesType;
for( i=aAllSongs.GetSize()-1; i>=0; i-- ) // foreach Song, back to front
{
Notes* pNotes = pSong->m_apNotes[j];
if( pNotes->m_NotesType == nt )
{
bSongCanBePlayedByCurrentStyle = true;
break;
}
if( !aAllSongs[i]->SongHasNoteType(nt) )
aAllSongs.RemoveAt( i );
}
if( !bSongCanBePlayedByCurrentStyle )
aAllSongs.RemoveAt( i );
}
// Get group names by thowing them into a hash