use course accessors
This commit is contained in:
@@ -104,7 +104,7 @@ void CourseContentsFrame::SetFromCourse( Course* pCourse )
|
||||
|
||||
for( int i=0; i<min(pCourse->m_iStages, MAX_TOTAL_CONTENTS); i++ )
|
||||
{
|
||||
Song* pSong = pCourse->m_apSongs[i];
|
||||
Song* pSong = pCourse->GetSong(i);
|
||||
Notes* pNotes = pCourse->GetNotesForStage(i);
|
||||
|
||||
if( pNotes == NULL )
|
||||
@@ -154,7 +154,6 @@ void CourseContentsFrame::DrawPrimitives()
|
||||
m_quad.SetY( ((MAX_VISIBLE_CONTENTS-1)/2 + 1) * CONTENTS_BAR_HEIGHT );
|
||||
m_quad.Draw();
|
||||
|
||||
|
||||
int iItemToDraw = (int)m_fItemAtTopOfList;
|
||||
|
||||
// HACK: Insert a little pause as a new item appears on the screen
|
||||
|
||||
@@ -716,8 +716,6 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
GAMESTATE->m_fCurBPS = fBPS;
|
||||
GAMESTATE->m_bFreeze = bFreeze;
|
||||
m_MaxCombo.SetText( ssprintf("%d", m_Player[GAMESTATE->m_MasterPlayerNumber].GetPlayersMaxCombo()) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */
|
||||
|
||||
// printf( "m_fSongBeat = %f\n", GAMESTATE->m_fSongBeat );
|
||||
|
||||
//LOG->Trace( "m_fOffsetInBeats = %f, m_fBeatsPerSecond = %f, m_Music.GetPositionSeconds = %f", m_fOffsetInBeats, m_fBeatsPerSecond, m_Music.GetPositionSeconds() );
|
||||
|
||||
@@ -1033,7 +1031,7 @@ void SaveChanges()
|
||||
{
|
||||
for( int i=0; i<GAMESTATE->m_pCurCourse->m_iStages; i++ )
|
||||
{
|
||||
Song* pSong = GAMESTATE->m_pCurCourse->m_apSongs[i];
|
||||
Song* pSong = GAMESTATE->m_pCurCourse->GetSong(i);
|
||||
pSong->Save();
|
||||
}
|
||||
}
|
||||
@@ -1057,7 +1055,7 @@ void DontSaveChanges()
|
||||
{
|
||||
for( int i=0; i<GAMESTATE->m_pCurCourse->m_iStages; i++ )
|
||||
{
|
||||
Song* pSong = GAMESTATE->m_pCurCourse->m_apSongs[i];
|
||||
Song* pSong = GAMESTATE->m_pCurCourse->GetSong(i);
|
||||
ld.LoadFromSMFile( GAMESTATE->m_pCurSong->GetCacheFilePath(), *pSong );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ void ScreenSelectCourse::AfterCourseChange()
|
||||
m_textNumSongs.SetText( ssprintf("%d", pCourse->m_iStages) );
|
||||
float fTotalSeconds = 0;
|
||||
for( int i=0; i<pCourse->m_iStages; i++ )
|
||||
fTotalSeconds += pCourse->m_apSongs[i]->m_fMusicLengthSeconds;
|
||||
fTotalSeconds += pCourse->GetSong(i)->m_fMusicLengthSeconds;
|
||||
m_textTime.SetText( SecondsToTime(fTotalSeconds) );
|
||||
|
||||
m_Banner.SetFromCourse( pCourse );
|
||||
|
||||
@@ -522,12 +522,12 @@ bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredG
|
||||
course.LoadFromCRSFile( sCoursePath, m_pSongs );
|
||||
if( course.m_iStages <= 0 ) return false;
|
||||
|
||||
pSongOut = course.m_apSongs[0];
|
||||
pSongOut = course.GetSong(0);
|
||||
pNotesOut = course.GetNotesForStage( 0 );
|
||||
if( pNotesOut == NULL ) return false;
|
||||
|
||||
po_out.FromString( course.m_asModifiers[0] );
|
||||
so_out.FromString( course.m_asModifiers[0] );
|
||||
po_out.FromString( course.GetModifiers(0) );
|
||||
so_out.FromString( course.GetModifiers(0) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user