fix Various showed as BPM for some courses with <= MAX_COURSE_ENTRIES_BEFORE_VARIOUS

This commit is contained in:
Chris Danford
2005-03-17 17:53:10 +00:00
parent 0eb271a1b1
commit 1f112ae2ca
6 changed files with 33 additions and 21 deletions
+12 -4
View File
@@ -324,7 +324,17 @@ CString ScreenOptions::GetExplanationTitle( int iRow ) const
// HACK: tack the BPM onto the name of the speed line
if( sLineName.CompareNoCase("speed")==0 )
{
if( SHOW_BPM_IN_SPEED_TITLE )
bool bShowBpmInSpeedTitle = SHOW_BPM_IN_SPEED_TITLE;
if( GAMESTATE->m_pCurCourse )
{
Trail* pTrail = GAMESTATE->m_pCurTrail[GAMESTATE->m_MasterPlayerNumber];
const int iNumCourseEntries = pTrail->m_vEntries.size();
if( iNumCourseEntries > MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
bShowBpmInSpeedTitle = false;
}
if( bShowBpmInSpeedTitle )
{
DisplayBpms bpms;
if( GAMESTATE->m_pCurSong )
@@ -341,9 +351,7 @@ CString ScreenOptions::GetExplanationTitle( int iRow ) const
pTrail->GetDisplayBpms( bpms );
}
if( (int) bpms.vfBpms.size() > MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
{} // add nothing
else if( bpms.IsSecret() )
if( bpms.IsSecret() )
sTitle += ssprintf( " (??" "?)" ); /* split so gcc doesn't think this is a trigraph */
else if( bpms.BpmIsConstant() )
sTitle += ssprintf( " (%.0f)", bpms.GetMin() );