From 9a54e74972071b0097453b869caef3ffa5fbb17a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 12 Feb 2003 17:48:56 +0000 Subject: [PATCH] avoid special cases in parent classes don't use RageMovieTexture directly --- stepmania/src/ScreenAttract.cpp | 22 ---------------------- stepmania/src/ScreenIntroMovie.cpp | 14 ++++++++++---- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/stepmania/src/ScreenAttract.cpp b/stepmania/src/ScreenAttract.cpp index d2e902855b..0d7cc39b1f 100644 --- a/stepmania/src/ScreenAttract.cpp +++ b/stepmania/src/ScreenAttract.cpp @@ -33,18 +33,6 @@ ScreenAttract::ScreenAttract( CString sMetricName, CString sElementName ) { - /* This has replaced the above, because ScreenIntroMovie should not be - exited until the movie is done. This saves the hassle of having to - always update the metrics.ini file to reflect the movie's time. - - XXX UPDATE: Until we have a way to determine a movie's length.. the fadeout - time will have to be manually set in the metrics file -- Miryokuteki - - if( m_sMetricName == "ScreenIntroMovie" ) - { - SECONDS_TO_SHOW = THEME->GetMetricF(m_sMetricName,"SecondsToShow"); - }*/ - LOG->Trace( "ScreenAttract::ScreenAttract(%s, %s)", sMetricName.c_str(), sElementName.c_str() ); GAMESTATE->Reset(); @@ -148,16 +136,6 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type void ScreenAttract::Update( float fDelta ) { Screen::Update(fDelta); - - - /* See the above comment block -- Miryokuteki - if( m_sMetricName == "ScreenIntroMovie" ) - { - if( RageMovieTexture::IsFinishedPlaying() == true ) - { - this->SendScreenMessage( SM_BeginFadingOut,0 ); - } - } */ } void ScreenAttract::HandleScreenMessage( const ScreenMessage SM ) diff --git a/stepmania/src/ScreenIntroMovie.cpp b/stepmania/src/ScreenIntroMovie.cpp index f13cce59e0..e99a1647cf 100644 --- a/stepmania/src/ScreenIntroMovie.cpp +++ b/stepmania/src/ScreenIntroMovie.cpp @@ -9,10 +9,16 @@ void ScreenIntroMovie::Update( float fDelta ) RageTexture *tex = sprite->GetTexture(); if(tex->IsAMovie() && !tex->IsPlaying()) this->SendScreenMessage( SM_BeginFadingOut,0 ); -if( BackgroundImage->GetTexture()->RageMovieTexture::IsFinishedPlaying() == true ) - { - this->SendScreenMessage( SM_BeginFadingOut,0 ); - } + + and when initting the sprite in ScreenIntroMovie::ScreenIntroMovie: + if(sprite->GetTexture->IsAMovie()) + { + tex->SetLooping(false); + ClearMessageQueue(SM_BeginFadingOut); + } + + Don't use RageMovieTexture directly. + */ }