From a7b53444f83261ef089a2d9272da57d2bb85fa88 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 26 Sep 2006 20:22:28 +0000 Subject: [PATCH] NUM_STEPS_TYPES -> NUM_StepsType --- stepmania/src/GameConstantsAndTypes.h | 4 ++-- stepmania/src/GameManager.cpp | 10 +++++----- stepmania/src/Profile.h | 2 +- stepmania/src/Song.cpp | 4 ++-- stepmania/src/song.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/stepmania/src/GameConstantsAndTypes.h b/stepmania/src/GameConstantsAndTypes.h index 034b73c86f..826680b362 100644 --- a/stepmania/src/GameConstantsAndTypes.h +++ b/stepmania/src/GameConstantsAndTypes.h @@ -69,10 +69,10 @@ enum StepsType STEPS_TYPE_POPN_FIVE, STEPS_TYPE_POPN_NINE, STEPS_TYPE_LIGHTS_CABINET, - NUM_STEPS_TYPES, // leave this at the end + NUM_StepsType, // leave this at the end STEPS_TYPE_INVALID, }; -#define FOREACH_StepsType( st ) FOREACH_ENUM( StepsType, NUM_STEPS_TYPES, st ) +#define FOREACH_StepsType( st ) FOREACH_ENUM( StepsType, NUM_StepsType, st ) // // Play mode stuff diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index 9670811f56..b6aae9b952 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -75,7 +75,7 @@ static struct char *name; int NumTracks; uint32_t flags; -} const StepsTypes[NUM_STEPS_TYPES] = { +} const StepsTypes[NUM_StepsType] = { { "dance-single", 4, ST_FLAGS_NONE }, { "dance-double", 8, ST_FLAGS_NONE }, { "dance-couple", 8, ST_FLAGS_NONE }, @@ -2779,13 +2779,13 @@ bool GameManager::IsGameEnabled( const Game *pGame ) const int GameManager::StepsTypeToNumTracks( StepsType st ) { - ASSERT_M( st < NUM_STEPS_TYPES, ssprintf("%i", st) ); + ASSERT_M( st < NUM_StepsType, ssprintf("%i", st) ); return StepsTypes[st].NumTracks; } bool GameManager::CanAutoGenStepsType( StepsType st ) { - ASSERT_M( st < NUM_STEPS_TYPES, ssprintf("%d", st) ); + ASSERT_M( st < NUM_StepsType, ssprintf("%d", st) ); return !(StepsTypes[st].flags & ST_FLAGS_DONT_AUTOGEN); } @@ -2801,7 +2801,7 @@ StepsType GameManager::StringToStepsType( RString sStepsType ) if( sStepsType == "para" ) sStepsType = "para-single"; - for( int i=0; im_StepsType < NUM_STEPS_TYPES, ssprintf("%i", pSteps->m_StepsType) ); + ASSERT_M( pSteps->m_StepsType < NUM_StepsType, ssprintf("%i", pSteps->m_StepsType) ); m_vpStepsByType[pSteps->m_StepsType].push_back( pSteps ); } diff --git a/stepmania/src/song.h b/stepmania/src/song.h index 921f236121..98be7766bf 100644 --- a/stepmania/src/song.h +++ b/stepmania/src/song.h @@ -218,7 +218,7 @@ public: private: vector m_vpSteps; - vector m_vpStepsByType[NUM_STEPS_TYPES]; + vector m_vpStepsByType[NUM_StepsType]; }; #endif