cleanup of ScreenSelect

This commit is contained in:
Chris Danford
2003-03-03 10:03:02 +00:00
parent 6071bf6fac
commit 0adf3d8590
29 changed files with 1081 additions and 1283 deletions
+14 -9
View File
@@ -241,16 +241,21 @@ const StyleDef* GameState::GetCurrentStyleDef()
return GAMEMAN->GetStyleDefForStyle( m_CurStyle );
}
void GameState::ApplyModeChoice( const ModeChoice* pModeChoice, PlayerNumber pn )
void GameState::ApplyModeChoice( const ModeChoice& mc, PlayerNumber pn )
{
if( pModeChoice->game != GAME_INVALID )
m_CurGame = pModeChoice->game;
if( pModeChoice->pm != PLAY_MODE_INVALID )
m_PlayMode = pModeChoice->pm;
if( pModeChoice->style != STYLE_INVALID )
m_CurStyle = pModeChoice->style;
if( pModeChoice->dc != DIFFICULTY_INVALID && pn != PLAYER_INVALID )
m_PreferredDifficulty[pn] = pModeChoice->dc;
if( mc.game != GAME_INVALID )
m_CurGame = mc.game;
if( mc.pm != PLAY_MODE_INVALID )
m_PlayMode = mc.pm;
if( mc.style != STYLE_INVALID )
m_CurStyle = mc.style;
if( mc.dc != DIFFICULTY_INVALID && pn != PLAYER_INVALID )
m_PreferredDifficulty[pn] = mc.dc;
}
bool GameState::IsPlayable( const ModeChoice& mc )
{
return mc.numSidesJoinedToPlay == GAMESTATE->GetNumSidesJoined();
}
bool GameState::IsPlayerEnabled( PlayerNumber pn )