From fffa2c002f2907fe946a012201b6b336d516fc5a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 4 Feb 2003 21:36:30 +0000 Subject: [PATCH] fix up oni set song-specific stuff in LoadNextStage --- stepmania/src/ScreenGameplay.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 4fcd5ccdfe..c4c6be1238 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -103,7 +103,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) { LOG->Trace( "ScreenGameplay::ScreenGameplay()" ); - if( GAMESTATE->m_pCurSong == NULL ) + if( GAMESTATE->m_pCurSong == NULL && GAMESTATE->m_pCurCourse == NULL ) return; // ScreenDemonstration will move us to the next scren. We just need to survive for one update without crashing. int p; @@ -294,7 +294,6 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) m_StageName.TurnShadowOff(); m_StageName.SetXY( STAGENAME_X, STAGENAME_Y ); m_StageName.SetZoom( STAGENAME_ZOOM ); - m_StageName.SetText( GAMESTATE->m_pCurSong->m_sMainTitle ); this->AddChild( &m_StageName ); m_MaxCombo.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") ); @@ -419,16 +418,11 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) m_sprToasty.SetDiffuse( RageColor(1,1,1,0) ); this->AddChild( &m_sprToasty ); - Song* pSong; - pSong = GAMESTATE->m_pCurSong; + m_BPMDisplay.SetXY( BPM_X, BPM_Y ); m_BPMDisplay.SetZoom( BPM_ZOOM ); this->AddChild( &m_BPMDisplay ); - float fMinBPM, fMaxBPM; - pSong->GetMinMaxBPM( fMinBPM, fMaxBPM ); - m_BPMDisplay.SetBPMRange( fMinBPM, fMaxBPM ); - TweenOnScreen(); for( int i=0; i<30; i++ ) @@ -604,11 +598,19 @@ void ScreenGameplay::LoadNextSong() m_Player[p].Load( (PlayerNumber)p, &pNewNoteData, m_pLifeMeter[p], m_pScoreDisplay[p] ); } + /* Set up song-specific graphics. */ m_Background.LoadFromSong( GAMESTATE->m_pCurSong ); m_Background.SetDiffuse( RageColor(0.5f,0.5f,0.5f,1) ); m_Background.BeginTweening( 2 ); m_Background.SetTweenDiffuse( RageColor(1,1,1,1) ); + m_StageName.SetText( GAMESTATE->m_pCurSong->m_sMainTitle ); + + /* XXX: set it to the current BPM, not the range */ + float fMinBPM, fMaxBPM; + GAMESTATE->m_pCurSong->GetMinMaxBPM( fMinBPM, fMaxBPM ); + m_BPMDisplay.SetBPMRange( fMinBPM, fMaxBPM ); + m_soundMusic.Load( GAMESTATE->m_pCurSong->GetMusicPath() ); }