diff --git a/stepmania/src/BGAnimation.cpp b/stepmania/src/BGAnimation.cpp index 2610730b7c..bc12ce626f 100644 --- a/stepmania/src/BGAnimation.cpp +++ b/stepmania/src/BGAnimation.cpp @@ -238,9 +238,6 @@ void BGAnimation::LoadFromNode( const CString &sDir, const XNode& node ) cmd.Load( "PlayCommand,Init" ); this->RunCommandOnChildren( cmd ); - if( !m_bGeneric ) - PlayCommand( "On" ); - /* Backwards-compatibility: if a "LengthSeconds" value is present, create a dummy * actor that sleeps for the given length of time. This will extend GetTweenTimeLeft. */ float fLengthSeconds = 0; diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 05ebe23427..92ce718ae1 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -250,6 +250,7 @@ CString Background::CreateRandomBGA() case PrefsManager::BGMODE_MOVIEVIS: ret->LoadFromVisualization( file ); break; case PrefsManager::BGMODE_RANDOMMOVIES: ret->LoadFromMovie( file ); break; } + ret->PlayCommand( "On" ); m_BGAnimations[file] = ret; m_RandomBGAnimations.push_back( file ); @@ -326,7 +327,10 @@ void Background::LoadFromSong( const Song* pSong ) { BGAnimation *pTempBGA = CreateSongBGA( sBGName ); if( pTempBGA ) + { + pTempBGA->PlayCommand( "On" ); m_BGAnimations[sBGName] = pTempBGA; + } else // the background was not found. Use a random one instead { sBGName = CreateRandomBGA(); @@ -365,6 +369,7 @@ void Background::LoadFromSong( const Song* pSong ) CString sSongBGPath = pSong->HasBackground() ? pSong->GetBackgroundPath() : THEME->GetPathToG("Common fallback background"); BGAnimation *pTempBGA = new BGAnimation; pTempBGA->LoadFromStaticGraphic( sSongBGPath ); + pTempBGA->PlayCommand( "On" ); m_BGAnimations[STATIC_BACKGROUND] = pTempBGA; } diff --git a/stepmania/src/ConditionalBGA.cpp b/stepmania/src/ConditionalBGA.cpp index c925ad2458..ac5efe9491 100644 --- a/stepmania/src/ConditionalBGA.cpp +++ b/stepmania/src/ConditionalBGA.cpp @@ -265,6 +265,7 @@ void ConditionalBGA::Load(CString szScreenName) { LOG->Info("Best Match BGA Was: %s",bganimtouse.c_str()); bganim.LoadFromAniDir( THEME->GetPathToB(bganimtouse) ); + bganim.PlayCommand( "On" ); } } diff --git a/stepmania/src/Foreground.cpp b/stepmania/src/Foreground.cpp index 7fe4458861..3aa666e8d7 100644 --- a/stepmania/src/Foreground.cpp +++ b/stepmania/src/Foreground.cpp @@ -40,6 +40,7 @@ void Foreground::LoadFromSong( const Song *pSong ) LoadedBGA bga; bga.m_bga = new BGAnimation; bga.m_bga->LoadFromAniDir( sAniDir ); + bga.m_bga->PlayCommand( "On" ); bga.m_fStartBeat = change.m_fStartBeat; const float fStartSecond = pSong->m_Timing.GetElapsedTimeFromBeat( bga.m_fStartBeat ); diff --git a/stepmania/src/ScreenCredits.cpp b/stepmania/src/ScreenCredits.cpp index 85828c0477..b2470ee7e6 100644 --- a/stepmania/src/ScreenCredits.cpp +++ b/stepmania/src/ScreenCredits.cpp @@ -252,13 +252,13 @@ ScreenCredits::ScreenCredits( CString sName ) : ScreenAttract( sName ) } m_Overlay.LoadFromAniDir( THEME->GetPathToB("ScreenCredits overlay") ); + m_Overlay.PlayCommand( "On" ); this->AddChild( &m_Overlay ); this->MoveToTail( &m_In ); // put it in the back so it covers up the stuff we just added this->MoveToTail( &m_Out ); // put it in the back so it covers up the stuff we just added this->ClearMessageQueue( SM_BeginFadingOut ); // ignore ScreenAttract's SecsToShow - LOG->Trace("XXXXXXXXX %f", fTime); this->PostScreenMessage( SM_BeginFadingOut, fTime ); // this->PostScreenMessage( SM_BeginFadingOut, m_Background.GetLengthSeconds() ); SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("credits") ); diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 7a915c6a5e..be0c0918a2 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -45,6 +45,7 @@ void ScreenDemonstration::Init() m_Overlay.LoadFromAniDir( THEME->GetPathToB("ScreenDemonstration overlay") ); + m_Overlay.PlayCommand( "On" ); this->AddChild( &m_Overlay ); this->MoveToTail( &m_In ); diff --git a/stepmania/src/ScreenHowToPlay.cpp b/stepmania/src/ScreenHowToPlay.cpp index 3a40532844..ff71a7f0fe 100644 --- a/stepmania/src/ScreenHowToPlay.cpp +++ b/stepmania/src/ScreenHowToPlay.cpp @@ -80,6 +80,7 @@ ScreenHowToPlay::ScreenHowToPlay( CString sName ) : ScreenAttract( sName ) m_Out.Load( THEME->GetPathToB("ScreenHowToPlay out") ); m_Overlay.LoadFromAniDir( THEME->GetPathToB("ScreenHowToPlay overlay") ); + m_Overlay.PlayCommand("On"); this->AddChild( &m_Overlay ); if( (bool)USEPAD && DoesFileExist( GetAnimPath(ANIM_DANCE_PAD) ) ) diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index e8136c6406..0a9db9a6c6 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -99,6 +99,7 @@ void ScreenManager::ThemeChanged() // reload shared BGA m_pSharedBGA->LoadFromAniDir( m_sLastLoadedBackgroundPath ); + m_pSharedBGA->PlayCommand( "On" ); } void ScreenManager::EmptyDeleteQueue() @@ -376,6 +377,7 @@ retry: // any common textures loaded. BGAnimation *pNewBGA = new BGAnimation; pNewBGA->LoadFromAniDir( sNewBGA ); + pNewBGA->PlayCommand( "On" ); SAFE_DELETE( m_pSharedBGA ); m_pSharedBGA = pNewBGA; diff --git a/stepmania/src/ScreenMiniMenu.cpp b/stepmania/src/ScreenMiniMenu.cpp index dade7efe01..d22b8640e1 100644 --- a/stepmania/src/ScreenMiniMenu.cpp +++ b/stepmania/src/ScreenMiniMenu.cpp @@ -41,6 +41,7 @@ ScreenMiniMenu::ScreenMiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMes m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenMiniMenu background") ); + m_Background.PlayCommand("On"); this->AddChild( &m_Background ); float fHeightOfAll = min( SCREEN_HEIGHT-80, (m_Def.rows.size()-1)*SPACING_Y ); diff --git a/stepmania/src/ScreenPrompt.cpp b/stepmania/src/ScreenPrompt.cpp index 49e66e74f0..6a08758c0a 100644 --- a/stepmania/src/ScreenPrompt.cpp +++ b/stepmania/src/ScreenPrompt.cpp @@ -30,6 +30,7 @@ ScreenPrompt::ScreenPrompt( CString sText, bool bYesNoPrompt, bool bDefaultAnswe m_pCallbackData = pCallbackData; m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenPrompt background") ); + m_Background.PlayCommand("On"); this->AddChild( &m_Background ); m_textQuestion.LoadFromFont( THEME->GetPathToF("Common normal") ); diff --git a/stepmania/src/ScreenStage.cpp b/stepmania/src/ScreenStage.cpp index e7ce28e08d..4874076d9e 100644 --- a/stepmania/src/ScreenStage.cpp +++ b/stepmania/src/ScreenStage.cpp @@ -32,6 +32,7 @@ ScreenStage::ScreenStage( CString sClassName ) : Screen( sClassName ) m_Background.LoadFromAniDir( THEME->GetPathToB(m_sName + " "+GAMESTATE->GetStageText()) ); m_Background.SetDrawOrder( DRAW_ORDER_BEFORE_EVERYTHING ); + m_Background.PlayCommand( "On" ); this->AddChild( &m_Background ); m_Overlay.SetName( "Overlay" ); diff --git a/stepmania/src/ScreenTextEntry.cpp b/stepmania/src/ScreenTextEntry.cpp index 2db1b8363e..d948206bec 100644 --- a/stepmania/src/ScreenTextEntry.cpp +++ b/stepmania/src/ScreenTextEntry.cpp @@ -43,6 +43,7 @@ ScreenTextEntry::ScreenTextEntry( CString sClassName, CString sQuestion, CString m_bCancelled = false; m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenPrompt background") ); + m_Background.PlayCommand( "On" ); this->AddChild( &m_Background ); m_textQuestion.LoadFromFont( THEME->GetPathToF("Common normal") ); diff --git a/stepmania/src/ScreenWithMenuElements.h b/stepmania/src/ScreenWithMenuElements.h index d98e6456fa..dd6f340fda 100644 --- a/stepmania/src/ScreenWithMenuElements.h +++ b/stepmania/src/ScreenWithMenuElements.h @@ -4,7 +4,6 @@ #include "Screen.h" #include "Sprite.h" #include "Transition.h" -#include "BGAnimation.h" #include "ActorUtil.h" #include "RageSound.h" #include "MemoryCardDisplay.h" diff --git a/stepmania/src/Transition.cpp b/stepmania/src/Transition.cpp index ccbc9259eb..3f5e7c2a8e 100644 --- a/stepmania/src/Transition.cpp +++ b/stepmania/src/Transition.cpp @@ -18,6 +18,7 @@ void Transition::Load( CString sBGAniDir ) sBGAniDir += "/"; m_BGAnimation.LoadFromAniDir( sBGAniDir ); + m_BGAnimation.PlayCommand( "On" ); m_fLengthSeconds = m_BGAnimation.GetTweenTimeLeft(); m_State = waiting;