diff --git a/stepmania/src/BPMDisplay.cpp b/stepmania/src/BPMDisplay.cpp index eb866960f3..5c10fe30fd 100644 --- a/stepmania/src/BPMDisplay.cpp +++ b/stepmania/src/BPMDisplay.cpp @@ -204,7 +204,7 @@ void BPMDisplay::SetBPM( const Course* pCourse ) ASSERT( pCourse ); StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; - Trail *pTrail = pCourse->GetTrail( st, COURSE_DIFFICULTY_REGULAR ); + Trail *pTrail = pCourse->GetTrail( st ); ASSERT( pTrail ); DisplayBpms bpms; diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index b1da516a68..81f56580f1 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -21,7 +21,7 @@ #include "Foreach.h" /* Amount to increase meter ranges to make them difficult: */ -const int COURSE_DIFFICULTY_CLASS_CHANGE[NUM_COURSE_DIFFICULTIES] = { -1, 0, 1 }; +const int COURSE_DIFFICULTY_CLASS_CHANGE[NUM_DIFFICULTIES] = { -1, -1, 0, 1, 1 }; /* Maximum lower value of ranges when difficult: */ const int MAX_BOTTOM_RANGE = 10; @@ -91,11 +91,11 @@ void Course::LoadFromCRSFile( CString sPath ) else if( 0 == stricmp(sValueName, "METER") ) { if( sParams.params.size() == 2 ) - m_iCustomMeter[COURSE_DIFFICULTY_REGULAR] = atoi( sParams[1] ); /* compat */ + m_iCustomMeter[DIFFICULTY_MEDIUM] = atoi( sParams[1] ); /* compat */ else if( sParams.params.size() == 3 ) { const CourseDifficulty cd = StringToCourseDifficulty( sParams[1] ); - if( cd == COURSE_DIFFICULTY_INVALID ) + if( cd == DIFFICULTY_INVALID ) { LOG->Warn( "Course file '%s' contains an invalid #METER string: \"%s\"", m_sPath.c_str(), sParams[1].c_str() ); @@ -472,7 +472,7 @@ void Course::AutogenOniFromArtist( CString sArtistName, CString sArtistNameTrans bool Course::IsPlayableIn( StepsType st ) const { - return GetTrail( st, COURSE_DIFFICULTY_REGULAR ) != NULL; + return GetTrail( st ) != NULL; } static vector GetFilteredBestSongs( StepsType st ) @@ -533,7 +533,7 @@ CString Course::GetDisplayName() const * course difficulty doesn't exist, NULL is returned. */ Trail* Course::GetTrail( StepsType st, CourseDifficulty cd ) const { - ASSERT( cd != COURSE_DIFFICULTY_INVALID ); + ASSERT( cd != DIFFICULTY_INVALID ); // // Look in the Trail cache @@ -570,16 +570,16 @@ bool Course::GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) c if( this->m_bSortByMeter ) { - /* Sort according to COURSE_DIFFICULTY_REGULAR, since the order of songs + /* Sort according to DIFFICULTY_MEDIUM, since the order of songs * must not change across difficulties. */ Trail SortTrail; - if( cd == COURSE_DIFFICULTY_REGULAR ) + if( cd == DIFFICULTY_MEDIUM ) SortTrail = trail; else { - bool bOK = GetTrailUnsorted( st, COURSE_DIFFICULTY_REGULAR, SortTrail ); + bool bOK = GetTrailUnsorted( st, DIFFICULTY_MEDIUM, SortTrail ); - /* If we have any other difficulty, we must have COURSE_DIFFICULTY_REGULAR. */ + /* If we have any other difficulty, we must have DIFFICULTY_MEDIUM. */ ASSERT( bOK ); } ASSERT_M( trail.m_vEntries.size() == SortTrail.m_vEntries.size(), @@ -606,6 +606,13 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) { trail.Init(); + switch( cd ) + { + case DIFFICULTY_BEGINNER: + case DIFFICULTY_CHALLENGE: + return false; + } + // // Construct a new Trail, add it to the cache, then return it. // @@ -637,13 +644,13 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) trail.m_CourseDifficulty = cd; /* Set to true if CourseDifficulty is able to change something. */ - bool bCourseDifficultyIsSignificant = (cd == COURSE_DIFFICULTY_REGULAR); + bool bCourseDifficultyIsSignificant = (cd == DIFFICULTY_MEDIUM); for( unsigned i=0; iGetDifficulty(); - if( entry_difficulty != COURSE_DIFFICULTY_REGULAR ) + if( entry_difficulty != DIFFICULTY_MEDIUM ) { /* See if we can find a NoteData after adjusting the difficulty by COURSE_DIFFICULTY_CLASS_CHANGE. * If we can't, just use the one we already have. */ @@ -810,7 +817,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) trail.m_iSpecifiedMeter = m_iCustomMeter[cd]; /* If the course difficulty never actually changed anything, then this difficulty - * is equivalent to COURSE_DIFFICULTY_REGULAR; it doesn't exist. */ + * is equivalent to DIFFICULTY_MEDIUM; it doesn't exist. */ return bCourseDifficultyIsSignificant; } @@ -923,7 +930,7 @@ bool Course::GetTotalSeconds( StepsType st, float& fSecondsOut ) const if( !IsFixed() ) return false; - Trail* pTrail = GetTrail( st, COURSE_DIFFICULTY_REGULAR ); + Trail* pTrail = GetTrail( st, DIFFICULTY_MEDIUM ); fSecondsOut = pTrail->GetLengthSeconds(); return true; @@ -967,7 +974,7 @@ void Course::UpdateCourseStats( StepsType st ) return; } - Trail* pTrail = GetTrail( st, COURSE_DIFFICULTY_REGULAR ); + Trail* pTrail = GetTrail( st, DIFFICULTY_MEDIUM ); m_SortOrder_TotalDifficulty += pTrail->GetTotalMeter(); diff --git a/stepmania/src/Course.h b/stepmania/src/Course.h index 31a991d704..c0efc829e6 100644 --- a/stepmania/src/Course.h +++ b/stepmania/src/Course.h @@ -85,7 +85,7 @@ public: bool m_bRepeat; // repeat after last song? "Endless" bool m_bRandomize; // play the songs in a random order int m_iLives; // -1 means use bar life meter - int m_iCustomMeter[NUM_COURSE_DIFFICULTIES]; // -1 = no meter specified + int m_iCustomMeter[NUM_DIFFICULTIES]; // -1 = no meter specified bool m_bSortByMeter; vector m_entries; @@ -95,9 +95,9 @@ public: CString GetTranslitName() const { return m_sNameTranslit.size()? m_sNameTranslit: m_sName; } // Dereferences course_entries and returns only the playable Songs and Steps - Trail* GetTrail( StepsType st, CourseDifficulty cd ) const; + Trail* GetTrail( StepsType st, CourseDifficulty cd=DIFFICULTY_MEDIUM ) const; void GetTrails( vector &AddTo, StepsType st ) const; - float GetMeter( StepsType st, CourseDifficulty cd ) const; + float GetMeter( StepsType st, CourseDifficulty cd=DIFFICULTY_MEDIUM ) const; bool HasMods() const; bool AllSongsAreFixed() const; @@ -135,9 +135,9 @@ private: bool GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) const; bool GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) const; - mutable Trail m_TrailCache[NUM_STEPS_TYPES][NUM_COURSE_DIFFICULTIES]; - mutable bool m_TrailCacheValid[NUM_STEPS_TYPES][NUM_COURSE_DIFFICULTIES]; - mutable bool m_TrailCacheNull[NUM_STEPS_TYPES][NUM_COURSE_DIFFICULTIES]; + mutable Trail m_TrailCache[NUM_STEPS_TYPES][NUM_DIFFICULTIES]; + mutable bool m_TrailCacheValid[NUM_STEPS_TYPES][NUM_DIFFICULTIES]; + mutable bool m_TrailCacheNull[NUM_STEPS_TYPES][NUM_DIFFICULTIES]; }; #endif diff --git a/stepmania/src/CourseUtil.cpp b/stepmania/src/CourseUtil.cpp index e441dae556..c065adb93b 100644 --- a/stepmania/src/CourseUtil.cpp +++ b/stepmania/src/CourseUtil.cpp @@ -149,7 +149,7 @@ void CourseUtil::SortCoursePointerArrayByAvgDifficulty( vector &apCours course_sort_val.clear(); for(unsigned i = 0; i < apCourses.size(); ++i) { - Trail* pTrail = apCourses[i]->GetTrail( GAMESTATE->GetCurrentStyleDef()->m_StepsType, COURSE_DIFFICULTY_REGULAR ); + Trail* pTrail = apCourses[i]->GetTrail( GAMESTATE->GetCurrentStyleDef()->m_StepsType ); ASSERT( pTrail ); /* don't give unplayable courses! */ course_sort_val[apCourses[i]] = (float) pTrail->GetMeter(); } diff --git a/stepmania/src/Difficulty.cpp b/stepmania/src/Difficulty.cpp index 59a9870b91..98f49f8dc2 100644 --- a/stepmania/src/Difficulty.cpp +++ b/stepmania/src/Difficulty.cpp @@ -43,11 +43,13 @@ Difficulty StringToDifficulty( const CString& sDC ) } -static const CString CourseDifficultyNames[NUM_COURSE_DIFFICULTIES] = +static const CString CourseDifficultyNames[NUM_DIFFICULTIES] = { + "(not used)", "Easy", "Regular", "Difficult", + "(not used)", }; XToString( CourseDifficulty ); XToThemedString( CourseDifficulty ); @@ -55,12 +57,12 @@ StringToX( CourseDifficulty ); CourseDifficulty GetNextShownCourseDifficulty( CourseDifficulty cd ) { - for( CourseDifficulty d=(CourseDifficulty)(cd+1); dIsCourseDifficultyShown(d) ) return d; } - return COURSE_DIFFICULTY_INVALID; + return DIFFICULTY_INVALID; } /* diff --git a/stepmania/src/Difficulty.h b/stepmania/src/Difficulty.h index 0e8500bb81..aaf5906009 100644 --- a/stepmania/src/Difficulty.h +++ b/stepmania/src/Difficulty.h @@ -23,22 +23,15 @@ CString DifficultyToThemedString( Difficulty dc ); Difficulty StringToDifficulty( const CString& sDC ); -enum CourseDifficulty -{ - COURSE_DIFFICULTY_EASY, - COURSE_DIFFICULTY_REGULAR, - COURSE_DIFFICULTY_DIFFICULT, - NUM_COURSE_DIFFICULTIES, - COURSE_DIFFICULTY_INVALID -}; -#define FOREACH_CourseDifficulty( cd ) FOREACH_ENUM( CourseDifficulty, NUM_COURSE_DIFFICULTIES, cd ) -#define FOREACH_ShownCourseDifficulty( cd ) for( CourseDifficulty cd=GetNextShownCourseDifficulty((CourseDifficulty)-1); cd!=COURSE_DIFFICULTY_INVALID; cd=GetNextShownCourseDifficulty(cd) ) +typedef Difficulty CourseDifficulty; +#define FOREACH_CourseDifficulty FOREACH_Difficulty +#define FOREACH_ShownCourseDifficulty( cd ) for( Difficulty cd=GetNextShownCourseDifficulty((CourseDifficulty)-1); cd!=DIFFICULTY_INVALID; cd=GetNextShownCourseDifficulty(cd) ) -const CString& CourseDifficultyToString( CourseDifficulty dc ); -CString CourseDifficultyToThemedString( CourseDifficulty dc ); -CourseDifficulty StringToCourseDifficulty( const CString& sDC ); +const CString& CourseDifficultyToString( Difficulty dc ); +CString CourseDifficultyToThemedString( Difficulty dc ); +Difficulty StringToCourseDifficulty( const CString& sDC ); -CourseDifficulty GetNextShownCourseDifficulty( CourseDifficulty pn ); +Difficulty GetNextShownCourseDifficulty( Difficulty pn ); #endif diff --git a/stepmania/src/DifficultyIcon.cpp b/stepmania/src/DifficultyIcon.cpp index 1704b44ff6..aacaa4ee12 100644 --- a/stepmania/src/DifficultyIcon.cpp +++ b/stepmania/src/DifficultyIcon.cpp @@ -69,14 +69,8 @@ void DifficultyIcon::SetFromDifficulty( PlayerNumber pn, Difficulty dc ) void DifficultyIcon::SetFromCourseDifficulty( PlayerNumber pn, CourseDifficulty cd ) { - m_bBlank = false; - switch( cd ) - { - case COURSE_DIFFICULTY_EASY: SetFromDifficulty(pn,DIFFICULTY_EASY); break; - case COURSE_DIFFICULTY_REGULAR: SetFromDifficulty(pn,DIFFICULTY_MEDIUM); break; - case COURSE_DIFFICULTY_DIFFICULT: SetFromDifficulty(pn,DIFFICULTY_HARD); break; - default: ASSERT(0); - } + /* XXX remove */ + SetFromDifficulty( pn, cd ); } /* diff --git a/stepmania/src/DifficultyMeter.cpp b/stepmania/src/DifficultyMeter.cpp index 9deb8ebf99..4fb2172e9f 100644 --- a/stepmania/src/DifficultyMeter.cpp +++ b/stepmania/src/DifficultyMeter.cpp @@ -137,7 +137,7 @@ void DifficultyMeter::SetFromTrail( const Trail* pTrail ) Unset(); return; } - +/* Difficulty FakeDifficulty; switch( pTrail->m_CourseDifficulty ) { @@ -146,9 +146,9 @@ void DifficultyMeter::SetFromTrail( const Trail* pTrail ) case COURSE_DIFFICULTY_DIFFICULT: FakeDifficulty = DIFFICULTY_HARD; break; default: ASSERT(0); } - - SetFromMeterAndDifficulty( pTrail->GetMeter(), FakeDifficulty ); - SetDifficulty( DifficultyToString(FakeDifficulty) + "Course" ); +*/ + SetFromMeterAndDifficulty( pTrail->GetMeter(), pTrail->m_CourseDifficulty ); + SetDifficulty( CourseDifficultyToString(pTrail->m_CourseDifficulty) + "Course" ); } void DifficultyMeter::Unset() diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 08487b4d51..84517044c5 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -124,7 +124,7 @@ void GameState::Reset() FOREACH_PlayerNumber( p ) { m_PreferredDifficulty[p] = DIFFICULTY_INVALID; - m_PreferredCourseDifficulty[p] = COURSE_DIFFICULTY_REGULAR; + m_PreferredCourseDifficulty[p] = DIFFICULTY_MEDIUM; } m_SortOrder = SORT_INVALID; m_PlayMode = PLAY_MODE_INVALID; @@ -273,7 +273,7 @@ void GameState::PlayersFinalized() m_SortOrder = pProfile->m_SortOrder; if( pProfile->m_LastDifficulty != DIFFICULTY_INVALID ) m_PreferredDifficulty[pn] = pProfile->m_LastDifficulty; - if( pProfile->m_LastCourseDifficulty != COURSE_DIFFICULTY_INVALID ) + if( pProfile->m_LastCourseDifficulty != DIFFICULTY_INVALID ) m_PreferredCourseDifficulty[pn] = pProfile->m_LastCourseDifficulty; if( m_pPreferredSong == NULL && pProfile->m_pLastSong ) m_pPreferredSong = pProfile->m_pLastSong; @@ -399,7 +399,7 @@ void GameState::SaveCurrentSettingsToProfile( PlayerNumber pn ) pProfile->m_SortOrder = m_SortOrder; if( m_PreferredDifficulty[pn] != DIFFICULTY_INVALID ) pProfile->m_LastDifficulty = m_PreferredDifficulty[pn]; - if( m_PreferredCourseDifficulty[pn] != COURSE_DIFFICULTY_INVALID ) + if( m_PreferredCourseDifficulty[pn] != DIFFICULTY_INVALID ) pProfile->m_LastCourseDifficulty = m_PreferredCourseDifficulty[pn]; if( m_pPreferredSong ) pProfile->m_pLastSong = m_pPreferredSong; @@ -1511,7 +1511,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector &asFeatsOu feat.Type = RankingFeat::COURSE; feat.pCourse = pCourse; feat.Feat = ssprintf("MR #%d in %s", i+1, pCourse->m_sName.c_str() ); - if( cd != COURSE_DIFFICULTY_REGULAR ) + if( cd != DIFFICULTY_MEDIUM ) feat.Feat += " " + CourseDifficultyToThemedString(cd); feat.pStringToFill = &hs.sName; feat.grade = GRADE_NO_DATA; @@ -1704,7 +1704,7 @@ static void GetCourseDifficultiesToShow( set &ret ) for( unsigned i = 0; i < asDiff.size(); ++i ) { CourseDifficulty cd = StringToCourseDifficulty(asDiff[i]); - if( cd == NUM_COURSE_DIFFICULTIES ) + if( cd == NUM_DIFFICULTIES ) RageException::Throw( "Unknown difficulty \"%s\" in CourseDifficultiesToShow", asDiff[i].c_str() ); cache.insert( cd ); } @@ -1736,7 +1736,7 @@ bool GameState::ChangePreferredCourseDifficulty( PlayerNumber pn, int dir ) while( 1 ) { cd = (CourseDifficulty)(cd+dir); - if( cd < 0 || cd >= NUM_COURSE_DIFFICULTIES ) + if( cd < 0 || cd >= NUM_DIFFICULTIES ) return false; if( asDiff.find(cd) == asDiff.end() ) continue; /* not available */ diff --git a/stepmania/src/ModeChoice.cpp b/stepmania/src/ModeChoice.cpp index 3818ccafee..2d5f6598d5 100644 --- a/stepmania/src/ModeChoice.cpp +++ b/stepmania/src/ModeChoice.cpp @@ -24,7 +24,7 @@ void ModeChoice::Init() m_style = STYLE_INVALID; m_pm = PLAY_MODE_INVALID; m_dc = DIFFICULTY_INVALID; - m_CourseDifficulty = COURSE_DIFFICULTY_INVALID; + m_CourseDifficulty = DIFFICULTY_INVALID; m_sModifiers = ""; m_sAnnouncer = ""; m_sScreen = ""; @@ -436,7 +436,7 @@ void ModeChoice::Apply( PlayerNumber pn ) const } if( m_pTrail ) GAMESTATE->m_pCurTrail[pn] = m_pTrail; - if( m_CourseDifficulty != COURSE_DIFFICULTY_INVALID ) + if( m_CourseDifficulty != DIFFICULTY_INVALID ) GAMESTATE->ChangePreferredCourseDifficulty( pn, m_CourseDifficulty ); if( m_pCharacter ) GAMESTATE->m_pCurCharacters[pn] = m_pCharacter; @@ -470,7 +470,7 @@ bool ModeChoice::IsZero() const m_pCourse != NULL || m_pTrail != NULL || m_pCharacter != NULL || - m_CourseDifficulty != COURSE_DIFFICULTY_INVALID ) + m_CourseDifficulty != DIFFICULTY_INVALID ) return false; return true; diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 37f22eaff3..60972de193 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -83,7 +83,7 @@ void Profile::InitGeneralData() m_sDefaultModifiers = ""; m_SortOrder = SORT_INVALID; m_LastDifficulty = DIFFICULTY_INVALID; - m_LastCourseDifficulty = COURSE_DIFFICULTY_INVALID; + m_LastCourseDifficulty = DIFFICULTY_INVALID; m_pLastSong = NULL; m_pLastCourse = NULL; m_iTotalPlays = 0; diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 7e3098da86..1dca40bcae 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -545,7 +545,7 @@ CString ScreenOptions::GetExplanationTitle( int iRow ) const { Course *pCourse = GAMESTATE->m_pCurCourse; StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; - Trail* pTrail = pCourse->GetTrail(st,COURSE_DIFFICULTY_REGULAR); + Trail* pTrail = pCourse->GetTrail( st ); ASSERT( pTrail ); pTrail->GetDisplayBpms( bpms ); } diff --git a/stepmania/src/ScreenRanking.cpp b/stepmania/src/ScreenRanking.cpp index 025b3d5f61..e7c706e47d 100644 --- a/stepmania/src/ScreenRanking.cpp +++ b/stepmania/src/ScreenRanking.cpp @@ -327,7 +327,7 @@ ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName ) if( pts.pCourse == NULL ) continue; - pts.pTrail = pts.pCourse->GetTrail( pts.nt, COURSE_DIFFICULTY_REGULAR ); + pts.pTrail = pts.pCourse->GetTrail( pts.nt ); if( pts.pTrail == NULL ) continue; diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 91c721b291..11816607b1 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -1532,7 +1532,7 @@ void ScreenSelectMusic::AfterMusicChange() { Course* pCourse = m_MusicWheel.GetSelectedCourse(); StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; - Trail *pTrail = pCourse->GetTrail( st, COURSE_DIFFICULTY_REGULAR ); + Trail *pTrail = pCourse->GetTrail( st ); ASSERT( pTrail ); pCourse->GetTrails( m_vpTrails, GAMESTATE->GetCurrentStyleDef()->m_StepsType ); diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index a50f1f8ade..27dd089b4f 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -99,6 +99,9 @@ void SongManager::InitAll( LoadingWindow *ld ) InitSongsFromDisk( ld ); InitCoursesFromDisk( ld ); InitAutogenCourses(); + + /* This shouldn't need to be here; if it's taking long enough that this is + * even visible, we should be fixing it, not showing a progress display. */ if( ld ) ld->SetText( "Saving Catalog.xml ..." ); SaveCatalogXml( DATA_DIR ); @@ -726,7 +729,7 @@ bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredG course.LoadFromCRSFile( sCoursePath ); if( course.GetEstimatedNumStages() <= 0 ) return false; - Trail *pTrail = course.GetTrail( GAMESTATE->GetCurrentStyleDef()->m_StepsType, COURSE_DIFFICULTY_REGULAR ); + Trail *pTrail = course.GetTrail( GAMESTATE->GetCurrentStyleDef()->m_StepsType ); if( pTrail->m_vEntries.empty() ) return false; diff --git a/stepmania/src/Trail.h b/stepmania/src/Trail.h index 79a21400fb..1fcdf6654e 100644 --- a/stepmania/src/Trail.h +++ b/stepmania/src/Trail.h @@ -51,7 +51,7 @@ public: void Init() { m_StepsType = STEPS_TYPE_INVALID; - m_CourseDifficulty = COURSE_DIFFICULTY_INVALID; + m_CourseDifficulty = DIFFICULTY_INVALID; m_iSpecifiedMeter = -1; m_vEntries.clear(); } diff --git a/stepmania/src/TrailUtil.cpp b/stepmania/src/TrailUtil.cpp index 5a8eb0a284..37ca85c65c 100644 --- a/stepmania/src/TrailUtil.cpp +++ b/stepmania/src/TrailUtil.cpp @@ -11,7 +11,7 @@ void TrailID::FromTrail( const Trail *p ) if( p == NULL ) { st = STEPS_TYPE_INVALID; - cd = COURSE_DIFFICULTY_INVALID; + cd = DIFFICULTY_INVALID; } else { @@ -24,7 +24,7 @@ Trail *TrailID::ToTrail( const Course *p, bool bAllowNull ) const { ASSERT( p ); - if( st == STEPS_TYPE_INVALID || cd == COURSE_DIFFICULTY_INVALID ) + if( st == STEPS_TYPE_INVALID || cd == DIFFICULTY_INVALID ) return NULL; Trail *ret = p->GetTrail( st, cd ); @@ -67,7 +67,7 @@ CString TrailID::ToString() const bool TrailID::IsValid() const { - return st != STEPS_TYPE_INVALID && cd != COURSE_DIFFICULTY_INVALID; + return st != STEPS_TYPE_INVALID && cd != DIFFICULTY_INVALID; } bool TrailID::operator<( const TrailID &rhs ) const