From b3d8ee0b44c4a17d957dc9e7948da4f99224c5e9 Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Sun, 10 Aug 2003 13:34:55 +0000 Subject: [PATCH] show offset change when a song's bpm or offset changes (useful for obtaining global gap) --- stepmania/src/GameState.h | 2 ++ stepmania/src/ScreenGameplay.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 3ea5e314fb..7bf1980afa 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -147,6 +147,8 @@ public: bool m_bPastHereWeGo; static const float MUSIC_SECONDS_INVALID; + float m_fOldOffset; // used on offset screen to calculate difference + void ResetMusicStatistics(); // Call this when it's time to play a new song. Clears the values above. void UpdateSongPosition(float fPositionSeconds); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 4d2cf68283..84de176c6b 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -212,6 +212,8 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay") /* */ + // init old offset in case offset changes in song + GAMESTATE->m_fOldOffset = GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds; @@ -1468,13 +1470,18 @@ void ShowSavePrompt( ScreenMessage SM_SendWhenDone ) case PLAY_MODE_HUMAN_BATTLE: case PLAY_MODE_CPU_BATTLE: case PLAY_MODE_RAVE: + { + float m_fOffsetChange = GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds - GAMESTATE->m_fOldOffset; sMessage = ssprintf( + "Change to offset: %f\n\n" "You have changed the offset or BPM of\n" "%s.\n" "Would you like to save these changes back\n" "to the song file?\n" "Choosing NO will discard your changes.", + m_fOffsetChange, GAMESTATE->m_pCurSong->GetFullDisplayTitle().c_str() ); + } break; case PLAY_MODE_NONSTOP: case PLAY_MODE_ONI: