fix compile

This commit is contained in:
Chris Danford
2008-11-28 22:26:06 +00:00
parent f18ba1614d
commit bc23f5ed7c
5 changed files with 12 additions and 12 deletions
+4 -3
View File
@@ -78,7 +78,6 @@ static ThemeMetric<RString> NAMES("CustomDifficulty","Names");
RString GetCustomDifficulty( Difficulty dc, StepsTypeCategory stc ) RString GetCustomDifficulty( Difficulty dc, StepsTypeCategory stc )
{ {
RString s; RString s;
switch( stc ) switch( stc )
{ {
@@ -86,7 +85,9 @@ RString GetCustomDifficulty( Difficulty dc, StepsTypeCategory stc )
case StepsTypeCategory_Single: case StepsTypeCategory_Single:
case StepsTypeCategory_Double: case StepsTypeCategory_Double:
if( dc == Difficulty_Edit ) if( dc == Difficulty_Edit )
{
return "Edit"; return "Edit";
}
else else
{ {
/* /*
@@ -108,9 +109,9 @@ RString GetCustomDifficulty( Difficulty dc, StepsTypeCategory stc )
} }
} }
const RString& GetLocalizedCustomDifficulty( RString &sCustomDifficulty ) RString GetLocalizedCustomDifficulty( const RString &sCustomDifficulty )
{ {
return THEME:GetString( "CustomDifficulty", sCustomDifficultyString ); return THEME->GetString( "CustomDifficulty", sCustomDifficulty );
} }
+2 -2
View File
@@ -35,8 +35,8 @@ Difficulty GetNextShownCourseDifficulty( Difficulty pn );
// CustomDifficulty is a themeable difficulty name based on Difficulty, string matching on StepsType, and bCourse. // CustomDifficulty is a themeable difficulty name based on Difficulty, string matching on StepsType, and bCourse.
// It is used to look up localized strings and look up colors. // It is used to look up localized strings and look up colors.
const RString& GetCustomDifficulty( Difficulty dc, StepsTypeCategory stc ); RString GetCustomDifficulty( Difficulty dc, StepsTypeCategory stc );
const RString& GetLocalizedCustomDifficulty( const RString &sCustomDifficultyString ); RString GetLocalizedCustomDifficulty( const RString &sCustomDifficulty );
RString GetLocalizedCustomDifficulty( Difficulty dc, StepsTypeCategory stc ) { return GetLocalizedCustomDifficulty( GetCustomDifficulty( dc, stc ) ); } RString GetLocalizedCustomDifficulty( Difficulty dc, StepsTypeCategory stc ) { return GetLocalizedCustomDifficulty( GetCustomDifficulty( dc, stc ) ); }
+4 -5
View File
@@ -444,10 +444,10 @@ class OptionRowHandlerListSteps : public OptionRowHandlerList
} }
else else
{ {
if( ddt == DifficultyDisplayType_Edit ) if( pSteps->IsAnEdit() )
s = pSteps->GetDescription(); s = pSteps->GetDescription();
else else
s = GetLocalizedCustomDifficulty( pSteps->GetDifficulty(), GameManager::GetStepsTypeInfo(pSteps->m_StepsType).m_StepsTypeCategory ) ); s = GetLocalizedCustomDifficulty( pSteps->GetDifficulty(), GameManager::GetStepsTypeInfo(pSteps->m_StepsType).m_StepsTypeCategory );
} }
s += ssprintf( " %d", pSteps->GetMeter() ); s += ssprintf( " %d", pSteps->GetMeter() );
m_Def.m_vsChoices.push_back( s ); m_Def.m_vsChoices.push_back( s );
@@ -560,7 +560,7 @@ public:
} }
else else
{ {
s = DifficultyDisplayTypeToLocalizedString( GetLocalizedCustomDifficulty( dc, GameManager::GetStepsTypeInfo( GAMESTATE->m_stEdit ).m_StepsTypeCategory ) ); s = GetLocalizedCustomDifficulty( dc, GameManager::GetStepsTypeInfo( GAMESTATE->m_stEdit ).m_StepsTypeCategory );
} }
m_Def.m_vsChoices.push_back( s ); m_Def.m_vsChoices.push_back( s );
} }
@@ -736,8 +736,7 @@ class OptionRowHandlerListDifficulties: public OptionRowHandlerList
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), d ) FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), d )
{ {
DifficultyDisplayType ddt = MakeDifficultyDisplayType( *d, StepsTypeCategory_Single ); // TODO: Fix use of Single RString s = GetLocalizedCustomDifficulty( *d, StepsTypeCategory_Single ); // TODO: Fix use of Single
RString s = DifficultyDisplayTypeToLocalizedString( ddt );
m_Def.m_vsChoices.push_back( s ); m_Def.m_vsChoices.push_back( s );
GameCommand mc; GameCommand mc;
+1 -1
View File
@@ -318,7 +318,7 @@ RString StepMania::GetInitialScreen()
{ {
if( PREFSMAN->m_sTestInitialScreen.Get() != "" ) if( PREFSMAN->m_sTestInitialScreen.Get() != "" )
return PREFSMAN->m_sTestInitialScreen; return PREFSMAN->m_sTestInitialScreen;
return INITIAL_SCREEN; return INITIAL_SCREEN.GetValue();
} }
#if defined(WIN32) #if defined(WIN32)
+1 -1
View File
@@ -234,7 +234,7 @@ void StepsDisplay::SetInternal( const SetParams &params )
} }
else else
{ {
if( pSteps && pSteps->IsAnEdit() ) if( params.pSteps && params.pSteps->IsAnEdit() )
s = params.sDescription; s = params.sDescription;
else else
s = GetLocalizedCustomDifficulty( sCustomDifficulty ); s = GetLocalizedCustomDifficulty( sCustomDifficulty );