From ec030b56ba77450f521516aaf62bb100b86145db Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 14 Oct 2006 04:55:36 +0000 Subject: [PATCH] parent --- stepmania/src/BGAnimationLayer.cpp | 4 ++-- stepmania/src/Background.cpp | 20 ++++++++++---------- stepmania/src/OptionRow.cpp | 4 ++-- stepmania/src/OptionRow.h | 2 +- stepmania/src/ScreenOptions.cpp | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index 3e7af56ef5..4661bbea33 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -472,7 +472,7 @@ void BGAnimationLayer::LoadFromNode( const XNode* pNode ) for( int i=0; iAddChild( pActor ); @@ -510,7 +510,7 @@ void BGAnimationLayer::LoadFromNode( const XNode* pNode ) unsigned NumSprites = m_iNumTilesWide * m_iNumTilesHigh; for( unsigned i=0; iAddChild( pSprite ); pSprite->SetTextureWrapping( true ); // gets rid of some "cracks" pSprite->SetZoom( randomf(fZoomMin,fZoomMax) ); diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 31757eae5f..c2d963065e 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -99,9 +99,9 @@ protected: void Unload(); // return true if created and added to m_BGAnimations - bool CreateBackground( const Song *pSong, const BackgroundDef &bd ); + bool CreateBackground( const Song *pSong, const BackgroundDef &bd, Actor *pParent ); // return def of the background that was created and added to m_BGAnimations. calls CreateBackground - BackgroundDef CreateRandomBGA( const Song *pSong, const RString &sEffect, deque &RandomBGAnimations ); + BackgroundDef CreateRandomBGA( const Song *pSong, const RString &sEffect, deque &RandomBGAnimations, Actor *pParent ); int FindBGSegmentForBeat( float fBeat ) const; void UpdateCurBGChange( const Song *pSong, float fLastMusicSeconds, float fCurrentTime, const map &mapNameToTransition ); @@ -285,7 +285,7 @@ Actor *MakeVisualization( const RString &sVisPath ) return pFrame; } -bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const BackgroundDef &bd ) +bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const BackgroundDef &bd, Actor *pParent ) { ASSERT( m_BGAnimations.find(bd) == m_BGAnimations.end() ); @@ -412,7 +412,7 @@ bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const Backgroun return true; } -BackgroundDef BackgroundImpl::Layer::CreateRandomBGA( const Song *pSong, const RString &sEffect, deque &RandomBGAnimations ) +BackgroundDef BackgroundImpl::Layer::CreateRandomBGA( const Song *pSong, const RString &sEffect, deque &RandomBGAnimations, Actor *pParent ) { if( PREFSMAN->m_RandomBackgroundMode == BGMODE_OFF ) return BackgroundDef(); @@ -434,7 +434,7 @@ BackgroundDef BackgroundImpl::Layer::CreateRandomBGA( const Song *pSong, const R // create the background if it's not already created if( iter == m_BGAnimations.end() ) { - bool bSuccess = CreateBackground( pSong, bd ); + bool bSuccess = CreateBackground( pSong, bd, pParent ); ASSERT( bSuccess ); // we fed it valid files, so this shouldn't fail } return bd; @@ -448,7 +448,7 @@ void BackgroundImpl::LoadFromRandom( float fFirstBeat, float fEndBeat, const Bac for( float f=fFirstBeat; fGetPathF(sType,"title") ); - m_sprBullet.Load( ActorUtil::MakeActor( THEME->GetPathG(sType,"bullet") ) ); + m_sprBullet.Load( ActorUtil::MakeActor( THEME->GetPathG(sType,"bullet"), pParent ) ); if( SHOW_OPTION_ICONS ) m_OptionIcon.Load( sType ); } diff --git a/stepmania/src/OptionRow.h b/stepmania/src/OptionRow.h index f0716886aa..5fd9b6d7cf 100644 --- a/stepmania/src/OptionRow.h +++ b/stepmania/src/OptionRow.h @@ -17,7 +17,7 @@ struct OptionRowDefinition; class OptionRowType { public: - void Load( const RString &sType ); + void Load( const RString &sType, Actor *pParent ); private: RString m_sType; diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 1914128383..1bc7d3f64d 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -181,7 +181,7 @@ void ScreenOptions::Init() m_sprMore->PlayCommand( "LoseFocus" ); m_framePage.AddChild( m_sprMore ); - m_OptionRowType.Load( m_sName ); + m_OptionRowType.Load( m_sName, this ); } void ScreenOptions::InitMenu( const vector &vHands )