Change Extra stage handling to behave like DDR Extreme
This commit is contained in:
@@ -294,6 +294,9 @@ void Course::GetPlayerOptions( int iStage, PlayerOptions* pPO_out ) const
|
|||||||
void Course::GetSongOptions( SongOptions* pSO_out ) const
|
void Course::GetSongOptions( SongOptions* pSO_out ) const
|
||||||
{
|
{
|
||||||
*pSO_out = SongOptions();
|
*pSO_out = SongOptions();
|
||||||
|
//hack: The lifebar modifiers were not showing up (in the extra stages) - had to add it here.
|
||||||
|
if( entries.size() > 0 )
|
||||||
|
pSO_out->FromString( entries[0].modifiers );
|
||||||
pSO_out->m_LifeType = (m_iLives==-1) ? SongOptions::LIFE_BAR : SongOptions::LIFE_BATTERY;
|
pSO_out->m_LifeType = (m_iLives==-1) ? SongOptions::LIFE_BAR : SongOptions::LIFE_BATTERY;
|
||||||
if( m_iLives != -1 )
|
if( m_iLives != -1 )
|
||||||
pSO_out->m_iBatteryLives = m_iLives;
|
pSO_out->m_iBatteryLives = m_iLives;
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ void GameState::Reset()
|
|||||||
m_bEditing = false;
|
m_bEditing = false;
|
||||||
m_bDemonstration = false;
|
m_bDemonstration = false;
|
||||||
m_iCurrentStageIndex = 0;
|
m_iCurrentStageIndex = 0;
|
||||||
|
m_bAllow2ndExtraStage = true;
|
||||||
|
|
||||||
m_pCurSong = NULL;
|
m_pCurSong = NULL;
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
@@ -220,6 +221,9 @@ bool GameState::HasEarnedExtraStage()
|
|||||||
* if the chosen stage was the EX we would have chosen (the hardest
|
* if the chosen stage was the EX we would have chosen (the hardest
|
||||||
* song or extra1.crs). Also, that song should be highlighted in the
|
* song or extra1.crs). Also, that song should be highlighted in the
|
||||||
* music wheel. */
|
* music wheel. */
|
||||||
|
if( PREFSMAN->m_bPickExtraStage && GAMESTATE->IsExtraStage() && !GAMESTATE->m_bAllow2ndExtraStage )
|
||||||
|
continue;
|
||||||
|
|
||||||
if( m_CurStageStats.GetGrade((PlayerNumber)p) >= GRADE_AA )
|
if( m_CurStageStats.GetGrade((PlayerNumber)p) >= GRADE_AA )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
bool HasEarnedExtraStage();
|
bool HasEarnedExtraStage();
|
||||||
|
bool m_bAllow2ndExtraStage; //only used when "Allow Selection of Extra Stage is on"
|
||||||
|
|
||||||
|
|
||||||
// Filled in by ScreenNameEntry and used by ScreenRanking to flash the recent high scores
|
// Filled in by ScreenNameEntry and used by ScreenRanking to flash the recent high scores
|
||||||
|
|||||||
@@ -443,6 +443,33 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, InputEventType type,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( GAMESTATE->IsExtraStage() && PREFSMAN->m_bPickExtraStage && MenuI.button == MENU_BUTTON_START )
|
||||||
|
{
|
||||||
|
//Check if user selected the extrastage from the course file
|
||||||
|
Song* pSongSel; //Song user selected
|
||||||
|
Song* pSongCourse; //Song from the Extra Course or that we picked
|
||||||
|
Notes* pNotes;
|
||||||
|
PlayerOptions po;
|
||||||
|
SongOptions so;
|
||||||
|
SONGMAN->GetExtraStageInfo( false, GAMESTATE->m_pCurSong->m_sGroupName, GAMESTATE->GetCurrentStyleDef(), pSongCourse, pNotes, po, so );
|
||||||
|
|
||||||
|
if( pSongCourse == NULL )
|
||||||
|
{
|
||||||
|
//no song defined, so allow anyways... This means there was no course, and we couldn't find an applicable song for EX1
|
||||||
|
GAMESTATE->m_bAllow2ndExtraStage = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pSongSel = m_MusicWheel.GetSelectedSong();
|
||||||
|
|
||||||
|
/*Enable 2nd extra stage if user chose the correct song*/
|
||||||
|
if( pSongSel == pSongCourse )
|
||||||
|
GAMESTATE->m_bAllow2ndExtraStage = true;
|
||||||
|
else
|
||||||
|
GAMESTATE->m_bAllow2ndExtraStage = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( m_Menu.IsClosing() ) return; // ignore
|
if( m_Menu.IsClosing() ) return; // ignore
|
||||||
|
|
||||||
if( m_bMadeChoice )
|
if( m_bMadeChoice )
|
||||||
|
|||||||
Reference in New Issue
Block a user