From 434359404092c99d2ea23c77f4b1f4c4b94c8ce3 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Thu, 27 Nov 2003 08:02:36 +0000 Subject: [PATCH] add stream separator to CombinedLifeMeterTug --- .../Graphics/CombinedLifeMeterTug separator.png | Bin 0 -> 1025 bytes stepmania/src/CombinedLifeMeterTug.cpp | 7 +++++++ stepmania/src/CombinedLifeMeterTug.h | 3 ++- stepmania/src/ScoreDisplayRave.cpp | 5 +++-- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 stepmania/Themes/default/Graphics/CombinedLifeMeterTug separator.png diff --git a/stepmania/Themes/default/Graphics/CombinedLifeMeterTug separator.png b/stepmania/Themes/default/Graphics/CombinedLifeMeterTug separator.png new file mode 100644 index 0000000000000000000000000000000000000000..e7fe9e5090d8410c29c036a9713325acb312b08f GIT binary patch literal 1025 zcmeAS@N?(olHy`uVBq!ia0vp^Oh7Ec!3-oPJeQdOq&N#aB8wRqxP?KOkzv*x37{ZL zx}&cn1H;C?n%{wwfqaEzk04(LhALGChK6PahM)g|^h*YYQUeBtR|yOZRx=nF#PcV` zA9Z73U}gyL32_DL`40pfAQH$P1*0J_qC&ua)`~ws53`g6`2~ZrfP>b`FF<~@r;B4q q#jT`-Bqk08H8!>e1|}uyU}gr^Sq$1gO;>1v!r9Z+&t;ucLK6V5(LebB literal 0 HcmV?d00001 diff --git a/stepmania/src/CombinedLifeMeterTug.cpp b/stepmania/src/CombinedLifeMeterTug.cpp index 73b1dc0ce8..b9eb6d0d5a 100644 --- a/stepmania/src/CombinedLifeMeterTug.cpp +++ b/stepmania/src/CombinedLifeMeterTug.cpp @@ -33,6 +33,9 @@ CombinedLifeMeterTug::CombinedLifeMeterTug() } m_Stream[PLAYER_2].SetZoomX( -1 ); + m_sprSeparator.Load( THEME->GetPathToG(ssprintf("CombinedLifeMeterTug separator")) ); + this->AddChild( &m_sprSeparator ); + m_sprFrame.Load( THEME->GetPathToG(ssprintf("CombinedLifeMeterTug frame")) ); this->AddChild( &m_sprFrame ); @@ -53,6 +56,10 @@ void CombinedLifeMeterTug::Update( float fDelta ) m_Stream[PLAYER_1].SetPercent( GAMESTATE->m_fTugLifePercentP1 ); m_Stream[PLAYER_2].SetPercent( 1-GAMESTATE->m_fTugLifePercentP1 ); + float fSeparatorX = SCALE( GAMESTATE->m_fTugLifePercentP1, 0.f, 1.f, -METER_WIDTH/2.f, +METER_WIDTH/2.f ); + + m_sprSeparator.SetX( fSeparatorX ); + ActorFrame::Update( fDelta ); } diff --git a/stepmania/src/CombinedLifeMeterTug.h b/stepmania/src/CombinedLifeMeterTug.h index 6d54d05287..c41dc100b4 100644 --- a/stepmania/src/CombinedLifeMeterTug.h +++ b/stepmania/src/CombinedLifeMeterTug.h @@ -34,7 +34,8 @@ public: protected: MeterDisplay m_Stream[NUM_PLAYERS]; - Sprite m_sprFrame; + Sprite m_sprSeparator; + Sprite m_sprFrame; CharacterHead m_Head[NUM_PLAYERS]; }; diff --git a/stepmania/src/ScoreDisplayRave.cpp b/stepmania/src/ScoreDisplayRave.cpp index 24adc7e483..b0c3d3c3ac 100644 --- a/stepmania/src/ScoreDisplayRave.cpp +++ b/stepmania/src/ScoreDisplayRave.cpp @@ -37,11 +37,12 @@ ScoreDisplayRave::ScoreDisplayRave() this->AddChild( &m_sprMeter[i] ); } + this->AddChild( &m_sprFrameOverlay ); + m_textLevel.LoadFromNumbers( THEME->GetPathToN("ScoreDisplayRave level") ); m_textLevel.SetText( "1" ); + m_textLevel.SetShadowLength( 0 ); this->AddChild( &m_textLevel ); - - this->AddChild( &m_sprFrameOverlay ); } void ScoreDisplayRave::Init( PlayerNumber pn )