Don't track the individual stage with Stage; use the stage index for that.
(Reducing the usage of the "stage" concept. It conflicts with overlapped play.)
This commit is contained in:
@@ -372,13 +372,7 @@ StringToX( EditMode );
|
||||
LuaXType( EditMode );
|
||||
|
||||
static const char *StageNames[] = {
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"Final",
|
||||
"Normal",
|
||||
"Extra1",
|
||||
"Extra2",
|
||||
"Nonstop",
|
||||
|
||||
@@ -441,13 +441,7 @@ LuaDeclareType( EditMode );
|
||||
|
||||
enum Stage
|
||||
{
|
||||
STAGE_1,
|
||||
STAGE_2,
|
||||
STAGE_3,
|
||||
STAGE_4,
|
||||
STAGE_5,
|
||||
STAGE_6,
|
||||
STAGE_FINAL,
|
||||
STAGE_NORMAL,
|
||||
STAGE_EXTRA1,
|
||||
STAGE_EXTRA2,
|
||||
STAGE_NONSTOP,
|
||||
|
||||
@@ -941,10 +941,9 @@ Stage GameState::GetCurrentStage() const
|
||||
else if( m_PlayMode == PLAY_MODE_ONI ) return STAGE_ONI;
|
||||
else if( m_PlayMode == PLAY_MODE_NONSTOP ) return STAGE_NONSTOP;
|
||||
else if( m_PlayMode == PLAY_MODE_ENDLESS ) return STAGE_ENDLESS;
|
||||
else if( IsFinalStage() ) return STAGE_FINAL;
|
||||
else if( IsExtraStage() ) return STAGE_EXTRA1;
|
||||
else if( IsExtraStage2() ) return STAGE_EXTRA2;
|
||||
else return enum_add2( STAGE_1, GetLargestCurrentStageIndexForAnyHumanPlayer() );
|
||||
else return STAGE_NORMAL;
|
||||
}
|
||||
|
||||
// Return true if it's possible for GetCurrentStage() to return the given stage.
|
||||
@@ -958,18 +957,6 @@ bool GameState::IsStagePossible( Stage s ) const
|
||||
Stage actual = GAMESTATE->GetCurrentStage();
|
||||
GAMESTATE->m_pCurSong.SetWithoutBroadcast( pSong );
|
||||
|
||||
/* Check long/marathon, which can change the stage to FINAL. */
|
||||
if( s == STAGE_FINAL && actual >= STAGE_1 && actual <= STAGE_FINAL )
|
||||
{
|
||||
Stage max_actual = actual;
|
||||
|
||||
// For long/marathon songs:
|
||||
enum_add( max_actual, +2 );
|
||||
|
||||
if( max_actual >= STAGE_FINAL )
|
||||
return true;
|
||||
}
|
||||
|
||||
return s == actual;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ ScreenEvaluation::ScreenEvaluation()
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMEMAN->GetDefaultGame(),"versus") );
|
||||
STATSMAN->m_CurStageStats.m_playMode = GAMESTATE->m_PlayMode;
|
||||
STATSMAN->m_CurStageStats.m_pStyle = GAMESTATE->GetCurrentStyle();
|
||||
STATSMAN->m_CurStageStats.m_Stage = STAGE_1;
|
||||
STATSMAN->m_CurStageStats.m_Stage = STAGE_NORMAL;
|
||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||
GAMESTATE->m_pCurSong.Set( SONGMAN->GetRandomSong() );
|
||||
STATSMAN->m_CurStageStats.m_vpPlayedSongs.push_back( GAMESTATE->m_pCurSong );
|
||||
@@ -660,13 +660,13 @@ void ScreenEvaluation::Init()
|
||||
!GAMESTATE->IsCourseMode() &&
|
||||
!SUMMARY )
|
||||
{
|
||||
m_sprTryExtraStage.Load( THEME->GetPathG(m_sName,GAMESTATE->IsExtraStage()?"try extra2":"try extra1") );
|
||||
m_sprTryExtraStage.Load( THEME->GetPathG(m_sName,GAMESTATE->IsExtraStage2()?"try extra2":"try extra1") );
|
||||
m_sprTryExtraStage->SetName( "TryExtraStage" );
|
||||
ActorUtil::LoadAllCommands( *m_sprTryExtraStage, m_sName );
|
||||
SET_XY( m_sprTryExtraStage );
|
||||
this->AddChild( m_sprTryExtraStage );
|
||||
|
||||
if( GAMESTATE->IsExtraStage() )
|
||||
if( GAMESTATE->IsExtraStage2() )
|
||||
SOUND->PlayOnce( THEME->GetPathS(m_sName,"try extra2") );
|
||||
else
|
||||
SOUND->PlayOnce( THEME->GetPathS(m_sName,"try extra1") );
|
||||
|
||||
Reference in New Issue
Block a user