NUM_NOTES_TYPES => NUM_STEPS_TYPES

This commit is contained in:
Chris Danford
2003-08-07 06:38:18 +00:00
parent 1a0d83cbc0
commit 879fa6c37c
8 changed files with 21 additions and 21 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ void Course::SetDefaultScore()
//
// Init high scores
//
for( unsigned i=0; i<NUM_NOTES_TYPES; i++ )
for( unsigned i=0; i<NUM_STEPS_TYPES; i++ )
for( int j=0; j<NUM_RANKING_LINES; j++ )
{
m_RankingScores[i][j].iScore = IsOni()? 573:573000;
@@ -71,7 +71,7 @@ void Course::SetDefaultScore()
}
for( unsigned m=0; m<NUM_MEMORY_CARDS; m++ )
for( unsigned i=0; i<NUM_NOTES_TYPES; i++ )
for( unsigned i=0; i<NUM_STEPS_TYPES; i++ )
{
m_MemCardScores[m][i].iNumTimesPlayed = 0;
m_MemCardScores[m][i].iScore = 0;
+2 -2
View File
@@ -105,13 +105,13 @@ public:
int iScore;
float fSurviveTime;
CString sName;
} m_RankingScores[NUM_NOTES_TYPES][NUM_RANKING_LINES]; // sorted highest to lowest by iDancePoints
} m_RankingScores[NUM_STEPS_TYPES][NUM_RANKING_LINES]; // sorted highest to lowest by iDancePoints
struct MemCardScore
{
int iNumTimesPlayed;
int iScore;
float fSurviveTime;
} m_MemCardScores[NUM_MEMORY_CARDS][NUM_NOTES_TYPES];
} m_MemCardScores[NUM_MEMORY_CARDS][NUM_STEPS_TYPES];
void AddScores( StepsType nt, bool bPlayerEnabled[NUM_PLAYERS], int iDancePoints[NUM_PLAYERS], float fSurviveTime[NUM_PLAYERS], int iRankingIndexOut[NUM_PLAYERS], bool bNewRecordOut[NUM_PLAYERS] ); // iNewRecordIndexOut[p] = -1 if not a new record
+1 -1
View File
@@ -77,7 +77,7 @@ enum StepsType
STEPS_TYPE_PARA_SINGLE,
STEPS_TYPE_DS3DDX_SINGLE,
STEPS_TYPE_BM_SINGLE,
NUM_NOTES_TYPES, // leave this at the end
NUM_STEPS_TYPES, // leave this at the end
STEPS_TYPE_INVALID,
};
+5 -5
View File
@@ -37,7 +37,7 @@ const int BM_COL_SPACING=34;
struct {
char *name;
int NumTracks;
} const NotesTypes[NUM_NOTES_TYPES] = {
} const NotesTypes[NUM_STEPS_TYPES] = {
{ "dance-single", 4 },
{ "dance-double", 8 },
{ "dance-couple", 8 },
@@ -1612,7 +1612,7 @@ void GameManager::GetModesChoicesForGame( Game game, vector<ModeChoice*>& apChoi
void GameManager::GetNotesTypesForGame( Game game, vector<StepsType>& aNotesTypeAddTo )
{
for( int nt=0; nt<NUM_NOTES_TYPES; nt++ )
for( int nt=0; nt<NUM_STEPS_TYPES; nt++ )
{
bool found = false;
for( int s=0; !found && s<NUM_STYLES; s++ )
@@ -1646,7 +1646,7 @@ void GameManager::GetEnabledGames( vector<Game>& aGamesOut )
int GameManager::NotesTypeToNumTracks( StepsType nt )
{
if(nt >= NUM_NOTES_TYPES)
if(nt >= NUM_STEPS_TYPES)
{
// invalid StepsType
ASSERT(0);
@@ -1668,7 +1668,7 @@ StepsType GameManager::StringToNotesType( CString sNotesType )
if( sNotesType == "para" )
sNotesType = "para-single";
for( int i=0; i<NUM_NOTES_TYPES; i++ )
for( int i=0; i<NUM_STEPS_TYPES; i++ )
if( NotesTypes[i].name == sNotesType )
return StepsType(i);
@@ -1679,7 +1679,7 @@ StepsType GameManager::StringToNotesType( CString sNotesType )
CString GameManager::NotesTypeToString( StepsType nt )
{
if(nt >= NUM_NOTES_TYPES)
if(nt >= NUM_STEPS_TYPES)
{
// invalid StepsType
ASSERT(0);
+1 -1
View File
@@ -823,7 +823,7 @@ void NoteDataUtil::ShiftRight( NoteData &in )
}
NUM_STEPS_TYPES
void NoteDataUtil::FixImpossibleRows( NoteData &in, StepsType st )
{
+2 -2
View File
@@ -1001,7 +1001,7 @@ void Song::SaveToDWIFile()
void Song::AddAutoGenNotes()
{
for( StepsType ntMissing=(StepsType)0; ntMissing<NUM_NOTES_TYPES; ntMissing=(StepsType)(ntMissing+1) )
for( StepsType ntMissing=(StepsType)0; ntMissing<NUM_STEPS_TYPES; ntMissing=(StepsType)(ntMissing+1) )
{
if( SongHasNotesType(ntMissing) )
continue;
@@ -1014,7 +1014,7 @@ void Song::AddAutoGenNotes()
StepsType ntBestMatch = (StepsType)-1;
int iBestTrackDifference = 10000; // inf
for( StepsType nt=(StepsType)0; nt<NUM_NOTES_TYPES; nt=(StepsType)(nt+1) )
for( StepsType nt=(StepsType)0; nt<NUM_STEPS_TYPES; nt=(StepsType)(nt+1) )
{
vector<Steps*> apNotes;
this->GetNotes( apNotes, nt );
+7 -7
View File
@@ -352,7 +352,7 @@ void SongManager::ReadCourseScoresFromFile( CString fn, int c )
if( pCourse == NULL )
pCourse = GetCourseFromName( szPath );
for( int i=0; i<NUM_NOTES_TYPES; i++ )
for( int i=0; i<NUM_STEPS_TYPES; i++ )
if( !feof(fp) )
{
int iNumTimesPlayed;
@@ -382,7 +382,7 @@ void SongManager::ReadCategoryRankingsFromFile( CString fn )
fscanf(fp, "%d\n", &version );
if( version == CATEGORY_RANKING_VERSION )
{
for( int i=0; i<NUM_NOTES_TYPES; i++ )
for( int i=0; i<NUM_STEPS_TYPES; i++ )
for( int j=0; j<NUM_RANKING_CATEGORIES; j++ )
for( int k=0; k<NUM_RANKING_LINES; k++ )
if( !feof(fp) )
@@ -413,7 +413,7 @@ void SongManager::ReadCourseRankingsFromFile( CString fn )
if( pCourse == NULL )
pCourse = GetCourseFromName( szPath );
for( int i=0; i<NUM_NOTES_TYPES; i++ )
for( int i=0; i<NUM_STEPS_TYPES; i++ )
for( int j=0; j<NUM_RANKING_LINES; j++ )
if( !feof(fp) )
{
@@ -439,7 +439,7 @@ void SongManager::InitMachineScoresFromDisk()
// Init category ranking
{
for( int i=0; i<NUM_NOTES_TYPES; i++ )
for( int i=0; i<NUM_STEPS_TYPES; i++ )
for( int j=0; j<NUM_RANKING_CATEGORIES; j++ )
for( int k=0; k<NUM_RANKING_LINES; k++ )
{
@@ -474,7 +474,7 @@ void SongManager::SaveCategoryRankingsToFile( CString fn )
if( fp )
{
fprintf(fp,"%d\n",CATEGORY_RANKING_VERSION);
for( int i=0; i<NUM_NOTES_TYPES; i++ )
for( int i=0; i<NUM_STEPS_TYPES; i++ )
for( int j=0; j<NUM_RANKING_CATEGORIES; j++ )
for( int k=0; k<NUM_RANKING_LINES; k++ )
if( fp )
@@ -503,7 +503,7 @@ void SongManager::SaveCourseRankingsToFile( CString fn )
else
fprintf(fp, "%s\n", pCourse->m_sPath.c_str());
for( int i=0; i<NUM_NOTES_TYPES; i++ )
for( int i=0; i<NUM_STEPS_TYPES; i++ )
for( int j=0; j<NUM_RANKING_LINES; j++ )
{
fprintf(fp, "%d %f %s\n",
@@ -593,7 +593,7 @@ void SongManager::SaveCourseScoresToFile( CString fn, int c )
else
fprintf(fp, "%s\n", pCourse->m_sPath.c_str());
for( int nt=0; nt<NUM_NOTES_TYPES; nt++ )
for( int nt=0; nt<NUM_STEPS_TYPES; nt++ )
fprintf(fp, "%d %d %f\n",
pCourse->m_MemCardScores[c][nt].iNumTimesPlayed,
pCourse->m_MemCardScores[c][nt].iScore,
+1 -1
View File
@@ -98,7 +98,7 @@ public:
{
int iScore;
CString sName;
} m_MachineScores[NUM_NOTES_TYPES][NUM_RANKING_CATEGORIES][NUM_RANKING_LINES];
} m_MachineScores[NUM_STEPS_TYPES][NUM_RANKING_CATEGORIES][NUM_RANKING_LINES];
void AddScores( StepsType nt, bool bPlayerEnabled[NUM_PLAYERS], RankingCategory hsc[NUM_PLAYERS], int iScore[NUM_PLAYERS], int iNewRecordIndexOut[NUM_PLAYERS] ); // set iNewRecordIndex = -1 if not a new record
void UpdateBest();