From 88873535178bcb1ab6e3da6fc102ae1cf81d7f16 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 6 Mar 2004 10:07:17 +0000 Subject: [PATCH] add transition at end of song; used regardless of mode --- stepmania/src/ScreenGameplay.cpp | 9 ++++++--- stepmania/src/ScreenGameplay.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index aa4a9793d2..b1f1916833 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -342,7 +342,8 @@ void ScreenGameplay::Init() m_NextSongOut.SetZ( -2 ); // on top of everything else this->AddChild( &m_NextSongOut ); - + m_SongFinished.SetZ( -2 ); // on top of everything else + this->AddChild( &m_SongFinished ); // // Add LifeFrame @@ -953,6 +954,8 @@ void ScreenGameplay::LoadNextSong() // Instead, load this right before it's used // m_NextSongOut.Load( THEME->GetPathToB("ScreenGameplay next song out") ); + m_SongFinished.Load( THEME->GetPathToB("ScreenGameplay song finished") ); + // Load lyrics // XXX: don't load this here LyricsLoader LL; @@ -1219,8 +1222,8 @@ void ScreenGameplay::Update( float fDeltaTime ) // Check for end of song // float fSecondsToStop = GAMESTATE->m_pCurSong->GetElapsedTimeFromBeat( GAMESTATE->m_pCurSong->m_fLastBeat ); - if( GAMESTATE->m_fMusicSeconds > fSecondsToStop && !m_NextSongOut.IsTransitioning() ) - this->PostScreenMessage( SM_NotesEnded, 0 ); + if( GAMESTATE->m_fMusicSeconds > fSecondsToStop && !m_SongFinished.IsTransitioning() && !m_NextSongOut.IsTransitioning() ) + m_SongFinished.StartTransitioning( SM_NotesEnded ); // // check for fail diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index ac5e75d3e2..25b2a9bc75 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -110,6 +110,7 @@ protected: Transition m_NextSongIn; // shows between songs in a course Transition m_NextSongOut; // shows between songs in a course + Transition m_SongFinished; // shows after each song, course or not Sprite m_sprStaticBackground; Sprite m_sprLifeFrame;