From a8882ff9d002796c2476d9fd5d9b0f7569c5dc0b Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 16 May 2004 05:06:58 +0000 Subject: [PATCH] don't clamp super meter --- stepmania/src/CombinedLifeMeterTug.cpp | 10 ++++++---- stepmania/src/GraphDisplay.cpp | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/stepmania/src/CombinedLifeMeterTug.cpp b/stepmania/src/CombinedLifeMeterTug.cpp index a503b8cb2f..a432fb48f7 100644 --- a/stepmania/src/CombinedLifeMeterTug.cpp +++ b/stepmania/src/CombinedLifeMeterTug.cpp @@ -56,10 +56,13 @@ CombinedLifeMeterTug::CombinedLifeMeterTug() void CombinedLifeMeterTug::Update( float fDelta ) { - m_Stream[PLAYER_1].SetPercent( GAMESTATE->m_fTugLifePercentP1 ); - m_Stream[PLAYER_2].SetPercent( 1-GAMESTATE->m_fTugLifePercentP1 ); + float fPercentToShow = GAMESTATE->m_fTugLifePercentP1; + CLAMP( fPercentToShow, 0.f, 1.f ); - float fSeparatorX = SCALE( GAMESTATE->m_fTugLifePercentP1, 0.f, 1.f, -METER_WIDTH/2.f, +METER_WIDTH/2.f ); + m_Stream[PLAYER_1].SetPercent( fPercentToShow ); + m_Stream[PLAYER_2].SetPercent( 1-fPercentToShow ); + + float fSeparatorX = SCALE( fPercentToShow, 0.f, 1.f, -METER_WIDTH/2.f, +METER_WIDTH/2.f ); m_sprSeparator.SetX( fSeparatorX ); @@ -128,5 +131,4 @@ void CombinedLifeMeterTug::ChangeLife( PlayerNumber pn, float fPercentToMove ) case PLAYER_2: GAMESTATE->m_fTugLifePercentP1 -= fPercentToMove; break; default: ASSERT(0); } - CLAMP( GAMESTATE->m_fTugLifePercentP1, 0, 1 ); } diff --git a/stepmania/src/GraphDisplay.cpp b/stepmania/src/GraphDisplay.cpp index f4b1d63ae4..bbc02bdd76 100644 --- a/stepmania/src/GraphDisplay.cpp +++ b/stepmania/src/GraphDisplay.cpp @@ -44,6 +44,8 @@ void GraphDisplay::LoadFromStageStats( const StageStats &s, PlayerNumber pn ) memcpy( m_LastValues, m_CurValues, sizeof(m_CurValues) ); m_Position = 0; s.GetLifeRecord( pn, m_DestValues, VALUE_RESOLUTION ); + for( int i=0; i