comment/whitespace editing

This commit is contained in:
AJ Kelly
2011-02-09 17:42:16 -06:00
parent d27ac32bb1
commit 0755d0f3b9
10 changed files with 66 additions and 71 deletions
+19 -21
View File
@@ -21,37 +21,35 @@ XToString( Difficulty );
StringToX( Difficulty );
LuaXType( Difficulty );
/* We prefer the above names; recognize a number of others, too. (They'll
* get normalized when written to SMs, etc.) */
/* 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. */
/* We prefer the above names; recognize a number of others, too. (They'll get
* normalized when written to SMs, etc.) 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 DwiCompatibleStringToDifficulty( const RString& sDC )
{
RString s2 = sDC;
s2.MakeLower();
if( s2 == "beginner" ) return Difficulty_Beginner;
if( s2 == "beginner" ) return Difficulty_Beginner;
else if( s2 == "easy" ) return Difficulty_Easy;
else if( s2 == "basic" ) return Difficulty_Easy;
else if( s2 == "light" ) return Difficulty_Easy;
else if( s2 == "medium" ) return Difficulty_Medium;
else if( s2 == "another" ) return Difficulty_Medium;
else if( s2 == "trick" ) return Difficulty_Medium;
else if( s2 == "basic" ) return Difficulty_Easy;
else if( s2 == "light" ) return Difficulty_Easy;
else if( s2 == "medium" ) return Difficulty_Medium;
else if( s2 == "another" ) return Difficulty_Medium;
else if( s2 == "trick" ) return Difficulty_Medium;
else if( s2 == "standard" ) return Difficulty_Medium;
else if( s2 == "difficult") return Difficulty_Medium;
else if( s2 == "hard" ) return Difficulty_Hard;
else if( s2 == "ssr" ) return Difficulty_Hard;
else if( s2 == "maniac" ) return Difficulty_Hard;
else if( s2 == "heavy" ) return Difficulty_Hard;
else if( s2 == "smaniac" ) return Difficulty_Challenge;
else if( s2 == "ssr" ) return Difficulty_Hard;
else if( s2 == "maniac" ) return Difficulty_Hard;
else if( s2 == "heavy" ) return Difficulty_Hard;
else if( s2 == "smaniac" ) return Difficulty_Challenge;
else if( s2 == "challenge" ) return Difficulty_Challenge;
else if( s2 == "expert" ) return Difficulty_Challenge;
else if( s2 == "oni" ) return Difficulty_Challenge;
else if( s2 == "expert" ) return Difficulty_Challenge;
else if( s2 == "oni" ) return Difficulty_Challenge;
else if( s2 == "edit" ) return Difficulty_Edit;
else return Difficulty_Invalid;
else return Difficulty_Invalid;
}
const RString &CourseDifficultyToLocalizedString( CourseDifficulty x )
{
static auto_ptr<LocalizedString> g_CourseDifficultyName[NUM_Difficulty];
@@ -86,6 +84,8 @@ RString GetCustomDifficulty( StepsType st, Difficulty dc, CourseType ct )
* sure what the correct behavior in this case should be. Should we still
* allow custom difficulties? Why do we not allow custom difficulties for
* Couple, Routine, or Edit? - Steve */
// CustomDifficulty for Edit defeats the purpose of the edit's name.
// I don't know the other two. -aj
if( st == StepsType_Invalid )
{
/* This is not totally necessary since DifficultyToString() will
@@ -161,13 +161,11 @@ RString TrailToCustomDifficulty( const Trail *pTrail )
return GetCustomDifficulty( pTrail->m_StepsType, pTrail->m_CourseDifficulty, pTrail->m_CourseType );
}
#include "LuaBinding.h"
LuaFunction( StepsToCustomDifficulty, StepsToCustomDifficulty(Luna<Steps>::check(L, 1)) );
LuaFunction( TrailToCustomDifficulty, TrailToCustomDifficulty(Luna<Trail>::check(L, 1)) );
/*
* (c) 2001-2004 Chris Danford
* All rights reserved.