NUM_STEPS_TYPES -> NUM_StepsType
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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; i<NUM_STEPS_TYPES; i++ )
|
||||
for( int i=0; i<NUM_StepsType; i++ )
|
||||
if( StepsTypes[i].name == sStepsType )
|
||||
return StepsType(i);
|
||||
|
||||
@@ -2812,7 +2812,7 @@ StepsType GameManager::StringToStepsType( RString sStepsType )
|
||||
|
||||
RString GameManager::StepsTypeToString( StepsType st )
|
||||
{
|
||||
ASSERT_M( st < NUM_STEPS_TYPES, ssprintf("%i", st) );
|
||||
ASSERT_M( st < NUM_StepsType, ssprintf("%i", st) );
|
||||
return StepsTypes[st].name;
|
||||
}
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
//
|
||||
// Category high scores
|
||||
//
|
||||
HighScoreList m_CategoryHighScores[NUM_STEPS_TYPES][NUM_RANKING_CATEGORIES];
|
||||
HighScoreList m_CategoryHighScores[NUM_StepsType][NUM_RANKING_CATEGORIES];
|
||||
|
||||
void AddCategoryHighScore( StepsType st, RankingCategory rc, HighScore hs, int &iIndexOut );
|
||||
HighScoreList& GetCategoryHighScoreList( StepsType st, RankingCategory rc );
|
||||
|
||||
@@ -784,7 +784,7 @@ void Song::SaveToDWIFile()
|
||||
|
||||
void Song::AddAutoGenNotes()
|
||||
{
|
||||
bool HasNotes[NUM_STEPS_TYPES];
|
||||
bool HasNotes[NUM_StepsType];
|
||||
memset( HasNotes, 0, sizeof(HasNotes) );
|
||||
for( unsigned i=0; i < m_vpSteps.size(); i++ ) // foreach Steps
|
||||
{
|
||||
@@ -1074,7 +1074,7 @@ RString Song::GetTranslitFullTitle() const
|
||||
void Song::AddSteps( Steps* pSteps )
|
||||
{
|
||||
m_vpSteps.push_back( pSteps );
|
||||
ASSERT_M( pSteps->m_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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
private:
|
||||
|
||||
vector<Steps*> m_vpSteps;
|
||||
vector<Steps*> m_vpStepsByType[NUM_STEPS_TYPES];
|
||||
vector<Steps*> m_vpStepsByType[NUM_StepsType];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user