From beac79e4f36757719d4f9bfa18a1f1b750ca69c7 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 2 May 2005 03:31:53 +0000 Subject: [PATCH] separate milestones for 500 and 1000 --- stepmania/src/Combo.cpp | 20 +++++++++++++------- stepmania/src/Combo.h | 3 ++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/stepmania/src/Combo.cpp b/stepmania/src/Combo.cpp index 75c0a98974..91454c2c3c 100644 --- a/stepmania/src/Combo.cpp +++ b/stepmania/src/Combo.cpp @@ -40,8 +40,11 @@ void Combo::Load( PlayerState *pPlayerState, PlayerStageStats *pPlayerStageStats FULL_COMBO_BROKEN_COMMAND .Load(m_sName,"FullComboBrokenCommand"); SHOW_MISS_COMBO .Load(m_sName,"ShowMissCombo"); - m_sprMilestone.Load( THEME->GetPathG(m_sName,"milestone") ); - this->AddChild( m_sprMilestone ); + m_spr100Milestone.Load( THEME->GetPathG(m_sName,"100milestone") ); + this->AddChild( m_spr100Milestone ); + + m_spr1000Milestone.Load( THEME->GetPathG(m_sName,"1000milestone") ); + this->AddChild( m_spr1000Milestone ); m_sprComboLabel.Load( THEME->GetPathG(m_sName,"label") ); m_sprComboLabel->StopAnimating(); @@ -81,13 +84,14 @@ void Combo::SetCombo( int iCombo, int iMisses ) if( m_iLastSeenCombo == -1 ) // first update, don't set bIsMilestone=true m_iLastSeenCombo = iCombo; - bool bIsMilestone = false; + bool b100Milestone = false; + bool b1000Milestone = false; for( int i=m_iLastSeenCombo+1; i<=iCombo; i++ ) { if( i <= 1000 ) - bIsMilestone |= ((i % 100) == 0); + b100Milestone |= ((i % 100) == 0); else - bIsMilestone |= ((i % 500) == 0); + b1000Milestone |= ((i % 1000) == 0); } m_iLastSeenCombo = iCombo; @@ -111,8 +115,10 @@ void Combo::SetCombo( int iCombo, int iMisses ) sprLabel->FinishTweening(); sprLabel->RunCommands( PULSE_COMMAND ); - if( bIsMilestone ) - m_sprMilestone->PlayCommand( "Milestone" ); + if( b100Milestone ) + m_spr100Milestone->PlayCommand( "Milestone" ); + if( b1000Milestone ) + m_spr1000Milestone->PlayCommand( "Milestone" ); // don't show a colored combo until 1/4 of the way through the song bool bPastMidpoint = GAMESTATE->GetCourseSongIndex()>0 || diff --git a/stepmania/src/Combo.h b/stepmania/src/Combo.h index cef0e0726f..97b19a8ab0 100644 --- a/stepmania/src/Combo.h +++ b/stepmania/src/Combo.h @@ -42,7 +42,8 @@ protected: PlayerState *m_pPlayerState; PlayerStageStats *m_pPlayerStageStats; - AutoActor m_sprMilestone; + AutoActor m_spr100Milestone; + AutoActor m_spr1000Milestone; AutoActor m_sprComboLabel; AutoActor m_sprMissesLabel; BitmapText m_textNumber;