StringToDifficulty->BackwardCompatibleStringToDifficulty. Don't accept song file backward compatible names other places, like in metrics
This commit is contained in:
@@ -42,7 +42,7 @@ LuaFunction( DifficultyDisplayTypeToLocalizedString, DifficultyDisplayTypeToLoca
|
||||
/* TODO: Format specific hacks should be moved into the file loader for
|
||||
* that format. We don't want to carry these hacks forward to file
|
||||
* formats that don't need them. */
|
||||
Difficulty StringToDifficulty( const RString& sDC )
|
||||
Difficulty BackwardCompatibleStringToDifficulty( const RString& sDC )
|
||||
{
|
||||
RString s2 = sDC;
|
||||
s2.MakeLower();
|
||||
|
||||
@@ -22,6 +22,8 @@ const RString& DifficultyToString( Difficulty dc );
|
||||
Difficulty StringToDifficulty( const RString& sDC );
|
||||
LuaDeclareType( Difficulty );
|
||||
|
||||
Difficulty BackwardCompatibleStringToDifficulty( const RString& sDC );
|
||||
|
||||
typedef Difficulty CourseDifficulty;
|
||||
const int NUM_CourseDifficulty = NUM_Difficulty;
|
||||
#define FOREACH_ShownCourseDifficulty( cd ) for( Difficulty cd=GetNextShownCourseDifficulty((CourseDifficulty)-1); cd!=Difficulty_Invalid; cd=GetNextShownCourseDifficulty(cd) )
|
||||
@@ -31,6 +33,7 @@ const RString& CourseDifficultyToLocalizedString( Difficulty dc );
|
||||
Difficulty GetNextShownCourseDifficulty( Difficulty pn );
|
||||
|
||||
|
||||
|
||||
enum DifficultyDisplayType // ID for coloring and localized strings in StepsDisplay
|
||||
{
|
||||
DifficultyDisplayType_Single_Beginner,
|
||||
|
||||
@@ -173,7 +173,7 @@ static bool LoadFromDWITokens(
|
||||
int iNumFeet = atoi(sNumFeet);
|
||||
// out.SetDescription(sDescription); // Don't put garbage in the description.
|
||||
out.SetMeter(iNumFeet);
|
||||
out.SetDifficulty( StringToDifficulty(sDescription) );
|
||||
out.SetDifficulty( BackwardCompatibleStringToDifficulty(sDescription) );
|
||||
|
||||
NoteData newNoteData;
|
||||
newNoteData.SetNumTracks( g_mapDanceNoteToNoteDataColumn.size() );
|
||||
|
||||
@@ -34,7 +34,7 @@ static void LoadFromSMTokens(
|
||||
|
||||
out.m_StepsType = GameManager::StringToStepsType( sStepsType );
|
||||
out.SetDescription( sDescription );
|
||||
out.SetDifficulty( StringToDifficulty(sDifficulty) );
|
||||
out.SetDifficulty( BackwardCompatibleStringToDifficulty(sDifficulty) );
|
||||
|
||||
// HACK: We used to store SMANIAC as Difficulty_Hard with special description.
|
||||
// Now, it has its own Difficulty_Challenge
|
||||
|
||||
Reference in New Issue
Block a user