re-clamp the description when changing the difficulty
This commit is contained in:
@@ -237,11 +237,14 @@ void BMSLoader::SearchForDifficulty( CString sTag, Steps *pOut )
|
|||||||
|
|
||||||
/* Only match "Light" in parentheses. */
|
/* Only match "Light" in parentheses. */
|
||||||
if( sTag.find( "(light" ) != sTag.npos )
|
if( sTag.find( "(light" ) != sTag.npos )
|
||||||
|
{
|
||||||
pOut->SetDifficulty( DIFFICULTY_EASY );
|
pOut->SetDifficulty( DIFFICULTY_EASY );
|
||||||
|
}
|
||||||
else if( sTag.find( "another" ) != sTag.npos )
|
else if( sTag.find( "another" ) != sTag.npos )
|
||||||
|
{
|
||||||
pOut->SetDifficulty( DIFFICULTY_HARD );
|
pOut->SetDifficulty( DIFFICULTY_HARD );
|
||||||
|
}
|
||||||
if( sTag.find( "(solo)" ) != sTag.npos )
|
else if( sTag.find( "(solo)" ) != sTag.npos )
|
||||||
{
|
{
|
||||||
pOut->SetDescription( "Solo" );
|
pOut->SetDescription( "Solo" );
|
||||||
pOut->SetDifficulty( DIFFICULTY_EDIT );
|
pOut->SetDifficulty( DIFFICULTY_EDIT );
|
||||||
|
|||||||
@@ -322,10 +322,11 @@ void Steps::SetFile( CString fn )
|
|||||||
m_sFilename = fn;
|
m_sFilename = fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Steps::SetDescription(CString desc)
|
void Steps::SetDifficultyAndDescription( Difficulty dc, CString sDescription )
|
||||||
{
|
{
|
||||||
DeAutogen();
|
DeAutogen();
|
||||||
m_sDescription = desc;
|
m_Difficulty = dc;
|
||||||
|
m_sDescription = sDescription;
|
||||||
if( GetDifficulty() == DIFFICULTY_EDIT )
|
if( GetDifficulty() == DIFFICULTY_EDIT )
|
||||||
MakeValidEditDescription( m_sDescription );
|
MakeValidEditDescription( m_sDescription );
|
||||||
}
|
}
|
||||||
@@ -340,12 +341,6 @@ bool Steps::MakeValidEditDescription( CString &sPreferredDescription )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Steps::SetDifficulty(Difficulty d)
|
|
||||||
{
|
|
||||||
DeAutogen();
|
|
||||||
m_Difficulty = d;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Steps::SetMeter(int meter)
|
void Steps::SetMeter(int meter)
|
||||||
{
|
{
|
||||||
DeAutogen();
|
DeAutogen();
|
||||||
|
|||||||
@@ -43,10 +43,11 @@ public:
|
|||||||
void SetFile( CString fn );
|
void SetFile( CString fn );
|
||||||
void SetSavedToDisk( bool b ) { m_bSavedToDisk = b; }
|
void SetSavedToDisk( bool b ) { m_bSavedToDisk = b; }
|
||||||
bool GetSavedToDisk() { return m_bSavedToDisk; }
|
bool GetSavedToDisk() { return m_bSavedToDisk; }
|
||||||
void SetDescription(CString desc);
|
void SetDifficultyAndDescription( Difficulty dc, CString sDescription );
|
||||||
|
void SetDifficulty( Difficulty dc ) { SetDifficultyAndDescription( dc, this->GetDescription() ); }
|
||||||
|
void SetDescription( CString sDescription ) { SetDifficultyAndDescription( this->GetDifficulty(), sDescription ); }
|
||||||
static bool MakeValidEditDescription( CString &sPreferredDescription ); // return true if was modified
|
static bool MakeValidEditDescription( CString &sPreferredDescription ); // return true if was modified
|
||||||
|
|
||||||
void SetDifficulty(Difficulty d);
|
|
||||||
void SetLoadedFromProfile( ProfileSlot slot ) { m_LoadedFromProfile = slot; }
|
void SetLoadedFromProfile( ProfileSlot slot ) { m_LoadedFromProfile = slot; }
|
||||||
void SetMeter(int meter);
|
void SetMeter(int meter);
|
||||||
void SetRadarValues( const RadarValues& v );
|
void SetRadarValues( const RadarValues& v );
|
||||||
|
|||||||
Reference in New Issue
Block a user