From 1a2df1e440e3b8ad15165abecc9a392f28c2c75a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 31 Jan 2004 09:53:48 +0000 Subject: [PATCH] fix course mode --- stepmania/src/ScreenGameplay.cpp | 6 +++--- stepmania/src/SongCreditDisplay.cpp | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 8e9bb36228..96c5efc94f 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -528,9 +528,6 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen("S m_textStepsDescription[p].LoadFromFont( THEME->GetPathToF("ScreenGameplay StepsDescription") ); m_textStepsDescription[p].SetName( ssprintf("StepsDescriptionP%i",p+1) ); - Steps* pSteps = GAMESTATE->m_pCurNotes[p]; - ASSERT( pSteps ); - m_textStepsDescription[p].SetText( pSteps->GetDescription() ); SET_XY( m_textStepsDescription[p] ); this->AddChild( &m_textStepsDescription[p] ); } @@ -863,6 +860,9 @@ void ScreenGameplay::LoadNextSong() SetupSong( p, iPlaySongIndex ); + ASSERT( GAMESTATE->m_pCurNotes[p] ); + m_textStepsDescription[p].SetText( GAMESTATE->m_pCurNotes[p]->GetDescription() ); + /* Increment the play count even if the player fails. (It's still popular, * even if the people playing it aren't good at it.) */ if( !m_bDemonstration ) diff --git a/stepmania/src/SongCreditDisplay.cpp b/stepmania/src/SongCreditDisplay.cpp index 83e1d0a7c4..454a17fdb0 100644 --- a/stepmania/src/SongCreditDisplay.cpp +++ b/stepmania/src/SongCreditDisplay.cpp @@ -21,6 +21,9 @@ SongCreditDisplay::SongCreditDisplay() this->LoadFromFont( THEME->GetPathToF("SongCreditDisplay",(CString)"text") ); Song* pSong = GAMESTATE->m_pCurSong; + if( pSong == NULL ) /* probably course mode */ + return; + CString s; s += pSong->GetFullDisplayTitle() + "\n"; s += pSong->GetDisplayArtist() + "\n";