naming cleanups

This commit is contained in:
Glenn Maynard
2006-09-26 20:49:10 +00:00
parent b9a189711e
commit e531249704
10 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -53,9 +53,9 @@ const char *CodeNames[] = {
"CancelAllPlayerOptions", "CancelAllPlayerOptions",
"BackInEventMode", "BackInEventMode",
}; };
XToString( Code, NUM_CODES ); XToString( Code, NUM_Code );
static CodeItem g_CodeItems[NUM_CODES]; static CodeItem g_CodeItems[NUM_Code];
bool CodeItem::EnteredCode( GameController controller ) const bool CodeItem::EnteredCode( GameController controller ) const
+2 -2
View File
@@ -45,9 +45,9 @@ enum Code {
CODE_SAVE_SCREENSHOT2, CODE_SAVE_SCREENSHOT2,
CODE_CANCEL_ALL_PLAYER_OPTIONS, CODE_CANCEL_ALL_PLAYER_OPTIONS,
CODE_BACK_IN_EVENT_MODE, CODE_BACK_IN_EVENT_MODE,
NUM_CODES // leave this at the end NUM_Code // leave this at the end
}; };
#define FOREACH_Code( c ) FOREACH_ENUM( Code, NUM_CODES, c ) #define FOREACH_Code( c ) FOREACH_ENUM( Code, NUM_Code, c )
struct CodeItem struct CodeItem
{ {
+1 -1
View File
@@ -77,7 +77,7 @@ static const char *RankingCategoryNames[] = {
"c", "c",
"d", "d",
}; };
XToString( RankingCategory, NUM_RANKING_CATEGORIES ); XToString( RankingCategory, NUM_RankingCategory );
StringToX( RankingCategory ); StringToX( RankingCategory );
+3 -3
View File
@@ -236,10 +236,10 @@ enum RankingCategory
RANKING_B, // 4-6 meter per song avg. RANKING_B, // 4-6 meter per song avg.
RANKING_C, // 7-9 meter per song avg. RANKING_C, // 7-9 meter per song avg.
RANKING_D, // 10+ meter per song avg. // doesn't count extra stage! RANKING_D, // 10+ meter per song avg. // doesn't count extra stage!
NUM_RANKING_CATEGORIES, NUM_RankingCategory,
RANKING_INVALID RankingCategory_Invalid
}; };
#define FOREACH_RankingCategory( rc ) FOREACH_ENUM( RankingCategory, NUM_RANKING_CATEGORIES, rc ) #define FOREACH_RankingCategory( rc ) FOREACH_ENUM( RankingCategory, NUM_RankingCategory, rc )
const RString& RankingCategoryToString( RankingCategory rc ); const RString& RankingCategoryToString( RankingCategory rc );
RankingCategory StringToRankingCategory( const RString& rc ); RankingCategory StringToRankingCategory( const RString& rc );
+4 -4
View File
@@ -33,14 +33,14 @@ static const char *SelectTypeNames[] = {
"SelectMultiple", "SelectMultiple",
"SelectNone", "SelectNone",
}; };
XToString( SelectType, NUM_SELECT_TYPES ); XToString( SelectType, NUM_SelectType );
StringToX( SelectType ); StringToX( SelectType );
static const char *LayoutTypeNames[] = { static const char *LayoutTypeNames[] = {
"ShowAllInRow", "ShowAllInRow",
"ShowOneInRow", "ShowOneInRow",
}; };
XToString( LayoutType, NUM_LAYOUT_TYPES ); XToString( LayoutType, NUM_LayoutType );
StringToX( LayoutType ); StringToX( LayoutType );
RString OptionRowHandler::OptionTitle() const RString OptionRowHandler::OptionTitle() const
@@ -820,7 +820,7 @@ public:
if( pStr == NULL ) if( pStr == NULL )
RageException::Throw( "\"%s\" \"LayoutType\" entry is not a string.", sLuaFunction.c_str() ); RageException::Throw( "\"%s\" \"LayoutType\" entry is not a string.", sLuaFunction.c_str() );
m_Def.m_layoutType = StringToLayoutType( pStr ); m_Def.m_layoutType = StringToLayoutType( pStr );
ASSERT( m_Def.m_layoutType != LAYOUT_INVALID ); ASSERT( m_Def.m_layoutType != LayoutType_Invalid );
lua_pop( L, 1 ); lua_pop( L, 1 );
@@ -830,7 +830,7 @@ public:
if( pStr == NULL ) if( pStr == NULL )
RageException::Throw( "\"%s\" \"SelectType\" entry is not a string.", sLuaFunction.c_str() ); RageException::Throw( "\"%s\" \"SelectType\" entry is not a string.", sLuaFunction.c_str() );
m_Def.m_selectType = StringToSelectType( pStr ); m_Def.m_selectType = StringToSelectType( pStr );
ASSERT( m_Def.m_selectType != SELECT_INVALID ); ASSERT( m_Def.m_selectType != SelectType_Invalid );
lua_pop( L, 1 ); lua_pop( L, 1 );
+4 -4
View File
@@ -16,8 +16,8 @@ enum SelectType
SELECT_ONE, SELECT_ONE,
SELECT_MULTIPLE, SELECT_MULTIPLE,
SELECT_NONE, SELECT_NONE,
NUM_SELECT_TYPES, NUM_SelectType,
SELECT_INVALID SelectType_Invalid
}; };
const RString& SelectTypeToString( SelectType pm ); const RString& SelectTypeToString( SelectType pm );
SelectType StringToSelectType( const RString& s ); SelectType StringToSelectType( const RString& s );
@@ -26,8 +26,8 @@ enum LayoutType
{ {
LAYOUT_SHOW_ALL_IN_ROW, LAYOUT_SHOW_ALL_IN_ROW,
LAYOUT_SHOW_ONE_IN_ROW, LAYOUT_SHOW_ONE_IN_ROW,
NUM_LAYOUT_TYPES, NUM_LayoutType,
LAYOUT_INVALID LayoutType_Invalid
}; };
const RString& LayoutTypeToString( LayoutType pm ); const RString& LayoutTypeToString( LayoutType pm );
LayoutType StringToLayoutType( const RString& s ); LayoutType StringToLayoutType( const RString& s );
+1 -1
View File
@@ -47,7 +47,7 @@ void PlayerStageStats::Init()
m_pcaToShow = PEAK_COMBO_AWARD_INVALID; m_pcaToShow = PEAK_COMBO_AWARD_INVALID;
m_iPersonalHighScoreIndex = -1; m_iPersonalHighScoreIndex = -1;
m_iMachineHighScoreIndex = -1; m_iMachineHighScoreIndex = -1;
m_rc = RANKING_INVALID; m_rc = RankingCategory_Invalid;
m_HighScore = HighScore(); m_HighScore = HighScore();
} }
+1 -1
View File
@@ -1536,7 +1536,7 @@ void Profile::LoadCategoryScoresFromNode( const XNode* pCategoryScores )
if( !pRadarCategory->GetAttrValue( "Type", str ) ) if( !pRadarCategory->GetAttrValue( "Type", str ) )
WARN_AND_CONTINUE; WARN_AND_CONTINUE;
RankingCategory rc = StringToRankingCategory( str ); RankingCategory rc = StringToRankingCategory( str );
if( rc == RANKING_INVALID ) if( rc == RankingCategory_Invalid )
WARN_AND_CONTINUE_M( str ); WARN_AND_CONTINUE_M( str );
const XNode *pHighScoreListNode = pRadarCategory->GetChild("HighScoreList"); const XNode *pHighScoreListNode = pRadarCategory->GetChild("HighScoreList");
+1 -1
View File
@@ -199,7 +199,7 @@ public:
// //
// Category high scores // Category high scores
// //
HighScoreList m_CategoryHighScores[NUM_StepsType][NUM_RANKING_CATEGORIES]; HighScoreList m_CategoryHighScores[NUM_StepsType][NUM_RankingCategory];
void AddCategoryHighScore( StepsType st, RankingCategory rc, HighScore hs, int &iIndexOut ); void AddCategoryHighScore( StepsType st, RankingCategory rc, HighScore hs, int &iIndexOut );
HighScoreList& GetCategoryHighScoreList( StepsType st, RankingCategory rc ); HighScoreList& GetCategoryHighScoreList( StepsType st, RankingCategory rc );
+1 -1
View File
@@ -543,7 +543,7 @@ void ScreenRankingLines::Init()
for( unsigned i=0; i<STEPS_TYPES_TO_SHOW.GetValue().size(); i++ ) for( unsigned i=0; i<STEPS_TYPES_TO_SHOW.GetValue().size(); i++ )
{ {
for( int c=0; c<NUM_RANKING_CATEGORIES; c++ ) for( int c=0; c<NUM_RankingCategory; c++ )
{ {
PageToShow pts; PageToShow pts;
pts.colorIndex = i; pts.colorIndex = i;