avoid special cases in parent classes

don't use RageMovieTexture directly
This commit is contained in:
Glenn Maynard
2003-02-12 17:48:56 +00:00
parent 5ba0e8f47d
commit 9a54e74972
2 changed files with 10 additions and 26 deletions
-22
View File
@@ -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 )
+10 -4
View File
@@ -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.
*/
}