From 617e8b5335a0d42d85fe2eb0eacce415cbff831c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 7 Oct 2006 08:56:58 +0000 Subject: [PATCH] FOREACH_ENUM2 -> FOREACH_ENUM --- stepmania/src/CodeDetector.h | 2 +- stepmania/src/ControllerStateDisplay.cpp | 4 +-- stepmania/src/Course.h | 4 +-- stepmania/src/Difficulty.h | 2 +- stepmania/src/EditMenu.h | 4 +-- stepmania/src/EnumHelper.h | 5 ++-- stepmania/src/GameConstantsAndTypes.h | 28 +++++++++---------- stepmania/src/GameInput.h | 4 +-- stepmania/src/Grade.h | 2 +- stepmania/src/LightsManager.h | 2 +- stepmania/src/MenuInput.h | 2 +- stepmania/src/MusicWheel.cpp | 2 +- stepmania/src/NetworkSyncManager.h | 2 +- stepmania/src/NoteDisplay.cpp | 2 +- stepmania/src/NoteDisplay.h | 4 +-- stepmania/src/PaneDisplay.h | 2 +- stepmania/src/PlayerNumber.h | 4 +-- stepmania/src/RageDisplay.cpp | 2 +- stepmania/src/RageDisplay_D3D.cpp | 4 +-- stepmania/src/RageDisplay_OGL.cpp | 2 +- stepmania/src/RageInputDevice.h | 2 +- stepmania/src/ScreenEdit.h | 2 +- stepmania/src/ScreenEvaluation.cpp | 4 +-- stepmania/src/ScreenOptionsEditCourse.cpp | 2 +- .../src/ScreenOptionsEditCourseEntry.cpp | 2 +- stepmania/src/ScreenOptionsEditWorkout.cpp | 8 +++--- stepmania/src/ScreenOptionsManageCourses.cpp | 2 +- .../src/ScreenOptionsManageEditSteps.cpp | 2 +- stepmania/src/ScreenOptionsManageProfiles.cpp | 2 +- stepmania/src/ScreenOptionsManageWorkouts.cpp | 2 +- stepmania/src/ScreenOptionsReviewWorkout.cpp | 2 +- stepmania/src/ScreenRanking.h | 2 +- stepmania/src/ScreenSelectMaster.h | 2 +- stepmania/src/ScreenSetTime.cpp | 2 +- stepmania/src/ScreenTextEntry.h | 2 +- stepmania/src/ThemeManager.h | 2 +- stepmania/src/Tween.h | 2 +- stepmania/src/UnlockManager.cpp | 2 +- stepmania/src/song.h | 2 +- 39 files changed, 64 insertions(+), 65 deletions(-) diff --git a/stepmania/src/CodeDetector.h b/stepmania/src/CodeDetector.h index 7ef7cee5f3..a64f951303 100644 --- a/stepmania/src/CodeDetector.h +++ b/stepmania/src/CodeDetector.h @@ -47,7 +47,7 @@ enum Code { CODE_BACK_IN_EVENT_MODE, NUM_Code // leave this at the end }; -#define FOREACH_Code( c ) FOREACH_ENUM2( Code, c ) +#define FOREACH_Code( c ) FOREACH_ENUM( Code, c ) struct CodeItem { diff --git a/stepmania/src/ControllerStateDisplay.cpp b/stepmania/src/ControllerStateDisplay.cpp index 7f810bbe4a..7827a30553 100644 --- a/stepmania/src/ControllerStateDisplay.cpp +++ b/stepmania/src/ControllerStateDisplay.cpp @@ -58,7 +58,7 @@ void ControllerStateDisplay::LoadInternal( MultiPlayer mp, GameController gc ) this->AddChild( m_sprFrame ); m_mp = mp; - FOREACH_ENUM2( ControllerStateButton, b ) + FOREACH_ENUM( ControllerStateButton, b ) { Button &button = m_Buttons[ b ]; @@ -74,7 +74,7 @@ void ControllerStateDisplay::Update( float fDelta ) { ActorFrame::Update( fDelta ); - FOREACH_ENUM2( ControllerStateButton, b ) + FOREACH_ENUM( ControllerStateButton, b ) { Button &button = m_Buttons[ b ]; diff --git a/stepmania/src/Course.h b/stepmania/src/Course.h index 8479f29d14..faf76eb4eb 100644 --- a/stepmania/src/Course.h +++ b/stepmania/src/Course.h @@ -26,7 +26,7 @@ enum CourseType NUM_CourseType, CourseType_Invalid }; -#define FOREACH_CourseType( i ) FOREACH_ENUM2( CourseType, i ) +#define FOREACH_CourseType( i ) FOREACH_ENUM( 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_ENUM2( SongSort, i ) +#define FOREACH_SongSort( i ) FOREACH_ENUM( SongSort, i ) const RString& SongSortToString( SongSort ss ); const RString& SongSortToLocalizedString( SongSort ss ); diff --git a/stepmania/src/Difficulty.h b/stepmania/src/Difficulty.h index 22d5081a4b..46f9c8c8ee 100644 --- a/stepmania/src/Difficulty.h +++ b/stepmania/src/Difficulty.h @@ -17,7 +17,7 @@ enum Difficulty NUM_Difficulty, Difficulty_Invalid }; -#define FOREACH_Difficulty( dc ) FOREACH_ENUM2( Difficulty, dc ) +#define FOREACH_Difficulty( dc ) FOREACH_ENUM( Difficulty, dc ) const RString& DifficultyToString( Difficulty dc ); const RString& DifficultyToLocalizedString( Difficulty dc ); Difficulty StringToDifficulty( const RString& sDC ); diff --git a/stepmania/src/EditMenu.h b/stepmania/src/EditMenu.h index 5805a899d9..f2a9600d88 100644 --- a/stepmania/src/EditMenu.h +++ b/stepmania/src/EditMenu.h @@ -23,7 +23,7 @@ enum EditMenuRow ROW_ACTION, NUM_EditMenuRow }; -#define FOREACH_EditMenuRow( r ) FOREACH_ENUM2( EditMenuRow, r ) +#define FOREACH_EditMenuRow( r ) FOREACH_ENUM( EditMenuRow, r ) const RString& EditMenuRowToString( EditMenuRow r ); const RString& EditMenuRowToLocalizedString( EditMenuRow r ); @@ -36,7 +36,7 @@ enum EditMenuAction NUM_EditMenuAction, EditMenuAction_Invalid }; -#define FOREACH_EditMenuAction( ema ) FOREACH_ENUM2( EditMenuAction, ema ) +#define FOREACH_EditMenuAction( ema ) FOREACH_ENUM( EditMenuAction, ema ) const RString& EditMenuActionToString( EditMenuAction ema ); const RString& EditMenuActionToLocalizedString( EditMenuAction ema ); diff --git a/stepmania/src/EnumHelper.h b/stepmania/src/EnumHelper.h index ef4655bea4..71b6d9129b 100644 --- a/stepmania/src/EnumHelper.h +++ b/stepmania/src/EnumHelper.h @@ -11,7 +11,6 @@ extern "C" #define FOREACH_ENUM_N( e, max, var ) for( e var=(e)0; var( var, +1 ) ) #define FOREACH_ENUM( e, var ) for( e var=(e)0; var( var, +1 ) ) -#define FOREACH_ENUM2 FOREACH_ENUM int CheckEnum( lua_State *L, LuaReference &table, int iPos, int iInvalid, const char *szType ); @@ -100,7 +99,7 @@ static void Lua##X(lua_State* L) \ { \ /* Create the EnumToString table: { "UnlockEntry_ArcadePoints", "UnlockEntry_DancePoints" } */ \ lua_newtable( L ); \ - FOREACH_ENUM2( X, i ) \ + FOREACH_ENUM( X, i ) \ { \ RString s = X##ToString( i ); \ lua_pushstring( L, (#X "_")+s ); \ @@ -111,7 +110,7 @@ static void Lua##X(lua_State* L) \ lua_setglobal( L, #X ); \ /* Create the StringToEnum table: { "UnlockEntry_ArcadePoints" = 0, "UnlockEntry_DancePoints" = 1 } */ \ lua_newtable( L ); \ - FOREACH_ENUM2( X, i ) \ + FOREACH_ENUM( X, i ) \ { \ RString s = X##ToString( i ); \ lua_pushstring( L, (#X "_")+s ); \ diff --git a/stepmania/src/GameConstantsAndTypes.h b/stepmania/src/GameConstantsAndTypes.h index 449fab763b..4abc9497c1 100644 --- a/stepmania/src/GameConstantsAndTypes.h +++ b/stepmania/src/GameConstantsAndTypes.h @@ -32,7 +32,7 @@ enum RadarCategory NUM_RadarCategory, // leave this at the end RadarCategory_Invalid }; -#define FOREACH_RadarCategory( rc ) FOREACH_ENUM2( RadarCategory, rc ) +#define FOREACH_RadarCategory( rc ) FOREACH_ENUM( 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_ENUM2( StepsType, st ) +#define FOREACH_StepsType( st ) FOREACH_ENUM( StepsType, st ) LuaDeclareType( StepsType ); // @@ -89,7 +89,7 @@ enum PlayMode NUM_PlayMode, PlayMode_Invalid }; -#define FOREACH_PlayMode( pm ) FOREACH_ENUM2( PlayMode, pm ) +#define FOREACH_PlayMode( pm ) FOREACH_ENUM( PlayMode, pm ) const RString& PlayModeToString( PlayMode pm ); const RString& PlayModeToLocalizedString( PlayMode pm ); PlayMode StringToPlayMode( const RString& s ); @@ -122,7 +122,7 @@ enum SortOrder SortOrder_Invalid }; const SortOrder MAX_SELECTABLE_SORT = (SortOrder)(SORT_ROULETTE-1); -#define FOREACH_SortOrder( so ) FOREACH_ENUM2( SortOrder, so ) +#define FOREACH_SortOrder( so ) FOREACH_ENUM( SortOrder, so ) const RString& SortOrderToString( SortOrder so ); SortOrder StringToSortOrder( const RString& str ); LuaDeclareType( SortOrder ); @@ -146,7 +146,7 @@ enum TapNoteScore { NUM_TapNoteScore, TapNoteScore_Invalid, }; -#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM2( TapNoteScore, tns ) +#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, tns ) const RString& TapNoteScoreToString( TapNoteScore tns ); const RString& TapNoteScoreToLocalizedString( TapNoteScore tns ); TapNoteScore StringToTapNoteScore( const RString& str ); @@ -161,7 +161,7 @@ enum HoldNoteScore NUM_HoldNoteScore, HoldNoteScore_Invalid, }; -#define FOREACH_HoldNoteScore( hns ) FOREACH_ENUM2( HoldNoteScore, hns ) +#define FOREACH_HoldNoteScore( hns ) FOREACH_ENUM( HoldNoteScore, hns ) const RString& HoldNoteScoreToString( HoldNoteScore hns ); const RString& HoldNoteScoreToLocalizedString( HoldNoteScore hns ); HoldNoteScore StringToHoldNoteScore( const RString& str ); @@ -210,7 +210,7 @@ enum ProfileSlot NUM_ProfileSlot, ProfileSlot_Invalid }; -#define FOREACH_ProfileSlot( slot ) FOREACH_ENUM2( ProfileSlot, slot ) +#define FOREACH_ProfileSlot( slot ) FOREACH_ENUM( ProfileSlot, slot ) enum MemoryCardState @@ -240,7 +240,7 @@ enum RankingCategory NUM_RankingCategory, RankingCategory_Invalid }; -#define FOREACH_RankingCategory( rc ) FOREACH_ENUM2( RankingCategory, rc ) +#define FOREACH_RankingCategory( rc ) FOREACH_ENUM( RankingCategory, rc ) const RString& RankingCategoryToString( RankingCategory rc ); RankingCategory StringToRankingCategory( const RString& rc ); @@ -308,7 +308,7 @@ enum CoinMode NUM_CoinMode, CoinMode_Invalid }; -#define FOREACH_CoinMode( i ) FOREACH_ENUM2( CoinMode, i ) +#define FOREACH_CoinMode( i ) FOREACH_ENUM( CoinMode, i ) const RString& CoinModeToString( CoinMode cm ); LuaDeclareType( CoinMode ); @@ -324,7 +324,7 @@ enum Premium NUM_Premium, Premium_Invalid }; -#define FOREACH_Premium( i ) FOREACH_ENUM2( Premium, i ) +#define FOREACH_Premium( i ) FOREACH_ENUM( Premium, i ) const RString& PremiumToString( Premium p ); LuaDeclareType( Premium ); @@ -348,7 +348,7 @@ enum PerDifficultyAward NUM_PerDifficultyAward, PerDifficultyAward_Invalid, }; -#define FOREACH_PerDifficultyAward( pma ) FOREACH_ENUM2( PerDifficultyAward, pma ) +#define FOREACH_PerDifficultyAward( pma ) FOREACH_ENUM( PerDifficultyAward, pma ) const RString& PerDifficultyAwardToString( PerDifficultyAward pma ); const RString& PerDifficultyAwardToLocalizedString( PerDifficultyAward pma ); PerDifficultyAward StringToPerDifficultyAward( const RString& pma ); @@ -370,7 +370,7 @@ enum PeakComboAward NUM_PeakComboAward, PeakComboAward_Invalid, }; -#define FOREACH_PeakComboAward( pca ) FOREACH_ENUM2( PeakComboAward, pca ) +#define FOREACH_PeakComboAward( pca ) FOREACH_ENUM( PeakComboAward, pca ) const RString& PeakComboAwardToString( PeakComboAward pma ); const RString& PeakComboAwardToLocalizedString( PeakComboAward pma ); PeakComboAward StringToPeakComboAward( const RString& pma ); @@ -409,7 +409,7 @@ enum GoalType NUM_GoalType, GoalType_Invalid, }; -#define FOREACH_GoalType( gt ) FOREACH_ENUM2( GoalType, gt ) +#define FOREACH_GoalType( gt ) FOREACH_ENUM( GoalType, gt ) const RString& GoalTypeToString( GoalType gt ); GoalType StringToGoalType( const RString& s ); LuaDeclareType( GoalType ); @@ -447,7 +447,7 @@ enum Stage NUM_Stage, Stage_Invalid, }; -#define FOREACH_Stage( s ) FOREACH_ENUM2( Stage, s ) +#define FOREACH_Stage( s ) FOREACH_ENUM( Stage, s ) const RString& StageToString( Stage s ); LuaDeclareType( Stage ); diff --git a/stepmania/src/GameInput.h b/stepmania/src/GameInput.h index 5a400689ea..23b0cd2154 100644 --- a/stepmania/src/GameInput.h +++ b/stepmania/src/GameInput.h @@ -14,7 +14,7 @@ enum GameController NUM_GameController, // leave this at the end GameController_Invalid, }; -#define FOREACH_GameController( gc ) FOREACH_ENUM2( GameController, gc ) +#define FOREACH_GameController( gc ) FOREACH_ENUM( GameController, gc ) typedef int GameButton; RString GameButtonToString( const InputScheme* pInputs, GameButton i ); @@ -23,7 +23,7 @@ GameButton StringToGameButton( const InputScheme* pInputs, const RString& s ); const GameButton NUM_GameButton = 20; const GameButton GameButton_Invalid = NUM_GameButton+1; -#define FOREACH_GameButton( gb ) FOREACH_ENUM2( GameButton, gb ) +#define FOREACH_GameButton( gb ) FOREACH_ENUM( GameButton, gb ) enum // DanceButtons { diff --git a/stepmania/src/Grade.h b/stepmania/src/Grade.h index 36284f0f81..e7d2d58a08 100644 --- a/stepmania/src/Grade.h +++ b/stepmania/src/Grade.h @@ -53,7 +53,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_ENUM2( Grade, g ) +#define FOREACH_Grade( g ) FOREACH_ENUM( Grade, g ) #define FOREACH_UsedGrade( g ) FOREACH_ENUM_N( Grade, THEME->GetMetricI("PlayerStageStats","NumGradeTiersUsed"), g ) #endif diff --git a/stepmania/src/LightsManager.h b/stepmania/src/LightsManager.h index eb0490c801..5d31d28d32 100644 --- a/stepmania/src/LightsManager.h +++ b/stepmania/src/LightsManager.h @@ -24,7 +24,7 @@ enum CabinetLight NUM_CabinetLight, CabinetLight_Invalid }; -#define FOREACH_CabinetLight( i ) FOREACH_ENUM2( CabinetLight, i ) +#define FOREACH_CabinetLight( i ) FOREACH_ENUM( CabinetLight, i ) const RString& CabinetLightToString( CabinetLight cl ); CabinetLight StringToCabinetLight( const RString& s); diff --git a/stepmania/src/MenuInput.h b/stepmania/src/MenuInput.h index 6bdb153040..a12b30b646 100644 --- a/stepmania/src/MenuInput.h +++ b/stepmania/src/MenuInput.h @@ -17,7 +17,7 @@ enum MenuButton NUM_MenuButton, // leave this at the end MenuButton_Invalid }; -#define FOREACH_MenuButton( m ) FOREACH_ENUM2( MenuButton, m ) +#define FOREACH_MenuButton( m ) FOREACH_ENUM( MenuButton, m ) const RString &MenuButtonToString( MenuButton mb ); const RString &MenuButtonToLocalizedString( MenuButton mb ); diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 1f32b5660a..ebe6d723c6 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -589,7 +589,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDat vct.push_back( COURSE_TYPE_ENDLESS ); break; case SORT_ALL_COURSES: - FOREACH_ENUM2( CourseType, i ) + FOREACH_ENUM( CourseType, i ) vct.push_back( i ); break; default: ASSERT(0); break; diff --git a/stepmania/src/NetworkSyncManager.h b/stepmania/src/NetworkSyncManager.h index 951d526dd9..fe00b4b26a 100644 --- a/stepmania/src/NetworkSyncManager.h +++ b/stepmania/src/NetworkSyncManager.h @@ -53,7 +53,7 @@ enum NSScoreBoardColumn NUM_NSScoreBoardColumn, NSScoreBoardColumn_Invalid }; -#define FOREACH_NSScoreBoardColumn( sc ) FOREACH_ENUM2( NSScoreBoardColumn, sc ) +#define FOREACH_NSScoreBoardColumn( sc ) FOREACH_ENUM( NSScoreBoardColumn, sc ) struct NetServerInfo { diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index a0fcaa3487..b463b31abd 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -13,7 +13,7 @@ #include "LuaBinding.h" const RString& NoteNotePartToString( NotePart i ); -#define FOREACH_NotePart( i ) FOREACH_ENUM2( NotePart, i ) +#define FOREACH_NotePart( i ) FOREACH_ENUM( NotePart, i ) static const char *NotePartNames[] = { "TapNote", diff --git a/stepmania/src/NoteDisplay.h b/stepmania/src/NoteDisplay.h index b76dda689e..0e7e112394 100644 --- a/stepmania/src/NoteDisplay.h +++ b/stepmania/src/NoteDisplay.h @@ -52,7 +52,7 @@ enum HoldType NUM_HoldType, HoldType_Invalid }; -#define FOREACH_HoldType( i ) FOREACH_ENUM2( HoldType, i ) +#define FOREACH_HoldType( i ) FOREACH_ENUM( HoldType, i ) const RString &HoldTypeToString( HoldType ht ); enum ActiveType @@ -62,7 +62,7 @@ enum ActiveType NUM_ActiveType, ActiveType_Invalid }; -#define FOREACH_ActiveType( i ) FOREACH_ENUM2( ActiveType, i ) +#define FOREACH_ActiveType( i ) FOREACH_ENUM( ActiveType, i ) const RString &ActiveTypeToString( ActiveType at ); diff --git a/stepmania/src/PaneDisplay.h b/stepmania/src/PaneDisplay.h index 6a45165626..36a89520ce 100644 --- a/stepmania/src/PaneDisplay.h +++ b/stepmania/src/PaneDisplay.h @@ -45,7 +45,7 @@ enum PaneContents COURSE_ROLLS, NUM_PANE_CONTENTS }; -#define FOREACH_PaneContents( p ) FOREACH_ENUM2( PaneContents, p ) +#define FOREACH_PaneContents( p ) FOREACH_ENUM( PaneContents, p ) class PaneDisplay: public ActorFrame { diff --git a/stepmania/src/PlayerNumber.h b/stepmania/src/PlayerNumber.h index 5c11d186b7..81b4ecee74 100644 --- a/stepmania/src/PlayerNumber.h +++ b/stepmania/src/PlayerNumber.h @@ -22,7 +22,7 @@ const RString& PlayerNumberToString( PlayerNumber pn ); const RString& PlayerNumberToLocalizedString( PlayerNumber pn ); LuaDeclareType( PlayerNumber ); -#define FOREACH_PlayerNumber( pn ) FOREACH_ENUM2( PlayerNumber, pn ) +#define FOREACH_PlayerNumber( pn ) FOREACH_ENUM( 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) ) @@ -77,7 +77,7 @@ const RString& MultiPlayerToString( MultiPlayer mp ); const RString& MultiPlayerToLocalizedString( MultiPlayer mp ); LuaDeclareType( MultiPlayer ); -#define FOREACH_MultiPlayer( pn ) FOREACH_ENUM2( MultiPlayer, pn ) +#define FOREACH_MultiPlayer( pn ) FOREACH_ENUM( MultiPlayer, pn ) #define FOREACH_EnabledMultiPlayer( mp ) for( MultiPlayer mp=GetNextEnabledMultiPlayer((MultiPlayer)-1); mp!=MultiPlayer_Invalid; mp=GetNextEnabledMultiPlayer(mp) ) diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index 880439a117..e2a047f4da 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -614,7 +614,7 @@ PixelFormat RageDisplay::FindPixelFormat( int iBPP, int iRmask, int iGmask, int { PixelFormatDesc tmp = { iBPP, { iRmask, iGmask, iBmask, iAmask } }; - FOREACH_ENUM2( PixelFormat, iPixFmt ) + FOREACH_ENUM( PixelFormat, iPixFmt ) { const PixelFormatDesc *pf = GetPixelFormatDesc( PixelFormat(iPixFmt) ); if( !SupportsTextureFormat(PixelFormat(iPixFmt), bRealtime) ) diff --git a/stepmania/src/RageDisplay_D3D.cpp b/stepmania/src/RageDisplay_D3D.cpp index 5adf4247f1..2a1d52c01c 100644 --- a/stepmania/src/RageDisplay_D3D.cpp +++ b/stepmania/src/RageDisplay_D3D.cpp @@ -795,7 +795,7 @@ void RageDisplay_D3D::SendCurrentMatrices() g_pd3dDevice->SetTransform( D3DTS_VIEW, (D3DMATRIX*)GetViewTop() ); g_pd3dDevice->SetTransform( D3DTS_WORLD, (D3DMATRIX*)GetWorldTop() ); - FOREACH_ENUM2( TextureUnit, tu ) + FOREACH_ENUM( TextureUnit, tu ) { // Optimization opportunity: Turn off texture transform if not using texture coords. g_pd3dDevice->SetTextureStageState( tu, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); @@ -1074,7 +1074,7 @@ void RageDisplay_D3D::DrawLineStrip( const RageSpriteVertex v[], int iNumVerts, void RageDisplay_D3D::ClearAllTextures() { - FOREACH_ENUM2( TextureUnit, i ) + FOREACH_ENUM( TextureUnit, i ) SetTexture( i, 0 ); g_currentTextureUnit = TextureUnit_1; } diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 68e94637f3..58d057452d 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -1323,7 +1323,7 @@ void RageDisplay_OGL::DrawLineStripInternal( const RageSpriteVertex v[], int iNu void RageDisplay_OGL::ClearAllTextures() { - FOREACH_ENUM2( TextureUnit, i ) + FOREACH_ENUM( TextureUnit, i ) SetTexture( i, 0 ); // HACK: Reset the active texture to 0. diff --git a/stepmania/src/RageInputDevice.h b/stepmania/src/RageInputDevice.h index d19aadca76..7f2d02ac78 100644 --- a/stepmania/src/RageInputDevice.h +++ b/stepmania/src/RageInputDevice.h @@ -49,7 +49,7 @@ enum InputDevice NUM_InputDevice, // leave this at the end InputDevice_Invalid // means this is NULL }; -#define FOREACH_InputDevice( i ) FOREACH_ENUM2( InputDevice, i ) +#define FOREACH_InputDevice( i ) FOREACH_ENUM( InputDevice, i ) const RString& InputDeviceToString( InputDevice i ); InputDevice StringToInputDevice( const RString& s ); inline bool IsJoystick( InputDevice id ) { return DEVICE_JOY1 <= id && id < DEVICE_JOY1+NUM_JOYSTICKS; } diff --git a/stepmania/src/ScreenEdit.h b/stepmania/src/ScreenEdit.h index 383555a750..759c23b17e 100644 --- a/stepmania/src/ScreenEdit.h +++ b/stepmania/src/ScreenEdit.h @@ -125,7 +125,7 @@ enum EditButton NUM_EditButton, // leave this at the end EditButton_Invalid }; -#define FOREACH_EditButton( e ) FOREACH_ENUM2( EditButton, e ) +#define FOREACH_EditButton( e ) FOREACH_ENUM( EditButton, e ) const int NUM_EDIT_TO_DEVICE_SLOTS = 2; const int NUM_EDIT_TO_MENU_SLOTS = 2; diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 917b03f911..9e15f4693d 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -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_ENUM2( JudgeLine, rc ) +#define FOREACH_JudgeLine( rc ) FOREACH_ENUM( JudgeLine, rc ) static const char *StatLineNames[NUM_StatLine] = { "Jumps", "Holds", "Mines", "Hands", "Rolls", }; XToString( StatLine, NUM_StatLine ); -#define FOREACH_StatLine( rc ) FOREACH_ENUM2( StatLine, rc ) +#define FOREACH_StatLine( rc ) FOREACH_ENUM( StatLine, rc ) #define CHEER_DELAY_SECONDS THEME->GetMetricF(m_sName,"CheerDelaySeconds") #define BAR_ACTUAL_MAX_COMMAND THEME->GetMetricA(m_sName,"BarActualMaxCommand") diff --git a/stepmania/src/ScreenOptionsEditCourse.cpp b/stepmania/src/ScreenOptionsEditCourse.cpp index bd0a83a393..d2ad05d1b1 100644 --- a/stepmania/src/ScreenOptionsEditCourse.cpp +++ b/stepmania/src/ScreenOptionsEditCourse.cpp @@ -35,7 +35,7 @@ static const char *CourseEntryActionNames[] = { "Delete", }; XToString( CourseEntryAction, NUM_CourseEntryAction ); -#define FOREACH_CourseEntryAction( i ) FOREACH_ENUM2( CourseEntryAction, i ) +#define FOREACH_CourseEntryAction( i ) FOREACH_ENUM( CourseEntryAction, i ) static MenuDef g_TempMenu( "ScreenMiniMenuContext" diff --git a/stepmania/src/ScreenOptionsEditCourseEntry.cpp b/stepmania/src/ScreenOptionsEditCourseEntry.cpp index dbbbda9016..2b98a7d752 100644 --- a/stepmania/src/ScreenOptionsEditCourseEntry.cpp +++ b/stepmania/src/ScreenOptionsEditCourseEntry.cpp @@ -26,7 +26,7 @@ enum EditCourseEntryRow ROW_DONE, NUM_EditCourseEntryRow }; -#define FOREACH_EditCourseEntryRow( i ) FOREACH_ENUM2( EditCourseEntryRow, i ) +#define FOREACH_EditCourseEntryRow( i ) FOREACH_ENUM( EditCourseEntryRow, i ) AutoScreenMessage( SM_BackFromCoursePlayerOptions ); diff --git a/stepmania/src/ScreenOptionsEditWorkout.cpp b/stepmania/src/ScreenOptionsEditWorkout.cpp index 09fd83f95e..34d6b30be0 100644 --- a/stepmania/src/ScreenOptionsEditWorkout.cpp +++ b/stepmania/src/ScreenOptionsEditWorkout.cpp @@ -50,7 +50,7 @@ static RString MakeMeterString( int iMeter ) void ScreenOptionsEditWorkout::BeginScreen() { vector vHands; - FOREACH_ENUM2( WorkoutDetailsRow, rowIndex ) + FOREACH_ENUM( WorkoutDetailsRow, rowIndex ) { const MenuRowDef &mr = g_MenuRows[rowIndex]; OptionRowHandler *pHand = OptionRowHandlerUtil::MakeSimple( mr ); @@ -62,7 +62,7 @@ void ScreenOptionsEditWorkout::BeginScreen() { DEFAULT_FAIL(rowIndex); case WorkoutDetailsRow_WorkoutProgram: - FOREACH_ENUM2( WorkoutProgram, i ) + FOREACH_ENUM( WorkoutProgram, i ) pHand->m_Def.m_vsChoices.push_back( WorkoutProgramToLocalizedString(i) ); break; case WorkoutDetailsRow_Minutes: @@ -84,7 +84,7 @@ void ScreenOptionsEditWorkout::BeginScreen() // } // break; case WorkoutDetailsRow_WorkoutStepsType: - FOREACH_ENUM2( WorkoutStepsType, i ) + FOREACH_ENUM( WorkoutStepsType, i ) pHand->m_Def.m_vsChoices.push_back( WorkoutStepsTypeToLocalizedString(i) ); break; } @@ -129,7 +129,7 @@ void ScreenOptionsEditWorkout::ImportOptions( int iRow, const vector &vpns ) { - FOREACH_ENUM2( WorkoutDetailsRow, i ) + FOREACH_ENUM( WorkoutDetailsRow, i ) { iRow = i; OptionRow &row = *m_pRows[iRow]; diff --git a/stepmania/src/ScreenOptionsManageCourses.cpp b/stepmania/src/ScreenOptionsManageCourses.cpp index 61ee780576..b97e6ecd81 100644 --- a/stepmania/src/ScreenOptionsManageCourses.cpp +++ b/stepmania/src/ScreenOptionsManageCourses.cpp @@ -122,7 +122,7 @@ static const char *CourseActionNames[] = { "Delete", }; XToString( CourseAction, NUM_CourseAction ); -#define FOREACH_CourseAction( i ) FOREACH_ENUM2( CourseAction, i ) +#define FOREACH_CourseAction( i ) FOREACH_ENUM( CourseAction, i ) static MenuDef g_TempMenu( "ScreenMiniMenuContext" diff --git a/stepmania/src/ScreenOptionsManageEditSteps.cpp b/stepmania/src/ScreenOptionsManageEditSteps.cpp index 98c3eed9b5..976f39ba32 100644 --- a/stepmania/src/ScreenOptionsManageEditSteps.cpp +++ b/stepmania/src/ScreenOptionsManageEditSteps.cpp @@ -37,7 +37,7 @@ static const char *StepsEditActionNames[] = { "Delete", }; XToString( StepsEditAction, NUM_StepsEditAction ); -#define FOREACH_StepsEditAction( i ) FOREACH_ENUM2( StepsEditAction, i ) +#define FOREACH_StepsEditAction( i ) FOREACH_ENUM( StepsEditAction, i ) static MenuDef g_TempMenu( "ScreenMiniMenuContext" diff --git a/stepmania/src/ScreenOptionsManageProfiles.cpp b/stepmania/src/ScreenOptionsManageProfiles.cpp index 49c37260b8..df62dfd716 100644 --- a/stepmania/src/ScreenOptionsManageProfiles.cpp +++ b/stepmania/src/ScreenOptionsManageProfiles.cpp @@ -42,7 +42,7 @@ static const char *ProfileActionNames[] = { }; XToString( ProfileAction, NUM_ProfileAction ); XToLocalizedString( ProfileAction ); -#define FOREACH_ProfileAction( i ) FOREACH_ENUM2( ProfileAction, i ) +#define FOREACH_ProfileAction( i ) FOREACH_ENUM( ProfileAction, i ) static MenuDef g_TempMenu( "ScreenMiniMenuContext" diff --git a/stepmania/src/ScreenOptionsManageWorkouts.cpp b/stepmania/src/ScreenOptionsManageWorkouts.cpp index 74e2087030..70b8c822f7 100644 --- a/stepmania/src/ScreenOptionsManageWorkouts.cpp +++ b/stepmania/src/ScreenOptionsManageWorkouts.cpp @@ -28,7 +28,7 @@ static const char *ManageWorkoutsActionNames[] = { "Delete", }; XToString( ManageWorkoutsAction, NUM_ManageWorkoutsAction ); -#define FOREACH_ManageWorkoutsAction( i ) FOREACH_ENUM2( ManageWorkoutsAction, i ) +#define FOREACH_ManageWorkoutsAction( i ) FOREACH_ENUM( ManageWorkoutsAction, i ) static MenuDef g_TempMenu( "ScreenMiniMenuContext" diff --git a/stepmania/src/ScreenOptionsReviewWorkout.cpp b/stepmania/src/ScreenOptionsReviewWorkout.cpp index 8fe127ccbb..6d4a526fc4 100644 --- a/stepmania/src/ScreenOptionsReviewWorkout.cpp +++ b/stepmania/src/ScreenOptionsReviewWorkout.cpp @@ -52,7 +52,7 @@ void ScreenOptionsReviewWorkout::Init() void ScreenOptionsReviewWorkout::BeginScreen() { vector vHands; - FOREACH_ENUM2( ReviewWorkoutRow, rowIndex ) + FOREACH_ENUM( ReviewWorkoutRow, rowIndex ) { const MenuRowDef &mr = g_MenuRows[rowIndex]; OptionRowHandler *pHand = OptionRowHandlerUtil::MakeSimple( mr ); diff --git a/stepmania/src/ScreenRanking.h b/stepmania/src/ScreenRanking.h index 7c964eefc0..0f03ad400c 100644 --- a/stepmania/src/ScreenRanking.h +++ b/stepmania/src/ScreenRanking.h @@ -31,7 +31,7 @@ enum PageType NUM_PageType, PageType_Invalid }; -#define FOREACH_PageType( pt ) FOREACH_ENUM2( PageType, pt ) +#define FOREACH_PageType( pt ) FOREACH_ENUM( PageType, pt ) const RString& PageTypeToString( PageType pt ); PageType StringToPageType( const RString& s ); diff --git a/stepmania/src/ScreenSelectMaster.h b/stepmania/src/ScreenSelectMaster.h index cfe9655a9b..12a4d030e8 100644 --- a/stepmania/src/ScreenSelectMaster.h +++ b/stepmania/src/ScreenSelectMaster.h @@ -17,7 +17,7 @@ enum MenuDir MenuDir_Auto, // when players join and the selection becomes invalid NUM_MenuDir, }; -#define FOREACH_MenuDir( md ) FOREACH_ENUM2( MenuDir, md ) +#define FOREACH_MenuDir( md ) FOREACH_ENUM( MenuDir, md ) const RString& MenuDirToString( MenuDir md ); class ScreenSelectMaster : public ScreenSelect diff --git a/stepmania/src/ScreenSetTime.cpp b/stepmania/src/ScreenSetTime.cpp index a2015927d3..d40fd446bd 100644 --- a/stepmania/src/ScreenSetTime.cpp +++ b/stepmania/src/ScreenSetTime.cpp @@ -20,7 +20,7 @@ static const char *SetTimeSelectionNames[] = { "Second", }; XToString( SetTimeSelection, NUM_SetTimeSelection ); -#define FOREACH_SetTimeSelection( s ) FOREACH_ENUM2( SetTimeSelection, s ) +#define FOREACH_SetTimeSelection( s ) FOREACH_ENUM( SetTimeSelection, s ) const float g_X[NUM_SetTimeSelection] = { diff --git a/stepmania/src/ScreenTextEntry.h b/stepmania/src/ScreenTextEntry.h index 0e66b7b610..a4cb90138d 100644 --- a/stepmania/src/ScreenTextEntry.h +++ b/stepmania/src/ScreenTextEntry.h @@ -16,7 +16,7 @@ enum KeyboardRow NUM_KeyboardRow, KeyboardRow_Invalid }; -#define FOREACH_KeyboardRow( i ) FOREACH_ENUM2( KeyboardRow, i ) +#define FOREACH_KeyboardRow( i ) FOREACH_ENUM( KeyboardRow, i ) const int KEYS_PER_ROW = 13; enum KeyboardRowSpecialKey { diff --git a/stepmania/src/ThemeManager.h b/stepmania/src/ThemeManager.h index b6e6150b04..668a7113e4 100644 --- a/stepmania/src/ThemeManager.h +++ b/stepmania/src/ThemeManager.h @@ -22,7 +22,7 @@ enum ElementCategory NUM_ElementCategory, ElementCategory_Invalid }; -#define FOREACH_ElementCategory( ec ) FOREACH_ENUM2( ElementCategory, ec ) +#define FOREACH_ElementCategory( ec ) FOREACH_ENUM( ElementCategory, ec ) const RString& ElementCategoryToString( ElementCategory ec ); ElementCategory StringToElementCategory( const RString& s ); diff --git a/stepmania/src/Tween.h b/stepmania/src/Tween.h index ee08643471..1a1a3e3eb5 100644 --- a/stepmania/src/Tween.h +++ b/stepmania/src/Tween.h @@ -18,7 +18,7 @@ enum TweenType NUM_TweenType, TweenType_Invalid }; -#define FOREACH_TweenType( tt ) FOREACH_ENUM2( TweenType, tt ) +#define FOREACH_TweenType( tt ) FOREACH_ENUM( TweenType, tt ) LuaDeclareType( TweenType ); class ITween diff --git a/stepmania/src/UnlockManager.cpp b/stepmania/src/UnlockManager.cpp index 449ac52c49..c768df5772 100644 --- a/stepmania/src/UnlockManager.cpp +++ b/stepmania/src/UnlockManager.cpp @@ -512,7 +512,7 @@ void UnlockManager::Load() FOREACH_CONST( UnlockEntry, m_UnlockEntries, e ) { RString str = ssprintf( "Unlock: %s; ", join("\n",e->m_cmd.m_vsArgs).c_str() ); - FOREACH_ENUM2( UnlockRequirement, j ) + FOREACH_ENUM( UnlockRequirement, j ) if( e->m_fRequirement[j] ) str += ssprintf( "%s = %f; ", UnlockRequirementToString(j).c_str(), e->m_fRequirement[j] ); if( e->m_bRequirePassHardSteps ) diff --git a/stepmania/src/song.h b/stepmania/src/song.h index 8c2dcfeafb..09618fa07d 100644 --- a/stepmania/src/song.h +++ b/stepmania/src/song.h @@ -30,7 +30,7 @@ enum BackgroundLayer NUM_BackgroundLayer, BACKGROUND_LAYER_Invalid }; -#define FOREACH_BackgroundLayer( bl ) FOREACH_ENUM2( BackgroundLayer, bl ) +#define FOREACH_BackgroundLayer( bl ) FOREACH_ENUM( BackgroundLayer, bl ) struct LyricSegment {