This commit is contained in:
Glenn Maynard
2005-09-08 05:52:37 +00:00
parent 213d3e1b67
commit 36f30957a6
3 changed files with 20 additions and 18 deletions
+3 -5
View File
@@ -718,12 +718,10 @@ Stage GameState::GetCurrentStage() const
else return (Stage)(STAGE_1+m_iCurrentStageIndex);
}
void GameState::GetPossibleStages( vector<Stage> &out ) const
bool GameState::IsStagePossible( Stage s ) const
{
// Optimze me so that we don't load graphics that can't possibly be shown
out.clear();
FOREACH_Stage( s )
out.push_back( s );
// Optimize me so that we don't load graphics that can't possibly be shown
return true;
}
int GameState::GetCourseSongIndex() const
+1 -1
View File
@@ -126,7 +126,7 @@ public:
bool IsExtraStage() const;
bool IsExtraStage2() const;
Stage GetCurrentStage() const;
void GetPossibleStages( vector<Stage> &out ) const;
bool IsStagePossible( Stage s ) const;
int GetCourseSongIndex() const;
CString GetPlayerDisplayName( PlayerNumber pn ) const;
+16 -12
View File
@@ -59,12 +59,12 @@ void ScreenWithMenuElements::Init()
if( SHOW_STAGE && GAMESTATE->m_pCurStyle )
{
vector<Stage> vStages;
GAMESTATE->GetPossibleStages( vStages );
FOREACH_CONST( Stage, vStages, s )
FOREACH_Stage( s )
{
m_sprStage[*s].Load( THEME->GetPathG(m_sName,"stage "+StageToString(*s)) );
m_sprStage[*s]->SetName( "Stage" );
if( !GAMESTATE->IsStagePossible(s) )
continue;
m_sprStage[s].Load( THEME->GetPathG(m_sName,"stage "+StageToString(s)) );
m_sprStage[s]->SetName( "Stage" );
}
// UpdateStage to hide/show the appropriate stage graphic. Do this before
@@ -72,10 +72,12 @@ void ScreenWithMenuElements::Init()
// to hide the graphic.
UpdateStage();
FOREACH_CONST( Stage, vStages, s )
FOREACH_Stage( s )
{
SET_XY( m_sprStage[*s] );
this->AddChild( m_sprStage[*s] );
if( !GAMESTATE->IsStagePossible(s) )
continue;
SET_XY( m_sprStage[s] );
this->AddChild( m_sprStage[s] );
}
}
@@ -175,10 +177,12 @@ void ScreenWithMenuElements::TweenOnScreen()
// to hide the graphic.
UpdateStage();
vector<Stage> vStages;
GAMESTATE->GetPossibleStages( vStages );
FOREACH_CONST( Stage, vStages, s )
ON_COMMAND( m_sprStage[*s] );
FOREACH_Stage( s )
{
if( !GAMESTATE->IsStagePossible(s) )
continue;
ON_COMMAND( m_sprStage[s] );
}
}
if( MEMORY_CARD_ICONS )