IsFixed and AllSongsAreFixed were identical. IsFixed -> AllSongsAreFixed.

This commit is contained in:
Steve Checkoway
2006-02-21 01:48:01 +00:00
parent e6a456e1c3
commit 439c0f2011
5 changed files with 11 additions and 37 deletions
+2 -2
View File
@@ -115,7 +115,7 @@ void SaveCatalogXml( LoadingWindow *loading_window )
Course* pCourse = vpCourses[i];
// skip non-fixed courses. We don't have any stable data for them other than
// the title.
if( !pCourse->IsFixed() )
if( !pCourse->AllSongsAreFixed() )
continue;
if( UNLOCKMAN->CourseIsLocked(pCourse) )
continue;
@@ -203,7 +203,7 @@ void SaveCatalogXml( LoadingWindow *loading_window )
// skip non-fixed courses. We don't have any stable data for them other than
// the title.
if( !pCourse->IsFixed() )
if( !pCourse->AllSongsAreFixed() )
continue;
if( UNLOCKMAN->CourseIsLocked(pCourse) )
continue;
+6 -31
View File
@@ -277,20 +277,7 @@ Trail* Course::GetTrail( StepsType st, CourseDifficulty cd ) const
//
if( m_iTrailCacheSeed != GAMESTATE->m_iStageSeed )
{
/* If we have any random entries (so that the seed matters), invalidate the cache. */
bool bHaveRandom = false;
FOREACH_CONST( CourseEntry, m_vEntries, e )
{
if( e->IsRandomSong() )
{
bHaveRandom = true;
break;
}
}
if( bHaveRandom )
m_TrailCache.clear();
RegenerateNonFixedTrails();
m_iTrailCacheSeed = GAMESTATE->m_iStageSeed;
}
@@ -729,7 +716,7 @@ void Course::RegenerateNonFixedTrails()
// We can create these Trails on demand because we don't
// calculate RadarValues for Trails with one or more non-fixed
// entry.
if( !IsFixed() )
if( !AllSongsAreFixed() )
m_TrailCache.clear();
}
@@ -746,14 +733,14 @@ RageColor Course::GetColor() const
else return SORT_LEVEL5_COLOR;
case PrefsManager::COURSE_SORT_METER:
if( !IsFixed() ) return SORT_LEVEL1_COLOR;
if( !AllSongsAreFixed() ) return SORT_LEVEL1_COLOR;
else if( iMeter > 9 ) return SORT_LEVEL2_COLOR;
else if( iMeter >= 7 ) return SORT_LEVEL3_COLOR;
else if( iMeter >= 5 ) return SORT_LEVEL4_COLOR;
else return SORT_LEVEL5_COLOR;
case PrefsManager::COURSE_SORT_METER_SUM:
if( !IsFixed() ) return SORT_LEVEL1_COLOR;
if( !AllSongsAreFixed() ) return SORT_LEVEL1_COLOR;
if( m_SortOrder_TotalDifficulty >= 40 ) return SORT_LEVEL2_COLOR;
if( m_SortOrder_TotalDifficulty >= 30 ) return SORT_LEVEL3_COLOR;
if( m_SortOrder_TotalDifficulty >= 20 ) return SORT_LEVEL4_COLOR;
@@ -770,21 +757,9 @@ RageColor Course::GetColor() const
}
}
bool Course::IsFixed() const
{
for(unsigned i = 0; i < m_vEntries.size(); i++)
{
if( m_vEntries[i].pSong == NULL )
return false;
}
return true;
}
bool Course::GetTotalSeconds( StepsType st, float& fSecondsOut ) const
{
if( !IsFixed() )
if( !AllSongsAreFixed() )
return false;
Trail* pTrail = GetTrail( st, DIFFICULTY_MEDIUM );
@@ -892,7 +867,7 @@ void Course::CalculateRadarValues()
{
// For courses that aren't fixed, the radar values are meaningless.
// Makes non-fixed courses have unknown radar values.
if( IsFixed() )
if( AllSongsAreFixed() )
{
Trail *pTrail = GetTrail( st, cd );
if( pTrail == NULL )
-2
View File
@@ -165,8 +165,6 @@ public:
void SetCourseType( CourseType ct );
PlayMode GetPlayMode() const;
bool IsFixed() const;
bool ShowInDemonstrationAndRanking() const;
void RevertFromDisk();
+2 -1
View File
@@ -142,6 +142,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
else if( sParams[1] == "*" )
{
//new_entry.bSecret = true;
new_entry.iChooseIndex = -1;
}
else if( sParams[1].Right(1) == "*" )
{
@@ -164,7 +165,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
if( !SONGMAN->DoesSongGroupExist(new_entry.sSongGroup) )
{
/* XXX: We need a place to put "user warnings". This is too loud for info.txt--
* it obscures important warnings--and regular users never look there, anyway. */
* it obscures important warnings--and regular users never look there, anyway. */
LOG->Trace( "Course file '%s' random_within_group entry '%s' specifies a group that doesn't exist. "
"This entry will be ignored.",
sPath.c_str(), sSong.c_str());
+1 -1
View File
@@ -72,7 +72,7 @@ static bool MovePlayersBestToEnd( const Course* pCourse1, const Course* pCourse2
static bool CompareRandom( const Course* pCourse1, const Course* pCourse2 )
{
return ( pCourse1->IsFixed() && !pCourse2->IsFixed() );
return ( pCourse1->AllSongsAreFixed() && !pCourse2->AllSongsAreFixed() );
}
static bool CompareCoursePointersByRanking( const Course* pCourse1, const Course* pCourse2 )