move stage logic out of SongManager

allow selecting between multiple StepsTypes on ScreenSelectMusic (ala Pump's combined single/double list)
This commit is contained in:
Chris Danford
2007-02-23 21:13:45 +00:00
parent b407c58176
commit 9061e2c1c1
16 changed files with 198 additions and 61 deletions
+5 -8
View File
@@ -282,19 +282,16 @@ void DifficultyList::SetFromGameState()
}
else
{
vector<Steps*> CurSteps;
SongUtil::GetSteps( pSong, CurSteps, GAMESTATE->GetCurrentStyle()->m_StepsType );
vector<Steps*> vpSteps;
SongUtil::GetPossibleSteps( pSong, vpSteps );
/* Should match the sort in ScreenSelectMusic::AfterMusicChange. */
StepsUtil::RemoveLockedSteps( pSong, CurSteps );
StepsUtil::SortNotesArrayByDifficulty( CurSteps );
m_Rows.resize( CurSteps.size() );
for( unsigned i = 0; i < CurSteps.size(); ++i )
m_Rows.resize( vpSteps.size() );
for( unsigned i = 0; i < vpSteps.size(); ++i )
{
Row &row = m_Rows[i];
row.m_Steps = CurSteps[i];
row.m_Steps = vpSteps[i];
m_Lines[i].m_Meter.SetFromSteps( m_Rows[i].m_Steps );