From 130cbb882a30effa197087899514e680512d1faf Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 16 Oct 2005 02:11:25 +0000 Subject: [PATCH] fix background layers not processing broadcasts --- stepmania/src/Background.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index dc54cb1997..9347f79746 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -70,6 +70,7 @@ public: virtual void LoadFromSong( const Song *pSong ); virtual void Unload(); + virtual void ProcessMessages( float fDeltaTime ); virtual void Update( float fDeltaTime ); virtual void DrawPrimitives(); @@ -104,6 +105,7 @@ protected: int FindBGSegmentForBeat( float fBeat ) const; void UpdateCurBGChange( const Song *pSong, float fLastMusicSeconds, float fCurrentTime, const map &mapNameToTransition ); + void ProcessMessages( float fDeltaTime ); map m_BGAnimations; vector m_aBGChanges; @@ -844,6 +846,14 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus m_pFadingBGA->Update( fDeltaTimeMusicRate ); } +void BackgroundImpl::Layer::ProcessMessages( float fDeltaTime ) +{ + if( m_pCurrentBGA ) + m_pCurrentBGA->ProcessMessages( fDeltaTime ); + if( m_pFadingBGA ) + m_pFadingBGA->ProcessMessages( fDeltaTime ); +} + void BackgroundImpl::Update( float fDeltaTime ) { ActorFrame::Update( fDeltaTime ); @@ -877,6 +887,16 @@ void BackgroundImpl::Update( float fDeltaTime ) m_fLastMusicSeconds = GAMESTATE->m_fMusicSeconds; } +void BackgroundImpl::ProcessMessages( float fDeltaTime ) +{ + ActorFrame::ProcessMessages( fDeltaTime ); + FOREACH_BackgroundLayer( i ) + { + Layer &layer = m_Layer[i]; + layer.ProcessMessages( fDeltaTime ); + } +} + void BackgroundImpl::DrawPrimitives() { if( PREFSMAN->m_fBGBrightness == 0.0f )