Refactor.

Finding out which songs were random was broken: if a non-static
song (eg. player's best) was missing ("BEST99999"), m_entries
doesn't necessarily match one-to-one with the results of GetStageInfo.
This commit is contained in:
Glenn Maynard
2003-07-21 21:54:07 +00:00
parent bd10a6e212
commit 4106afb299
5 changed files with 114 additions and 156 deletions
+7 -8
View File
@@ -178,23 +178,22 @@ void BPMDisplay::SetBPM( const Song* pSong )
void BPMDisplay::SetBPM( const Course* pCourse )
{
ASSERT( pCourse );
vector<Song*> vSongs;
vector<Notes*> vNotes;
vector<CString> vsModifiers;
pCourse->GetStageInfo( vSongs, vNotes, vsModifiers, GAMESTATE->GetCurrentStyleDef()->m_NotesType );
ASSERT( vSongs.size() );
vector<Course::Info> ci;
pCourse->GetCourseInfo( GAMESTATE->GetCurrentStyleDef()->m_NotesType, ci );
ASSERT( ci.size() );
vector<float> BPMS;
for( unsigned i = 0; i < vSongs.size(); ++i )
for( unsigned i = 0; i < ci.size(); ++i )
{
if( pCourse->IsMysterySong(i) )
if( ci[i].Random )
{
BPMS.push_back( -1 );
continue;
}
Song *pSong = vSongs[i];
Song *pSong = ci[i].Song;
ASSERT( pSong );
switch( pSong->m_DisplayBPMType )
{