rerearrange

This commit is contained in:
Glenn Maynard
2004-06-04 01:17:46 +00:00
parent 33a16651d6
commit 5676372659
+26 -26
View File
@@ -98,6 +98,26 @@ void DifficultyMeter::Load()
Unset(); Unset();
} }
void DifficultyMeter::SetFromGameState( PlayerNumber pn )
{
if( GAMESTATE->IsCourseMode() )
{
const Trail* pTrail = GAMESTATE->m_pCurTrail[pn];
if( pTrail )
SetFromTrail( pTrail );
else
SetFromCourseDifficulty( GAMESTATE->m_PreferredCourseDifficulty[pn] );
}
else
{
const Steps* pSteps = GAMESTATE->m_pCurSteps[pn];
if( pSteps )
SetFromSteps( pSteps );
else
SetFromDifficulty( GAMESTATE->m_PreferredDifficulty[pn] );
}
}
void DifficultyMeter::SetFromSteps( const Steps* pSteps ) void DifficultyMeter::SetFromSteps( const Steps* pSteps )
{ {
if( pSteps == NULL ) if( pSteps == NULL )
@@ -149,24 +169,13 @@ void DifficultyMeter::SetFromDifficulty( Difficulty dc )
SetDifficulty( DifficultyToString( dc ) ); SetDifficulty( DifficultyToString( dc ) );
} }
void DifficultyMeter::SetFromGameState( PlayerNumber pn ) void DifficultyMeter::SetFromCourseDifficulty( CourseDifficulty cd )
{ {
if( GAMESTATE->IsCourseMode() ) m_textFeet.SetEffectNone();
{ if( FEET_IS_DIFFICULTY_COLOR )
Trail* pTrail = GAMESTATE->m_pCurTrail[pn]; m_textFeet.SetDiffuse( RageColor(0.8f,0.8f,0.8f,1) );
if( pTrail ) SetFromMeterAndDifficulty( 0, DIFFICULTY_BEGINNER );
SetFromTrail( pTrail ); SetDifficulty( CourseDifficultyToString( cd ) );
else
SetFromCourseDifficulty( GAMESTATE->m_PreferredCourseDifficulty[pn] );
}
else
{
Steps* pSteps = GAMESTATE->m_pCurSteps[pn];
if( pSteps )
SetFromSteps( pSteps );
else
SetFromDifficulty( GAMESTATE->m_PreferredDifficulty[pn] );
}
} }
void DifficultyMeter::SetFromMeterAndDifficulty( int iMeter, Difficulty dc ) void DifficultyMeter::SetFromMeterAndDifficulty( int iMeter, Difficulty dc )
@@ -221,12 +230,3 @@ void DifficultyMeter::SetDifficulty( CString diff )
if( SHOW_METER ) if( SHOW_METER )
COMMAND( m_textMeter, "Set" + Capitalize(diff) ); COMMAND( m_textMeter, "Set" + Capitalize(diff) );
} }
void DifficultyMeter::SetFromCourseDifficulty( CourseDifficulty cd )
{
m_textFeet.SetEffectNone();
if( FEET_IS_DIFFICULTY_COLOR )
m_textFeet.SetDiffuse( RageColor(0.8f,0.8f,0.8f,1) );
SetFromMeterAndDifficulty( 0, DIFFICULTY_BEGINNER );
SetDifficulty( CourseDifficultyToString( cd ) );
}