add GetSongPercent

This commit is contained in:
Glenn Maynard
2003-10-23 06:16:29 +00:00
parent 1b33b46e29
commit fd6da1d267
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -240,6 +240,12 @@ void GameState::UpdateSongPosition(float fPositionSeconds)
// LOG->Trace( "m_fMusicSeconds = %f, m_fSongBeat = %f, m_fCurBPS = %f, m_bFreeze = %f", m_fMusicSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze );
}
float GameState::GetSongPercent( float beat ) const
{
/* 0 = first step; 1 = last step */
return (beat - m_pCurSong->m_fFirstBeat) / m_pCurSong->m_fLastBeat;
}
int GameState::GetStageIndex()
{
return m_iCurrentStageIndex;
+1
View File
@@ -157,6 +157,7 @@ public:
void ResetMusicStatistics(); // Call this when it's time to play a new song. Clears the values above.
void UpdateSongPosition(float fPositionSeconds);
float GetSongPercent( float beat ) const;
//
// Stage Statistics: