From bfece8a893cdac0bcfd8ae69c94b97489e6b228e Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 27 Mar 2005 07:04:04 +0000 Subject: [PATCH] Sprite -> AutoActor --- stepmania/src/CombinedLifeMeterTug.cpp | 6 +++--- stepmania/src/CombinedLifeMeterTug.h | 4 ++-- stepmania/src/MeterDisplay.cpp | 10 +++++----- stepmania/src/MeterDisplay.h | 2 +- stepmania/src/ScoreDisplayRave.cpp | 1 - 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/stepmania/src/CombinedLifeMeterTug.cpp b/stepmania/src/CombinedLifeMeterTug.cpp index 4e6653305c..8d6547dc85 100644 --- a/stepmania/src/CombinedLifeMeterTug.cpp +++ b/stepmania/src/CombinedLifeMeterTug.cpp @@ -24,10 +24,10 @@ CombinedLifeMeterTug::CombinedLifeMeterTug() m_Stream[PLAYER_2].SetZoomX( -1 ); m_sprSeparator.Load( THEME->GetPathG("CombinedLifeMeterTug","separator") ); - this->AddChild( &m_sprSeparator ); + this->AddChild( m_sprSeparator ); m_sprFrame.Load( THEME->GetPathG("CombinedLifeMeterTug","frame") ); - this->AddChild( &m_sprFrame ); + this->AddChild( m_sprFrame ); FOREACH_PlayerNumber( p ) @@ -52,7 +52,7 @@ void CombinedLifeMeterTug::Update( float fDelta ) float fSeparatorX = SCALE( fPercentToShow, 0.f, 1.f, -METER_WIDTH/2.f, +METER_WIDTH/2.f ); - m_sprSeparator.SetX( fSeparatorX ); + m_sprSeparator->SetX( fSeparatorX ); ActorFrame::Update( fDelta ); } diff --git a/stepmania/src/CombinedLifeMeterTug.h b/stepmania/src/CombinedLifeMeterTug.h index 5605579fbe..0287a02a92 100644 --- a/stepmania/src/CombinedLifeMeterTug.h +++ b/stepmania/src/CombinedLifeMeterTug.h @@ -26,8 +26,8 @@ protected: void ChangeLife( PlayerNumber pn, float fPercentToMove ); MeterDisplay m_Stream[NUM_PLAYERS]; - Sprite m_sprSeparator; - Sprite m_sprFrame; + AutoActor m_sprSeparator; + AutoActor m_sprFrame; CharacterHead m_Head[NUM_PLAYERS]; }; diff --git a/stepmania/src/MeterDisplay.cpp b/stepmania/src/MeterDisplay.cpp index 312f9ee9cd..94ecb4881c 100644 --- a/stepmania/src/MeterDisplay.cpp +++ b/stepmania/src/MeterDisplay.cpp @@ -19,8 +19,8 @@ void MeterDisplay::Load( CString sStreamPath, float fStreamWidth, CString sTipPa m_fStreamWidth = fStreamWidth; m_sprStream.Load( sStreamPath ); - m_sprStream.SetZoomX( fStreamWidth / m_sprStream.GetUnzoomedWidth() ); - this->AddChild( &m_sprStream ); + m_sprStream->SetZoomX( fStreamWidth / m_sprStream->GetUnzoomedWidth() ); + this->AddChild( m_sprStream ); m_sprTip.Load( sTipPath ); this->AddChild( m_sprTip ); @@ -44,8 +44,8 @@ void MeterDisplay::LoadFromNode( const CString& sDir, const XNode* pNode ) ActorUtil::ResolvePath( sStreamPath, sDir ); m_sprStream.Load( sStreamPath ); - m_sprStream.SetZoomX( m_fStreamWidth / m_sprStream.GetUnzoomedWidth() ); - this->AddChild( &m_sprStream ); + m_sprStream->SetZoomX( m_fStreamWidth / m_sprStream->GetUnzoomedWidth() ); + this->AddChild( m_sprStream ); } const XNode* pChild = pNode->GetChild( "Tip" ); @@ -64,7 +64,7 @@ void MeterDisplay::SetPercent( float fPercent ) { ASSERT( fPercent >= 0 && fPercent <= 1 ); - m_sprStream.SetCropRight( 1-fPercent ); + m_sprStream->SetCropRight( 1-fPercent ); m_sprTip->SetX( SCALE(fPercent, 0.f, 1.f, -m_fStreamWidth/2, m_fStreamWidth/2) ); } diff --git a/stepmania/src/MeterDisplay.h b/stepmania/src/MeterDisplay.h index 30107bcfdd..66c2963fa9 100644 --- a/stepmania/src/MeterDisplay.h +++ b/stepmania/src/MeterDisplay.h @@ -18,7 +18,7 @@ public: private: float m_fStreamWidth; float m_fPercent; - Sprite m_sprStream; + AutoActor m_sprStream; AutoActor m_sprTip; }; diff --git a/stepmania/src/ScoreDisplayRave.cpp b/stepmania/src/ScoreDisplayRave.cpp index 7fdc8f3d73..b0f0a83935 100644 --- a/stepmania/src/ScoreDisplayRave.cpp +++ b/stepmania/src/ScoreDisplayRave.cpp @@ -31,7 +31,6 @@ ScoreDisplayRave::ScoreDisplayRave() m_textLevel.LoadFromFont( THEME->GetPathF("ScoreDisplayRave","level") ); m_textLevel.SetText( "1" ); - m_textLevel.SetShadowLength( 0 ); this->AddChild( &m_textLevel ); }