diff --git a/stepmania/src/Difficulty.cpp b/stepmania/src/Difficulty.cpp index cb0c8e2273..99c5972f67 100644 --- a/stepmania/src/Difficulty.cpp +++ b/stepmania/src/Difficulty.cpp @@ -78,7 +78,6 @@ static ThemeMetric NAMES("CustomDifficulty","Names"); RString GetCustomDifficulty( Difficulty dc, StepsTypeCategory stc ) { - RString s; switch( stc ) { @@ -86,7 +85,9 @@ RString GetCustomDifficulty( Difficulty dc, StepsTypeCategory stc ) case StepsTypeCategory_Single: case StepsTypeCategory_Double: if( dc == Difficulty_Edit ) + { return "Edit"; + } 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 ); } diff --git a/stepmania/src/Difficulty.h b/stepmania/src/Difficulty.h index 776a60843b..79793c11c4 100644 --- a/stepmania/src/Difficulty.h +++ b/stepmania/src/Difficulty.h @@ -35,8 +35,8 @@ Difficulty GetNextShownCourseDifficulty( Difficulty pn ); // 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. -const RString& GetCustomDifficulty( Difficulty dc, StepsTypeCategory stc ); -const RString& GetLocalizedCustomDifficulty( const RString &sCustomDifficultyString ); +RString GetCustomDifficulty( Difficulty dc, StepsTypeCategory stc ); +RString GetLocalizedCustomDifficulty( const RString &sCustomDifficulty ); RString GetLocalizedCustomDifficulty( Difficulty dc, StepsTypeCategory stc ) { return GetLocalizedCustomDifficulty( GetCustomDifficulty( dc, stc ) ); } diff --git a/stepmania/src/OptionRowHandler.cpp b/stepmania/src/OptionRowHandler.cpp index e24f06232e..24fa7624d3 100644 --- a/stepmania/src/OptionRowHandler.cpp +++ b/stepmania/src/OptionRowHandler.cpp @@ -444,10 +444,10 @@ class OptionRowHandlerListSteps : public OptionRowHandlerList } else { - if( ddt == DifficultyDisplayType_Edit ) + if( pSteps->IsAnEdit() ) s = pSteps->GetDescription(); 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() ); m_Def.m_vsChoices.push_back( s ); @@ -560,7 +560,7 @@ public: } 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 ); } @@ -736,8 +736,7 @@ class OptionRowHandlerListDifficulties: public OptionRowHandlerList FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), d ) { - DifficultyDisplayType ddt = MakeDifficultyDisplayType( *d, StepsTypeCategory_Single ); // TODO: Fix use of Single - RString s = DifficultyDisplayTypeToLocalizedString( ddt ); + RString s = GetLocalizedCustomDifficulty( *d, StepsTypeCategory_Single ); // TODO: Fix use of Single m_Def.m_vsChoices.push_back( s ); GameCommand mc; diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index e3768bca0e..fd3b9a3c20 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -318,7 +318,7 @@ RString StepMania::GetInitialScreen() { if( PREFSMAN->m_sTestInitialScreen.Get() != "" ) return PREFSMAN->m_sTestInitialScreen; - return INITIAL_SCREEN; + return INITIAL_SCREEN.GetValue(); } #if defined(WIN32) diff --git a/stepmania/src/StepsDisplay.cpp b/stepmania/src/StepsDisplay.cpp index 8044840192..cceba9e949 100644 --- a/stepmania/src/StepsDisplay.cpp +++ b/stepmania/src/StepsDisplay.cpp @@ -234,7 +234,7 @@ void StepsDisplay::SetInternal( const SetParams ¶ms ) } else { - if( pSteps && pSteps->IsAnEdit() ) + if( params.pSteps && params.pSteps->IsAnEdit() ) s = params.sDescription; else s = GetLocalizedCustomDifficulty( sCustomDifficulty );