From: Glenn M. <gma...@us...> - 2005-01-15 19:21:23
|
Update of /cvsroot/stepmania/stepmania/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26495 Modified Files: Background.cpp BGAnimation.cpp ConditionalBGA.cpp Foreground.cpp ScreenCredits.cpp ScreenDemonstration.cpp ScreenHowToPlay.cpp ScreenManager.cpp ScreenMiniMenu.cpp ScreenPrompt.cpp ScreenStage.cpp ScreenTextEntry.cpp ScreenWithMenuElements.h Transition.cpp Log Message: Don't play "On" automatically for non-generic BGAnimations; play it explicitly, like we do with all other objects. Index: ScreenHowToPlay.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenHowToPlay.cpp,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -p -r1.111 -r1.112 --- ScreenHowToPlay.cpp 15 Jan 2005 02:01:26 -0000 1.111 +++ ScreenHowToPlay.cpp 15 Jan 2005 19:21:09 -0000 1.112 @@ -80,6 +80,7 @@ ScreenHowToPlay::ScreenHowToPlay( CStrin 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) ) ) Index: BGAnimation.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/BGAnimation.cpp,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -p -r1.68 -r1.69 --- BGAnimation.cpp 15 Jan 2005 18:31:14 -0000 1.68 +++ BGAnimation.cpp 15 Jan 2005 19:21:09 -0000 1.69 @@ -238,9 +238,6 @@ void BGAnimation::LoadFromNode( const CS 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; Index: ScreenWithMenuElements.h =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenWithMenuElements.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -p -r1.6 -r1.7 --- ScreenWithMenuElements.h 5 Jan 2005 04:32:12 -0000 1.6 +++ ScreenWithMenuElements.h 15 Jan 2005 19:21:09 -0000 1.7 @@ -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" Index: ScreenMiniMenu.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenMiniMenu.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -p -r1.36 -r1.37 --- ScreenMiniMenu.cpp 26 Nov 2004 17:28:44 -0000 1.36 +++ ScreenMiniMenu.cpp 15 Jan 2005 19:21:09 -0000 1.37 @@ -41,6 +41,7 @@ ScreenMiniMenu::ScreenMiniMenu( Menu* pD 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 ); Index: ScreenTextEntry.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenTextEntry.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -p -r1.51 -r1.52 --- ScreenTextEntry.cpp 5 Jan 2005 04:35:15 -0000 1.51 +++ ScreenTextEntry.cpp 15 Jan 2005 19:21:09 -0000 1.52 @@ -43,6 +43,7 @@ ScreenTextEntry::ScreenTextEntry( CStrin 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") ); Index: Transition.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/Transition.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -p -r1.27 -r1.28 --- Transition.cpp 15 Jan 2005 18:31:14 -0000 1.27 +++ Transition.cpp 15 Jan 2005 19:21:09 -0000 1.28 @@ -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; Index: ScreenManager.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenManager.cpp,v retrieving revision 1.203 retrieving revision 1.204 diff -u -d -p -r1.203 -r1.204 --- ScreenManager.cpp 7 Jan 2005 04:50:08 -0000 1.203 +++ ScreenManager.cpp 15 Jan 2005 19:21:09 -0000 1.204 @@ -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; Index: ScreenPrompt.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenPrompt.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -p -r1.45 -r1.46 --- ScreenPrompt.cpp 4 Dec 2004 11:09:32 -0000 1.45 +++ ScreenPrompt.cpp 15 Jan 2005 19:21:09 -0000 1.46 @@ -30,6 +30,7 @@ ScreenPrompt::ScreenPrompt( CString sTex 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") ); Index: ScreenStage.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenStage.cpp,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -p -r1.98 -r1.99 --- ScreenStage.cpp 15 Jan 2005 18:31:14 -0000 1.98 +++ ScreenStage.cpp 15 Jan 2005 19:21:09 -0000 1.99 @@ -32,6 +32,7 @@ ScreenStage::ScreenStage( CString sClass 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" ); Index: ConditionalBGA.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ConditionalBGA.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -p -r1.15 -r1.16 --- ConditionalBGA.cpp 20 Dec 2004 10:47:26 -0000 1.15 +++ ConditionalBGA.cpp 15 Jan 2005 19:21:09 -0000 1.16 @@ -265,6 +265,7 @@ void ConditionalBGA::Load(CString szScre { LOG->Info("Best Match BGA Was: %s",bganimtouse.c_str()); bganim.LoadFromAniDir( THEME->GetPathToB(bganimtouse) ); + bganim.PlayCommand( "On" ); } } Index: ScreenCredits.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenCredits.cpp,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -p -r1.52 -r1.53 --- ScreenCredits.cpp 26 Nov 2004 17:28:41 -0000 1.52 +++ ScreenCredits.cpp 15 Jan 2005 19:21:09 -0000 1.53 @@ -252,13 +252,13 @@ ScreenCredits::ScreenCredits( CString sN } 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") ); Index: Foreground.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/Foreground.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -p -r1.7 -r1.8 --- Foreground.cpp 15 Jan 2005 18:31:14 -0000 1.7 +++ Foreground.cpp 15 Jan 2005 19:21:09 -0000 1.8 @@ -40,6 +40,7 @@ void Foreground::LoadFromSong( const Son 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 ); Index: Background.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/Background.cpp,v retrieving revision 1.185 retrieving revision 1.186 diff -u -d -p -r1.185 -r1.186 --- Background.cpp 4 Jan 2005 01:45:27 -0000 1.185 +++ Background.cpp 15 Jan 2005 19:21:08 -0000 1.186 @@ -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 Son { 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 Son 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; } Index: ScreenDemonstration.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenDemonstration.cpp,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -p -r1.69 -r1.70 --- ScreenDemonstration.cpp 3 Jan 2005 23:31:34 -0000 1.69 +++ ScreenDemonstration.cpp 15 Jan 2005 19:21:09 -0000 1.70 @@ -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 ); |