use SetCurrentStyle

This commit is contained in:
Glenn Maynard
2006-09-30 22:22:26 +00:00
parent fcffe3c80f
commit 0b45f5dd0a
14 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -618,7 +618,7 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
if( m_pStyle != NULL )
{
GAMESTATE->m_pCurStyle.Set( m_pStyle );
GAMESTATE->SetCurrentStyle( m_pStyle );
// It's possible to choose a style that didn't have enough
// players joined. If enough players aren't joined, then
+3 -3
View File
@@ -87,7 +87,7 @@ GameState::GameState() :
m_iEditCourseEntryIndex( Message_EditCourseEntryIndexChanged ),
m_sEditLocalProfileID( Message_EditLocalProfileIDChanged )
{
m_pCurStyle.Set( NULL );
SetCurrentStyle( NULL );
m_pCurGame.Set( NULL );
m_iCoins = 0;
@@ -184,7 +184,7 @@ void GameState::Reset()
ASSERT( THEME );
m_timeGameStarted.SetZero();
m_pCurStyle.Set( NULL );
SetCurrentStyle( NULL );
FOREACH_PlayerNumber( p )
m_bSideIsJoined[p] = false;
FOREACH_MultiPlayer( p )
@@ -827,7 +827,7 @@ RString GameState::GetPlayerDisplayName( PlayerNumber pn ) const
bool GameState::PlayersCanJoin() const
{
return GetNumSidesJoined() == 0 || m_pCurStyle == NULL; // selecting a style finalizes the players
return GetNumSidesJoined() == 0 || GetCurrentStyle() == NULL; // selecting a style finalizes the players
}
int GameState::GetNumSidesJoined() const
+1 -1
View File
@@ -309,7 +309,7 @@ void ModeSwitcher::ChangeMode(PlayerNumber pn, int dir)
wrap( index, vPossibleStyles.size() );
}
GAMESTATE->m_pCurStyle.Set( vPossibleStyles[index] );
GAMESTATE->SetCurrentStyle( vPossibleStyles[index] );
}
m_Stylename.SetText(GetStyleName());
m_Nextmode.SetText(GetNextStyleName());
+1 -1
View File
@@ -729,7 +729,7 @@ void NetworkSyncManager::ProcessInput()
StyleName = m_packet.ReadNT();
GAMESTATE->SetCurGame( GAMEMAN->StringToGameType(GameName) );
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GameAndStringToStyle(GAMESTATE->m_pCurGame,StyleName) );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMESTATE->m_pCurGame,StyleName) );
SCREENMAN->SetNewScreen( "ScreenNetSelectMusic" ); //Should this be metric'd out?
}
+1 -1
View File
@@ -49,7 +49,7 @@ void ScreenDemonstration::Init()
ASSERT( vStylePossible.size() > 0 );
const Style* pStyle = vStylePossible[ RandomInt(vStylePossible.size()) ];
GAMESTATE->m_pCurStyle.Set( pStyle );
GAMESTATE->SetCurrentStyle( pStyle );
}
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
+1 -1
View File
@@ -184,7 +184,7 @@ void ScreenEditMenu::MenuStart( const InputEventPlus &input )
GAMESTATE->m_pCurSong.Set( pSong );
GAMESTATE->m_pCurCourse.Set( NULL );
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GetEditorStyleForStepsType(st) );
GAMESTATE->SetCurrentStyle( GAMEMAN->GetEditorStyleForStepsType(st) );
GAMESTATE->m_pCurSteps[PLAYER_1].Set( pSteps );
//
+1 -1
View File
@@ -30,7 +30,7 @@ ScreenEnding::ScreenEnding() : ScreenAttract( false/*dont reset GAMESTATE*/ )
PROFILEMAN->LoadFirstAvailableProfile(PLAYER_2);
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(),"versus") );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(),"versus") );
GAMESTATE->JoinPlayer( PLAYER_1 );
GAMESTATE->JoinPlayer( PLAYER_2 );
GAMESTATE->m_pCurSong.Set( SONGMAN->GetRandomSong() );
+2 -2
View File
@@ -91,9 +91,9 @@ ScreenEvaluation::ScreenEvaluation()
PROFILEMAN->LoadFirstAvailableProfile(PLAYER_2);
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GameAndStringToStyle(GAMEMAN->GetDefaultGame(),"versus") );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMEMAN->GetDefaultGame(),"versus") );
STATSMAN->m_CurStageStats.playMode = GAMESTATE->m_PlayMode;
STATSMAN->m_CurStageStats.pStyle = GAMESTATE->m_pCurStyle;
STATSMAN->m_CurStageStats.pStyle = GAMESTATE->GetCurrentStyle();
STATSMAN->m_CurStageStats.StageType = StageStats::STAGE_NORMAL;
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
GAMESTATE->m_pCurSong.Set( SONGMAN->GetRandomSong() );
+2 -2
View File
@@ -14,7 +14,7 @@ REGISTER_SCREEN_CLASS( ScreenGameplaySyncMachine );
void ScreenGameplaySyncMachine::Init()
{
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
GAMESTATE->SetCurrentStyle( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
AdjustSync::ResetOriginalSyncData();
SMLoader ld;
@@ -82,7 +82,7 @@ void ScreenGameplaySyncMachine::HandleScreenMessage( const ScreenMessage SM )
if( SM == SM_GoToPrevScreen || SM == SM_GoToNextScreen )
{
GAMESTATE->m_PlayMode.Set( PlayMode_Invalid );
GAMESTATE->m_pCurStyle.Set( NULL );
GAMESTATE->SetCurrentStyle( NULL );
GAMESTATE->m_pCurSong.Set( NULL );
}
}
+1 -1
View File
@@ -132,7 +132,7 @@ void ScreenHowToPlay::Init()
m_pLifeMeterBar->FillForHowToPlay( NUM_W2S, NUM_MISSES );
}
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
GAMESTATE->SetCurrentStyle( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
if( USEPLAYER )
{
@@ -285,7 +285,7 @@ void ScreenOptionsEditCourseEntry::HandleScreenMessage( const ScreenMessage SM )
// Set up for ScreenEdit
const Style *pStyle = GAMEMAN->GetEditorStyleForStepsType(pSteps->m_StepsType);
GAMESTATE->m_pCurStyle.Set( pStyle );
GAMESTATE->SetCurrentStyle( pStyle );
GAMESTATE->m_pCurSong.Set( pSong );
GAMESTATE->m_pCurSteps[PLAYER_1].Set( pSteps );
break;
@@ -139,7 +139,7 @@ void ScreenOptionsManageEditSteps::HandleScreenMessage( const ScreenMessage SM )
Steps *pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
ASSERT( pSteps );
const Style *pStyle = GAMEMAN->GetEditorStyleForStepsType( pSteps->m_StepsType );
GAMESTATE->m_pCurStyle.Set( pStyle );
GAMESTATE->SetCurrentStyle( pStyle );
// do base behavior
}
}
+1 -1
View File
@@ -113,7 +113,7 @@ void ScreenOptionsReviewWorkout::HandleScreenMessage( const ScreenMessage SM )
GAMESTATE->m_PlayMode.Set( PLAY_MODE_ENDLESS );
GAMESTATE->m_bSideIsJoined[0] = true;
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GameAndStringToStyle(GAMESTATE->m_pCurGame,"single") );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMESTATE->m_pCurGame,"single") );
PROFILEMAN->GetProfile(ProfileSlot_Player1)->m_GoalType = GoalType_Time;
PROFILEMAN->GetProfile(ProfileSlot_Player1)->m_iGoalSeconds = pWorkout->m_iMinutes * 60;
+1 -1
View File
@@ -52,7 +52,7 @@ ScreenSelectMusic::ScreenSelectMusic()
if( PREFSMAN->m_bScreenTestMode )
{
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GameAndStringToStyle(GAMEMAN->GetDefaultGame(),"versus") );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMEMAN->GetDefaultGame(),"versus") );
GAMESTATE->JoinPlayer( PLAYER_1 );
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
}