From 5f5a26689810ac5c294ec9cc7ffdd0897bd382d8 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 2 Aug 2008 03:48:04 +0000 Subject: [PATCH] prep when m_In finishes, transition out on MenuTimer --- stepmania/src/ScreenSplash.cpp | 19 +++---------------- stepmania/src/ScreenSplash.h | 1 - 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/stepmania/src/ScreenSplash.cpp b/stepmania/src/ScreenSplash.cpp index 38d84db38f..37977285d1 100644 --- a/stepmania/src/ScreenSplash.cpp +++ b/stepmania/src/ScreenSplash.cpp @@ -12,7 +12,6 @@ REGISTER_SCREEN_CLASS( ScreenSplash ); void ScreenSplash::Init() { ALLOW_START_TO_SKIP.Load( m_sName, "AllowStartToSkip" ); - MINIMUM_SCREEN_PREPARE_DELAY_SECONDS.Load( m_sName, "MinimumScreenPrepareDelaySeconds" ); PREPARE_SCREEN.Load( m_sName, "PrepareScreen" ); ScreenWithMenuElements::Init(); @@ -21,29 +20,18 @@ void ScreenSplash::Init() void ScreenSplash::BeginScreen() { ScreenWithMenuElements::BeginScreen(); - - /* Prep the new screen once m_sprOverlay is complete. */ - this->PostScreenMessage( SM_PrepNextScreen, m_In.GetTweenTimeLeft() ); } void ScreenSplash::HandleScreenMessage( const ScreenMessage SM ) { - if( SM == SM_PrepNextScreen ) + if( SM == SM_DoneFadingIn ) { - RageTimer length; if( PREPARE_SCREEN ) SCREENMAN->PrepareScreen( GetNextScreenName() ); - float fScreenLoadSeconds = length.GetDeltaTime(); - - /* The screen load took fScreenLoadSeconds. Move on to the next screen after - * no less than MINIMUM_DELAY seconds. */ - this->PostScreenMessage( SM_BeginFadingOut, max( 0, MINIMUM_SCREEN_PREPARE_DELAY_SECONDS-fScreenLoadSeconds) ); - return; } - else if( SM == SM_BeginFadingOut ) + else if( SM == SM_MenuTimer ) { StartTransitioningScreen( SM_GoToNextScreen ); - return; } ScreenWithMenuElements::HandleScreenMessage( SM ); @@ -62,8 +50,7 @@ void ScreenSplash::MenuStart( const InputEventPlus &input ) return; if( !ALLOW_START_TO_SKIP ) return; - this->ClearMessageQueue( SM_PrepNextScreen ); - HandleScreenMessage( SM_PrepNextScreen ); + StartTransitioningScreen( SM_GoToNextScreen ); } /* diff --git a/stepmania/src/ScreenSplash.h b/stepmania/src/ScreenSplash.h index 4c307cf2ae..b6cc657cf0 100644 --- a/stepmania/src/ScreenSplash.h +++ b/stepmania/src/ScreenSplash.h @@ -18,7 +18,6 @@ public: protected: ThemeMetric ALLOW_START_TO_SKIP; - ThemeMetric MINIMUM_SCREEN_PREPARE_DELAY_SECONDS; ThemeMetric PREPARE_SCREEN; };