From 808f7ab7d54e300b07e63c27030fc2bba2cdc193 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 20 Jan 2005 02:21:55 +0000 Subject: [PATCH] fix m_meterSongPosition finishing too soon --- stepmania/src/ScreenGameplay.cpp | 17 +++-------------- stepmania/src/ScreenGameplay.h | 4 ---- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index c62024c486..78bb6974c3 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1092,13 +1092,6 @@ void ScreenGameplay::LoadNextSong() * -Chris */ m_bZeroDeltaOnNextUpdate = true; - - // (Re)Calculate the song position meter - m_fSongPosMeterOffset = GAMESTATE->m_pCurSong->m_Timing.GetElapsedTimeFromBeat( - GAMESTATE->m_pCurSong->m_fFirstBeat ); - m_fSongPosMeterEnd = ( GAMESTATE->m_pCurSong->m_Timing.GetElapsedTimeFromBeat( - GAMESTATE->m_pCurSong->m_fLastBeat ) - m_fSongPosMeterOffset ); - // // Load cabinet lights data // @@ -1537,13 +1530,9 @@ void ScreenGameplay::Update( float fDeltaTime ) // // update song position meter // - // IMHHO, The song position bar is best used to represent where in the - // step sequence the players are. It looks "better" that way, showing a - // song "depleting" as the players wear on. So, it starts "ticking" at - // the first arrow and winds down to the very end. - float fPercentPositionSong = SCALE( GAMESTATE->m_fMusicSeconds, m_fSongPosMeterOffset, - m_fSongPosMeterEnd, 0.0f, 1.0f ); - + float fSongStartSeconds = GAMESTATE->m_pCurSong->m_Timing.GetElapsedTimeFromBeat( GAMESTATE->m_pCurSong->m_fFirstBeat ); + float fSongEndSeconds = GAMESTATE->m_pCurSong->m_Timing.GetElapsedTimeFromBeat( GAMESTATE->m_pCurSong->m_fLastBeat ); + float fPercentPositionSong = SCALE( GAMESTATE->m_fMusicSeconds, fSongStartSeconds, fSongEndSeconds, 0.0f, 1.0f ); CLAMP( fPercentPositionSong, 0, 1 ); m_meterSongPosition.SetPercent( fPercentPositionSong ); diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index e4b4a879b8..d2c0ac0e3d 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -162,10 +162,6 @@ protected: BeginnerHelper m_BeginnerHelper; NoteData m_CabinetLightsNoteData; - -private: - float m_fSongPosMeterEnd; - float m_fSongPosMeterOffset; };