From 111f5b31247e37e2811f73ece880d892ca098dfa Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 24 Mar 2004 04:05:43 +0000 Subject: [PATCH] don't wait for memory card to be removed --- stepmania/src/ScreenEnding.cpp | 28 ++++++---------------------- stepmania/src/ScreenEnding.h | 1 - 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/stepmania/src/ScreenEnding.cpp b/stepmania/src/ScreenEnding.cpp index 307fa824f3..0687a8b3ce 100644 --- a/stepmania/src/ScreenEnding.cpp +++ b/stepmania/src/ScreenEnding.cpp @@ -118,17 +118,14 @@ ScreenEnding::ScreenEnding( CString sClassName ) : ScreenAttract( sClassName, fa // Now that we've read the data from the profile, it's ok to Reset() GAMESTATE->Reset(); - // TRICKY: Don't let the timer take us to the next screen until after all memory cards - // have been removed. - this->ClearMessageQueue(); - - m_fTimeUntilBeginFadingOut = m_Background.GetLengthSeconds() - m_Out.GetLengthSeconds(); - if( m_fTimeUntilBeginFadingOut < 0 ) + float fSecsUntilBeginFadingOut = m_Background.GetLengthSeconds() - m_Out.GetLengthSeconds(); + if( fSecsUntilBeginFadingOut < 0 ) { LOG->Warn( "Screen '%s' Out BGAnimation (%f seconds) is longer than Background BGAnimation (%f seconds); background BGA will be truncated", m_sName.c_str(), m_Out.GetLengthSeconds(), m_Background.GetLengthSeconds() ); - m_fTimeUntilBeginFadingOut = 0; + fSecsUntilBeginFadingOut = 0; } + this->PostScreenMessage( SM_BeginFadingOut, fSecsUntilBeginFadingOut ); } ScreenEnding::~ScreenEnding() @@ -139,30 +136,17 @@ void ScreenEnding::Update( float fDeltaTime ) { ScreenAttract::Update( fDeltaTime ); - m_fTimeUntilBeginFadingOut = max( 0, m_fTimeUntilBeginFadingOut-fDeltaTime ); - if( !m_In.IsTransitioning() && !m_Out.IsTransitioning() ) { - bool bAllRemoved = true; - - for( int p=0; pGetCardState((PlayerNumber)p)!=MEMORY_CARD_STATE_NO_CARD; - if( m_bWaitingForRemoveCard[p] ) - { - bAllRemoved = false; - } - else - { + if( !m_bWaitingForRemoveCard[p] ) m_sprRemoveMemoryCard[p].SetHidden( true ); - } } } - - if( bAllRemoved ) - this->PostScreenMessage( SM_BeginFadingOut, m_fTimeUntilBeginFadingOut ); } } diff --git a/stepmania/src/ScreenEnding.h b/stepmania/src/ScreenEnding.h index 4abc179ed0..7a1324f577 100644 --- a/stepmania/src/ScreenEnding.h +++ b/stepmania/src/ScreenEnding.h @@ -30,7 +30,6 @@ private: Sprite m_sprRemoveMemoryCard[NUM_PLAYERS]; bool m_bWaitingForRemoveCard[NUM_PLAYERS]; - float m_fTimeUntilBeginFadingOut; };