revert last: StringToDifficulty is intentional
This commit is contained in:
@@ -45,7 +45,7 @@ void ThemeMetricDifficultiesToShow::Read()
|
||||
|
||||
FOREACH_CONST( RString, v, i )
|
||||
{
|
||||
Difficulty d = BackwardCompatibleStringToDifficulty( *i );
|
||||
Difficulty d = StringToDifficulty( *i );
|
||||
if( d == Difficulty_Invalid )
|
||||
RageException::Throw( "Unknown difficulty \"%s\" in CourseDifficultiesToShow.", i->c_str() );
|
||||
m_v.push_back( d );
|
||||
@@ -75,7 +75,7 @@ void ThemeMetricCourseDifficultiesToShow::Read()
|
||||
|
||||
FOREACH_CONST( RString, v, i )
|
||||
{
|
||||
CourseDifficulty d = BackwardCompatibleStringToDifficulty( *i );
|
||||
CourseDifficulty d = StringToDifficulty( *i );
|
||||
if( d == Difficulty_Invalid )
|
||||
RageException::Throw( "Unknown CourseDifficulty \"%s\" in CourseDifficultiesToShow.", i->c_str() );
|
||||
m_v.push_back( d );
|
||||
|
||||
@@ -217,7 +217,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
||||
}
|
||||
}
|
||||
|
||||
new_entry.stepsCriteria.m_difficulty = BackwardCompatibleStringToDifficulty( sParams[2] );
|
||||
new_entry.stepsCriteria.m_difficulty = StringToDifficulty( sParams[2] );
|
||||
if( new_entry.stepsCriteria.m_difficulty == Difficulty_Invalid )
|
||||
{
|
||||
int retval = sscanf( sParams[2], "%d..%d", &new_entry.stepsCriteria.m_iLowMeter, &new_entry.stepsCriteria.m_iHighMeter );
|
||||
|
||||
@@ -192,7 +192,7 @@ void GameCommand::LoadOne( const Command& cmd )
|
||||
|
||||
else if( sName == "difficulty" )
|
||||
{
|
||||
Difficulty dc = BackwardCompatibleStringToDifficulty( sValue );
|
||||
Difficulty dc = StringToDifficulty( sValue );
|
||||
if( dc != Difficulty_Invalid )
|
||||
m_dc = dc;
|
||||
else
|
||||
@@ -261,7 +261,7 @@ void GameCommand::LoadOne( const Command& cmd )
|
||||
if( pSong == NULL || pStyle == NULL )
|
||||
RageException::Throw( "Must set Song and Style to set Steps." );
|
||||
|
||||
Difficulty dc = BackwardCompatibleStringToDifficulty( sSteps );
|
||||
Difficulty dc = StringToDifficulty( sSteps );
|
||||
if( dc != Difficulty_Edit )
|
||||
m_pSteps = SongUtil::GetStepsByDifficulty( pSong, pStyle->m_StepsType, dc );
|
||||
else
|
||||
@@ -296,7 +296,7 @@ void GameCommand::LoadOne( const Command& cmd )
|
||||
if( pCourse == NULL || pStyle == NULL )
|
||||
RageException::Throw( "Must set Course and Style to set Steps." );
|
||||
|
||||
const CourseDifficulty cd = BackwardCompatibleStringToDifficulty( sTrail );
|
||||
const CourseDifficulty cd = StringToDifficulty( sTrail );
|
||||
ASSERT_M( cd != Difficulty_Invalid, ssprintf("Invalid difficulty '%s'", sTrail.c_str()) );
|
||||
|
||||
m_pTrail = pCourse->GetTrail( pStyle->m_StepsType, cd );
|
||||
|
||||
@@ -1235,8 +1235,8 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode )
|
||||
pNode->GetChildValue( "WeightPounds", m_iWeightPounds );
|
||||
pNode->GetChildValue( "Guid", m_sGuid );
|
||||
pNode->GetChildValue( "SortOrder", s ); m_SortOrder = StringToSortOrder( s );
|
||||
pNode->GetChildValue( "LastDifficulty", s ); m_LastDifficulty = BackwardCompatibleStringToDifficulty( s );
|
||||
pNode->GetChildValue( "LastCourseDifficulty", s ); m_LastCourseDifficulty = BackwardCompatibleStringToDifficulty( s );
|
||||
pNode->GetChildValue( "LastDifficulty", s ); m_LastDifficulty = StringToDifficulty( s );
|
||||
pNode->GetChildValue( "LastCourseDifficulty", s ); m_LastCourseDifficulty = StringToDifficulty( s );
|
||||
pNode->GetChildValue( "LastStepsType", s ); m_LastStepsType = GameManager::StringToStepsType( s );
|
||||
pTemp = pNode->GetChild( "Song" ); if( pTemp ) m_lastSong.LoadFromNode( pTemp );
|
||||
pTemp = pNode->GetChild( "Course" ); if( pTemp ) m_lastCourse.LoadFromNode( pTemp );
|
||||
|
||||
@@ -1277,7 +1277,7 @@ void ScreenGameplay::LoadLights()
|
||||
|
||||
Difficulty d1 = Difficulty_Invalid;
|
||||
if( asDifficulties.size() > 0 )
|
||||
d1 = BackwardCompatibleStringToDifficulty( asDifficulties[0] );
|
||||
d1 = StringToDifficulty( asDifficulties[0] );
|
||||
pSteps = SongUtil::GetClosestNotes( GAMESTATE->m_pCurSong, st, d1 );
|
||||
|
||||
// If we can't find anything at all, stop.
|
||||
@@ -1289,7 +1289,7 @@ void ScreenGameplay::LoadLights()
|
||||
|
||||
if( asDifficulties.size() > 1 )
|
||||
{
|
||||
Difficulty d2 = BackwardCompatibleStringToDifficulty( asDifficulties[1] );
|
||||
Difficulty d2 = StringToDifficulty( asDifficulties[1] );
|
||||
const Steps *pSteps2 = SongUtil::GetClosestNotes( GAMESTATE->m_pCurSong, st, d2 );
|
||||
if( pSteps != NULL && pSteps2 != NULL && pSteps != pSteps2 )
|
||||
{
|
||||
|
||||
@@ -152,7 +152,7 @@ void Steps::TidyUpData()
|
||||
m_StepsType = STEPS_TYPE_DANCE_SINGLE;
|
||||
|
||||
if( GetDifficulty() == Difficulty_Invalid )
|
||||
SetDifficulty( BackwardCompatibleStringToDifficulty(GetDescription()) );
|
||||
SetDifficulty( StringToDifficulty(GetDescription()) );
|
||||
|
||||
if( GetDifficulty() == Difficulty_Invalid )
|
||||
{
|
||||
|
||||
@@ -301,7 +301,7 @@ void StepsID::LoadFromNode( const XNode* pNode )
|
||||
st = GameManager::StringToStepsType( sTemp );
|
||||
|
||||
pNode->GetAttrValue( "Difficulty", sTemp );
|
||||
dc = BackwardCompatibleStringToDifficulty( sTemp );
|
||||
dc = StringToDifficulty( sTemp );
|
||||
|
||||
if( dc == Difficulty_Edit )
|
||||
{
|
||||
|
||||
@@ -491,7 +491,7 @@ void UnlockManager::Load()
|
||||
break;
|
||||
}
|
||||
|
||||
e->m_dc = BackwardCompatibleStringToDifficulty( e->m_cmd.GetArg(1).s );
|
||||
e->m_dc = StringToDifficulty( e->m_cmd.GetArg(1).s );
|
||||
if( e->m_dc == Difficulty_Invalid )
|
||||
{
|
||||
LOG->Warn( "Unlock: Invalid difficulty \"%s\"", e->m_cmd.GetArg(1).s.c_str() );
|
||||
|
||||
Reference in New Issue
Block a user