varying lifebar amounts for HowToPlay screen

This commit is contained in:
Andrew Wong
2003-08-25 19:07:53 +00:00
parent d720fd80ae
commit b114026d40
3 changed files with 17 additions and 1 deletions
+12
View File
@@ -707,3 +707,15 @@ void LifeStream::DrawPrimitives()
}
*/
void LifeMeterBar::FillForHowToPlay(int NumPerfects, int NumMisses)
{
m_iProgressiveLifebar = 0; // disable progressive lifebar
float AmountForPerfect = NumPerfects * m_fLifeDifficulty * 0.008f;
float AmountForMiss = NumMisses / m_fLifeDifficulty * 0.08f;
m_fLifePercentage = AmountForMiss - AmountForPerfect;
CLAMP( m_fLifePercentage, 0.0f, 1.0f );
AfterLifeChanged();
}
+2
View File
@@ -38,6 +38,8 @@ public:
virtual bool FailedEarlier();
void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty);
void FillForHowToPlay(int NumPerfects, int NumMisses);
// this function is solely for HowToPlay
private:
void ResetBarVelocity();
+3 -1
View File
@@ -46,7 +46,9 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
m_LifeMeterBar.SetXY( 480, 40 );
// we need to be a little lower than half if we want to hit
// zero with the actual miss steps. cheat.
m_LifeMeterBar.ChangeLife(TNS_MISS);
// m_LifeMeterBar.ChangeLife(TNS_MISS);
// nicer fix :P it depends on difficulty
m_LifeMeterBar.FillForHowToPlay(4, 6);
// Display random character+pad
if( GAMESTATE->m_pCharacters.size() )