use FOREACH_ENUM2

This commit is contained in:
Glenn Maynard
2006-09-27 05:18:47 +00:00
parent 73f9ccd0d8
commit 2eca7b670c
28 changed files with 47 additions and 47 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ enum Code {
CODE_BACK_IN_EVENT_MODE,
NUM_Code // leave this at the end
};
#define FOREACH_Code( c ) FOREACH_ENUM( Code, NUM_Code, c )
#define FOREACH_Code( c ) FOREACH_ENUM2( Code, c )
struct CodeItem
{
+2 -2
View File
@@ -26,7 +26,7 @@ enum CourseType
NUM_CourseType,
CourseType_INVALID
};
#define FOREACH_CourseType( i ) FOREACH_ENUM( CourseType, NUM_CourseType, i )
#define FOREACH_CourseType( i ) FOREACH_ENUM2( CourseType, i )
const RString& CourseTypeToString( CourseType i );
const RString& CourseTypeToLocalizedString( CourseType i );
LuaDeclareType( CourseType );
@@ -44,7 +44,7 @@ enum SongSort
SongSort_LowestGrades,
NUM_SongSort,
};
#define FOREACH_SongSort( i ) FOREACH_ENUM( SongSort, NUM_SongSort, i )
#define FOREACH_SongSort( i ) FOREACH_ENUM2( SongSort, i )
const RString& SongSortToString( SongSort ss );
const RString& SongSortToLocalizedString( SongSort ss );
+1 -1
View File
@@ -17,7 +17,7 @@ enum Difficulty
NUM_Difficulty,
DIFFICULTY_INVALID
};
#define FOREACH_Difficulty( dc ) FOREACH_ENUM( Difficulty, NUM_Difficulty, dc )
#define FOREACH_Difficulty( dc ) FOREACH_ENUM2( Difficulty, dc )
const RString& DifficultyToString( Difficulty dc );
const RString& DifficultyToLocalizedString( Difficulty dc );
Difficulty StringToDifficulty( const RString& sDC );
+2 -2
View File
@@ -25,7 +25,7 @@ enum EditMenuRow
ROW_ACTION,
NUM_EditMenuRow
};
#define FOREACH_EditMenuRow( r ) FOREACH_ENUM( EditMenuRow, NUM_EditMenuRow, r )
#define FOREACH_EditMenuRow( r ) FOREACH_ENUM2( EditMenuRow, r )
const RString& EditMenuRowToString( EditMenuRow r );
const RString& EditMenuRowToLocalizedString( EditMenuRow r );
@@ -37,7 +37,7 @@ enum EditMenuAction
EditMenuAction_Practice,
NUM_EditMenuAction
};
#define FOREACH_EditMenuAction( ema ) FOREACH_ENUM( EditMenuAction, NUM_EditMenuAction, ema )
#define FOREACH_EditMenuAction( ema ) FOREACH_ENUM2( EditMenuAction, ema )
const RString& EditMenuActionToString( EditMenuAction ema );
const RString& EditMenuActionToLocalizedString( EditMenuAction ema );
+14 -14
View File
@@ -32,7 +32,7 @@ enum RadarCategory
NUM_RadarCategory, // leave this at the end
RadarCategory_Invalid
};
#define FOREACH_RadarCategory( rc ) FOREACH_ENUM( RadarCategory, NUM_RadarCategory, rc )
#define FOREACH_RadarCategory( rc ) FOREACH_ENUM2( RadarCategory, rc )
const RString& RadarCategoryToString( RadarCategory cat );
const RString& RadarCategoryToLocalizedString( RadarCategory cat );
LuaDeclareType( RadarCategory );
@@ -72,7 +72,7 @@ enum StepsType
NUM_StepsType, // leave this at the end
StepsType_Invalid,
};
#define FOREACH_StepsType( st ) FOREACH_ENUM( StepsType, NUM_StepsType, st )
#define FOREACH_StepsType( st ) FOREACH_ENUM2( StepsType, st )
//
// Play mode stuff
@@ -88,7 +88,7 @@ enum PlayMode
NUM_PlayMode,
PlayMode_Invalid
};
#define FOREACH_PlayMode( pm ) FOREACH_ENUM( PlayMode, NUM_PlayMode, pm )
#define FOREACH_PlayMode( pm ) FOREACH_ENUM2( PlayMode, pm )
const RString& PlayModeToString( PlayMode pm );
const RString& PlayModeToLocalizedString( PlayMode pm );
PlayMode StringToPlayMode( const RString& s );
@@ -121,7 +121,7 @@ enum SortOrder
SortOrder_INVALID
};
const SortOrder MAX_SELECTABLE_SORT = (SortOrder)(SORT_ROULETTE-1);
#define FOREACH_SortOrder( so ) FOREACH_ENUM( SortOrder, NUM_SortOrder, so )
#define FOREACH_SortOrder( so ) FOREACH_ENUM2( SortOrder, so )
const RString& SortOrderToString( SortOrder so );
SortOrder StringToSortOrder( const RString& str );
LuaDeclareType( SortOrder );
@@ -145,7 +145,7 @@ enum TapNoteScore {
NUM_TapNoteScore,
TNS_Invalid,
};
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TapNoteScore, tns )
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM2( TapNoteScore, tns )
const RString& TapNoteScoreToString( TapNoteScore tns );
const RString& TapNoteScoreToLocalizedString( TapNoteScore tns );
TapNoteScore StringToTapNoteScore( const RString& str );
@@ -160,7 +160,7 @@ enum HoldNoteScore
NUM_HoldNoteScore,
HNS_Invalid,
};
#define FOREACH_HoldNoteScore( hns ) FOREACH_ENUM( HoldNoteScore, NUM_HoldNoteScore, hns )
#define FOREACH_HoldNoteScore( hns ) FOREACH_ENUM2( HoldNoteScore, hns )
const RString& HoldNoteScoreToString( HoldNoteScore hns );
const RString& HoldNoteScoreToLocalizedString( HoldNoteScore hns );
HoldNoteScore StringToHoldNoteScore( const RString& str );
@@ -209,7 +209,7 @@ enum ProfileSlot
NUM_ProfileSlot,
ProfileSlot_INVALID
};
#define FOREACH_ProfileSlot( slot ) FOREACH_ENUM( ProfileSlot, NUM_ProfileSlot, slot )
#define FOREACH_ProfileSlot( slot ) FOREACH_ENUM2( ProfileSlot, slot )
enum MemoryCardState
@@ -239,7 +239,7 @@ enum RankingCategory
NUM_RankingCategory,
RankingCategory_Invalid
};
#define FOREACH_RankingCategory( rc ) FOREACH_ENUM( RankingCategory, NUM_RankingCategory, rc )
#define FOREACH_RankingCategory( rc ) FOREACH_ENUM2( RankingCategory, rc )
const RString& RankingCategoryToString( RankingCategory rc );
RankingCategory StringToRankingCategory( const RString& rc );
@@ -306,7 +306,7 @@ enum CoinMode
NUM_CoinMode,
CoinMode_Invalid
};
#define FOREACH_CoinMode( i ) FOREACH_ENUM( CoinMode, NUM_CoinMode, i )
#define FOREACH_CoinMode( i ) FOREACH_ENUM2( CoinMode, i )
const RString& CoinModeToString( CoinMode cm );
LuaDeclareType( CoinMode );
@@ -322,7 +322,7 @@ enum Premium
NUM_Premium,
Premium_Invalid
};
#define FOREACH_Premium( i ) FOREACH_ENUM( Premium, NUM_Premium, i )
#define FOREACH_Premium( i ) FOREACH_ENUM2( Premium, i )
const RString& PremiumToString( Premium p );
LuaDeclareType( Premium );
@@ -346,7 +346,7 @@ enum PerDifficultyAward
NUM_PerDifficultyAward,
PER_DIFFICULTY_AWARD_INVALID,
};
#define FOREACH_PerDifficultyAward( pma ) FOREACH_ENUM( PerDifficultyAward, NUM_PerDifficultyAward, pma )
#define FOREACH_PerDifficultyAward( pma ) FOREACH_ENUM2( PerDifficultyAward, pma )
const RString& PerDifficultyAwardToString( PerDifficultyAward pma );
const RString& PerDifficultyAwardToLocalizedString( PerDifficultyAward pma );
PerDifficultyAward StringToPerDifficultyAward( const RString& pma );
@@ -368,7 +368,7 @@ enum PeakComboAward
NUM_PeakComboAward,
PEAK_COMBO_AWARD_INVALID,
};
#define FOREACH_PeakComboAward( pca ) FOREACH_ENUM( PeakComboAward, NUM_PeakComboAward, pca )
#define FOREACH_PeakComboAward( pca ) FOREACH_ENUM2( PeakComboAward, pca )
const RString& PeakComboAwardToString( PeakComboAward pma );
const RString& PeakComboAwardToLocalizedString( PeakComboAward pma );
PeakComboAward StringToPeakComboAward( const RString& pma );
@@ -406,7 +406,7 @@ enum GoalType
NUM_GoalType,
GoalType_INVALID,
};
#define FOREACH_GoalType( gt ) FOREACH_ENUM( GoalType, NUM_GoalType, gt )
#define FOREACH_GoalType( gt ) FOREACH_ENUM2( GoalType, gt )
const RString& GoalTypeToString( GoalType gt );
GoalType StringToGoalType( const RString& s );
LuaDeclareType( GoalType );
@@ -444,7 +444,7 @@ enum Stage
NUM_Stage,
STAGE_INVALID,
};
#define FOREACH_Stage( s ) FOREACH_ENUM( Stage, NUM_Stage, s )
#define FOREACH_Stage( s ) FOREACH_ENUM2( Stage, s )
const RString& StageToString( Stage s );
LuaDeclareType( Stage );
+2 -2
View File
@@ -14,7 +14,7 @@ enum GameController
NUM_GameController, // leave this at the end
GameController_Invalid,
};
#define FOREACH_GameController( gc ) FOREACH_ENUM( GameController, NUM_GameController, gc )
#define FOREACH_GameController( gc ) FOREACH_ENUM2( GameController, gc )
typedef int GameButton;
RString GameButtonToString( const Game* pGame, GameButton i );
@@ -23,7 +23,7 @@ GameButton StringToGameButton( const Game* pGame, const RString& s );
const GameButton NUM_GameButton = 20;
const GameButton GameButton_Invalid = NUM_GameButton+1;
#define FOREACH_GameButton( gb ) FOREACH_ENUM( GameButton, NUM_GameButton, gb )
#define FOREACH_GameButton( gb ) FOREACH_ENUM2( GameButton, gb )
enum // DanceButtons
{
+1 -1
View File
@@ -52,7 +52,7 @@ RString GradeToOldString( Grade g ); // "AAA", "B", etc for backward compatibili
RString GradeToLocalizedString( Grade g );
Grade StringToGrade( const RString &s );
LuaDeclareType( Grade );
#define FOREACH_Grade( g ) FOREACH_ENUM( Grade, NUM_Grade, g )
#define FOREACH_Grade( g ) FOREACH_ENUM2( Grade, g )
#define FOREACH_UsedGrade( g ) FOREACH_ENUM( Grade, THEME->GetMetricI("PlayerStageStats","NumGradeTiersUsed"), g )
#endif
+1 -1
View File
@@ -24,7 +24,7 @@ enum CabinetLight
NUM_CabinetLight,
CabinetLight_Invalid
};
#define FOREACH_CabinetLight( i ) FOREACH_ENUM( CabinetLight, NUM_CabinetLight, i )
#define FOREACH_CabinetLight( i ) FOREACH_ENUM2( CabinetLight, i )
const RString& CabinetLightToString( CabinetLight cl );
CabinetLight StringToCabinetLight( const RString& s);
+1 -1
View File
@@ -17,7 +17,7 @@ enum MenuButton
NUM_MenuButton, // leave this at the end
MenuButton_INVALID
};
#define FOREACH_MenuButton( m ) FOREACH_ENUM( MenuButton, NUM_MenuButton, m )
#define FOREACH_MenuButton( m ) FOREACH_ENUM2( MenuButton, m )
const RString &MenuButtonToString( MenuButton mb );
const RString &MenuButtonToLocalizedString( MenuButton mb );
+1 -1
View File
@@ -13,7 +13,7 @@
#include "LuaBinding.h"
const RString& NoteNotePartToString( NotePart i );
#define FOREACH_NotePart( i ) FOREACH_ENUM( NotePart, NUM_NotePart, i )
#define FOREACH_NotePart( i ) FOREACH_ENUM2( NotePart, i )
static const char *NotePartNames[] = {
"TapNote",
+2 -2
View File
@@ -52,7 +52,7 @@ enum HoldType
NUM_HoldType,
HoldType_Invalid
};
#define FOREACH_HoldType( i ) FOREACH_ENUM( HoldType, NUM_HoldType, i )
#define FOREACH_HoldType( i ) FOREACH_ENUM2( HoldType, i )
const RString &HoldTypeToString( HoldType ht );
enum ActiveType
@@ -62,7 +62,7 @@ enum ActiveType
NUM_ActiveType,
ActiveType_Invalid
};
#define FOREACH_ActiveType( i ) FOREACH_ENUM( ActiveType, NUM_ActiveType, i )
#define FOREACH_ActiveType( i ) FOREACH_ENUM2( ActiveType, i )
const RString &ActiveTypeToString( ActiveType at );
+1 -1
View File
@@ -45,7 +45,7 @@ enum PaneContents
COURSE_ROLLS,
NUM_PANE_CONTENTS
};
#define FOREACH_PaneContents( p ) FOREACH_ENUM( PaneContents, NUM_PANE_CONTENTS, p )
#define FOREACH_PaneContents( p ) FOREACH_ENUM2( PaneContents, p )
class PaneDisplay: public ActorFrame
{
+2 -2
View File
@@ -21,7 +21,7 @@ const RString& PlayerNumberToString( PlayerNumber pn );
const RString& PlayerNumberToLocalizedString( PlayerNumber pn );
LuaDeclareType( PlayerNumber );
#define FOREACH_PlayerNumber( pn ) FOREACH_ENUM( PlayerNumber, NUM_PLAYERS, pn )
#define FOREACH_PlayerNumber( pn ) FOREACH_ENUM2( PlayerNumber, pn )
#define FOREACH_HumanPlayer( pn ) for( PlayerNumber pn=GetNextHumanPlayer((PlayerNumber)-1); pn!=PLAYER_INVALID; pn=GetNextHumanPlayer(pn) )
#define FOREACH_EnabledPlayer( pn ) for( PlayerNumber pn=GetNextEnabledPlayer((PlayerNumber)-1); pn!=PLAYER_INVALID; pn=GetNextEnabledPlayer(pn) )
#define FOREACH_CpuPlayer( pn ) for( PlayerNumber pn=GetNextCpuPlayer((PlayerNumber)-1); pn!=PLAYER_INVALID; pn=GetNextCpuPlayer(pn) )
@@ -75,7 +75,7 @@ enum MultiPlayer
const RString& MultiPlayerToString( MultiPlayer mp );
const RString& MultiPlayerToLocalizedString( MultiPlayer mp );
#define FOREACH_MultiPlayer( pn ) FOREACH_ENUM( MultiPlayer, NUM_MultiPlayer, pn )
#define FOREACH_MultiPlayer( pn ) FOREACH_ENUM2( MultiPlayer, pn )
#define FOREACH_EnabledMultiPlayer( mp ) for( MultiPlayer mp=GetNextEnabledMultiPlayer((MultiPlayer)-1); mp!=MultiPlayer_INVALID; mp=GetNextEnabledMultiPlayer(mp) )
+1 -1
View File
@@ -125,7 +125,7 @@ enum EditButton
NUM_EditButton, // leave this at the end
EditButton_Invalid
};
#define FOREACH_EditButton( e ) FOREACH_ENUM( EditButton, NUM_EditButton, e )
#define FOREACH_EditButton( e ) FOREACH_ENUM2( EditButton, e )
const int NUM_EDIT_TO_DEVICE_SLOTS = 2;
const int NUM_EDIT_TO_MENU_SLOTS = 2;
+2 -2
View File
@@ -41,14 +41,14 @@ static const char *JudgeLineNames[] =
"W1", "W2", "W3", "W4", "W5", "Miss", "Held", "MaxCombo"
};
XToString( JudgeLine, NUM_JudgeLine );
#define FOREACH_JudgeLine( rc ) FOREACH_ENUM( JudgeLine, NUM_JudgeLine, rc )
#define FOREACH_JudgeLine( rc ) FOREACH_ENUM2( JudgeLine, rc )
static const char *StatLineNames[NUM_StatLine] =
{
"Jumps", "Holds", "Mines", "Hands", "Rolls",
};
XToString( StatLine, NUM_StatLine );
#define FOREACH_StatLine( rc ) FOREACH_ENUM( StatLine, NUM_StatLine, rc )
#define FOREACH_StatLine( rc ) FOREACH_ENUM2( StatLine, rc )
#define CHEER_DELAY_SECONDS THEME->GetMetricF(m_sName,"CheerDelaySeconds")
#define BAR_ACTUAL_MAX_COMMAND THEME->GetMetricA(m_sName,"BarActualMaxCommand")
+1 -1
View File
@@ -35,7 +35,7 @@ static const char *CourseEntryActionNames[] = {
"Delete",
};
XToString( CourseEntryAction, NUM_CourseEntryAction );
#define FOREACH_CourseEntryAction( i ) FOREACH_ENUM( CourseEntryAction, NUM_CourseEntryAction, i )
#define FOREACH_CourseEntryAction( i ) FOREACH_ENUM2( CourseEntryAction, i )
static MenuDef g_TempMenu(
"ScreenMiniMenuContext"
@@ -26,7 +26,7 @@ enum EditCourseEntryRow
ROW_DONE,
NUM_EditCourseEntryRow
};
#define FOREACH_EditCourseEntryRow( i ) FOREACH_ENUM( EditCourseEntryRow, NUM_EditCourseEntryRow, i )
#define FOREACH_EditCourseEntryRow( i ) FOREACH_ENUM2( EditCourseEntryRow, i )
AutoScreenMessage( SM_BackFromCoursePlayerOptions );
+1 -1
View File
@@ -122,7 +122,7 @@ static const char *CourseActionNames[] = {
"Delete",
};
XToString( CourseAction, NUM_CourseAction );
#define FOREACH_CourseAction( i ) FOREACH_ENUM( CourseAction, NUM_CourseAction, i )
#define FOREACH_CourseAction( i ) FOREACH_ENUM2( CourseAction, i )
static MenuDef g_TempMenu(
"ScreenMiniMenuContext"
@@ -37,7 +37,7 @@ static const char *StepsEditActionNames[] = {
"Delete",
};
XToString( StepsEditAction, NUM_StepsEditAction );
#define FOREACH_StepsEditAction( i ) FOREACH_ENUM( StepsEditAction, NUM_StepsEditAction, i )
#define FOREACH_StepsEditAction( i ) FOREACH_ENUM2( StepsEditAction, i )
static MenuDef g_TempMenu(
"ScreenMiniMenuContext"
@@ -42,7 +42,7 @@ static const char *ProfileActionNames[] = {
};
XToString( ProfileAction, NUM_ProfileAction );
XToLocalizedString( ProfileAction );
#define FOREACH_ProfileAction( i ) FOREACH_ENUM( ProfileAction, NUM_ProfileAction, i )
#define FOREACH_ProfileAction( i ) FOREACH_ENUM2( ProfileAction, i )
static MenuDef g_TempMenu(
"ScreenMiniMenuContext"
@@ -28,7 +28,7 @@ static const char *ManageWorkoutsActionNames[] = {
"Delete",
};
XToString( ManageWorkoutsAction, NUM_ManageWorkoutsAction );
#define FOREACH_ManageWorkoutsAction( i ) FOREACH_ENUM( ManageWorkoutsAction, NUM_ManageWorkoutsAction, i )
#define FOREACH_ManageWorkoutsAction( i ) FOREACH_ENUM2( ManageWorkoutsAction, i )
static MenuDef g_TempMenu(
"ScreenMiniMenuContext"
+1 -1
View File
@@ -31,7 +31,7 @@ enum PageType
NUM_PageType,
PageType_Invalid
};
#define FOREACH_PageType( pt ) FOREACH_ENUM( PageType, NUM_PageType, pt )
#define FOREACH_PageType( pt ) FOREACH_ENUM2( PageType, pt )
const RString& PageTypeToString( PageType pt );
PageType StringToPageType( const RString& s );
+1 -1
View File
@@ -17,7 +17,7 @@ enum MenuDir
MenuDir_Auto, // when players join and the selection becomes invalid
NUM_MenuDir,
};
#define FOREACH_MenuDir( md ) FOREACH_ENUM( MenuDir, NUM_MenuDir, md )
#define FOREACH_MenuDir( md ) FOREACH_ENUM2( MenuDir, md )
const RString& MenuDirToString( MenuDir md );
class ScreenSelectMaster : public ScreenSelect
+1 -1
View File
@@ -20,7 +20,7 @@ static const char *SetTimeSelectionNames[] = {
"Second",
};
XToString( SetTimeSelection, NUM_SetTimeSelection );
#define FOREACH_SetTimeSelection( s ) FOREACH_ENUM( SetTimeSelection, NUM_SetTimeSelection, s )
#define FOREACH_SetTimeSelection( s ) FOREACH_ENUM2( SetTimeSelection, s )
const float g_X[NUM_SetTimeSelection] =
{
+1 -1
View File
@@ -16,7 +16,7 @@ enum KeyboardRow
NUM_KeyboardRow,
KeyboardRow_Invalid
};
#define FOREACH_KeyboardRow( i ) FOREACH_ENUM( KeyboardRow, NUM_KeyboardRow, i )
#define FOREACH_KeyboardRow( i ) FOREACH_ENUM2( KeyboardRow, i )
const int KEYS_PER_ROW = 13;
enum KeyboardRowSpecialKey
{
+1 -1
View File
@@ -21,7 +21,7 @@ enum ElementCategory
EC_OTHER,
NUM_ElementCategory
};
#define FOREACH_ElementCategory( ec ) FOREACH_ENUM( ElementCategory, NUM_ElementCategory, ec )
#define FOREACH_ElementCategory( ec ) FOREACH_ENUM2( ElementCategory, ec )
const RString& ElementCategoryToString( ElementCategory ec );
ElementCategory StringToElementCategory( const RString& s );
+1 -1
View File
@@ -18,7 +18,7 @@ enum TweenType
NUM_TweenType,
TweenType_Invalid
};
#define FOREACH_TweenType( tt ) FOREACH_ENUM( TweenType, NUM_TweenType, tt )
#define FOREACH_TweenType( tt ) FOREACH_ENUM2( TweenType, tt )
LuaDeclareType( TweenType );
class ITween
+1 -1
View File
@@ -30,7 +30,7 @@ enum BackgroundLayer
NUM_BackgroundLayer,
BACKGROUND_LAYER_INVALID
};
#define FOREACH_BackgroundLayer( bl ) FOREACH_ENUM( BackgroundLayer, NUM_BackgroundLayer, bl )
#define FOREACH_BackgroundLayer( bl ) FOREACH_ENUM2( BackgroundLayer, bl )
struct LyricSegment
{