remove DIFFICULTIESTOHIDE. It's redundant with "nodifficult"
This commit is contained in:
@@ -274,24 +274,6 @@ void Course::LoadFromCRSFile( CString sPath )
|
|||||||
rv.FromString( sParams[3] );
|
rv.FromString( sParams[3] );
|
||||||
m_RadarCache[CacheEntry(st, cd)] = rv;
|
m_RadarCache[CacheEntry(st, cd)] = rv;
|
||||||
}
|
}
|
||||||
else if( !stricmp(sValueName, "DIFFICULTIESTOHIDE") )
|
|
||||||
{
|
|
||||||
m_vDifficultiesToHide.clear();
|
|
||||||
for( unsigned i=1; i<sParams.params.size(); i++ )
|
|
||||||
{
|
|
||||||
CourseDifficulty cd = StringToCourseDifficulty( sParams[i] );
|
|
||||||
m_vDifficultiesToHide.insert( cd );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if( !stricmp(sValueName, "DIFFICULTIESTOHIDE") )
|
|
||||||
{
|
|
||||||
m_vDifficultiesToHide.clear();
|
|
||||||
for( unsigned i=1; i<sParams.params.size(); i++ )
|
|
||||||
{
|
|
||||||
CourseDifficulty cd = StringToCourseDifficulty( sParams[i] );
|
|
||||||
m_vDifficultiesToHide.insert( cd );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG->Trace( "Unexpected value named '%s'", sValueName.c_str() );
|
LOG->Trace( "Unexpected value named '%s'", sValueName.c_str() );
|
||||||
@@ -371,7 +353,6 @@ void Course::Init()
|
|||||||
m_sBannerPath = "";
|
m_sBannerPath = "";
|
||||||
m_sCDTitlePath = "";
|
m_sCDTitlePath = "";
|
||||||
m_iTrailCacheSeed = 0;
|
m_iTrailCacheSeed = 0;
|
||||||
m_vDifficultiesToHide.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Course::Save( CString sPath, bool bSavingCache )
|
void Course::Save( CString sPath, bool bSavingCache )
|
||||||
@@ -397,15 +378,6 @@ void Course::Save( CString sPath, bool bSavingCache )
|
|||||||
if( m_iLives != -1 )
|
if( m_iLives != -1 )
|
||||||
f.PutLine( ssprintf("#LIVES:%i;", m_iLives) );
|
f.PutLine( ssprintf("#LIVES:%i;", m_iLives) );
|
||||||
|
|
||||||
{
|
|
||||||
CString s;
|
|
||||||
FOREACHS_CONST( CourseDifficulty, m_vDifficultiesToHide, cd )
|
|
||||||
s += CourseDifficultyToString( *cd ) + ',';
|
|
||||||
if( !s.empty() )
|
|
||||||
s.erase( s.end()-1 ); // erase last ','
|
|
||||||
f.PutLine( "#DIFFICULTIESTOHIDE:" + s + ";" );
|
|
||||||
}
|
|
||||||
|
|
||||||
FOREACH_CourseDifficulty( cd )
|
FOREACH_CourseDifficulty( cd )
|
||||||
{
|
{
|
||||||
if( m_iCustomMeter[cd] == -1 )
|
if( m_iCustomMeter[cd] == -1 )
|
||||||
@@ -816,10 +788,6 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
|
|||||||
case DIFFICULTY_BEGINNER:
|
case DIFFICULTY_BEGINNER:
|
||||||
case DIFFICULTY_CHALLENGE:
|
case DIFFICULTY_CHALLENGE:
|
||||||
return false;
|
return false;
|
||||||
default:
|
|
||||||
if( m_vDifficultiesToHide.find(cd) != m_vDifficultiesToHide.end() ) // found a match
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -163,8 +163,6 @@ private:
|
|||||||
bool GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) const;
|
bool GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) const;
|
||||||
bool GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) const;
|
bool GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) const;
|
||||||
|
|
||||||
set<CourseDifficulty> m_vDifficultiesToHide;
|
|
||||||
|
|
||||||
typedef pair<StepsType,Difficulty> CacheEntry;
|
typedef pair<StepsType,Difficulty> CacheEntry;
|
||||||
struct CacheData
|
struct CacheData
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user