show offset change when a song's bpm or offset changes (useful for obtaining global gap)
This commit is contained in:
@@ -147,6 +147,8 @@ public:
|
|||||||
bool m_bPastHereWeGo;
|
bool m_bPastHereWeGo;
|
||||||
static const float MUSIC_SECONDS_INVALID;
|
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 ResetMusicStatistics(); // Call this when it's time to play a new song. Clears the values above.
|
||||||
void UpdateSongPosition(float fPositionSeconds);
|
void UpdateSongPosition(float fPositionSeconds);
|
||||||
|
|
||||||
|
|||||||
@@ -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_HUMAN_BATTLE:
|
||||||
case PLAY_MODE_CPU_BATTLE:
|
case PLAY_MODE_CPU_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
|
{
|
||||||
|
float m_fOffsetChange = GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds - GAMESTATE->m_fOldOffset;
|
||||||
sMessage = ssprintf(
|
sMessage = ssprintf(
|
||||||
|
"Change to offset: %f\n\n"
|
||||||
"You have changed the offset or BPM of\n"
|
"You have changed the offset or BPM of\n"
|
||||||
"%s.\n"
|
"%s.\n"
|
||||||
"Would you like to save these changes back\n"
|
"Would you like to save these changes back\n"
|
||||||
"to the song file?\n"
|
"to the song file?\n"
|
||||||
"Choosing NO will discard your changes.",
|
"Choosing NO will discard your changes.",
|
||||||
|
m_fOffsetChange,
|
||||||
GAMESTATE->m_pCurSong->GetFullDisplayTitle().c_str() );
|
GAMESTATE->m_pCurSong->GetFullDisplayTitle().c_str() );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
case PLAY_MODE_ONI:
|
case PLAY_MODE_ONI:
|
||||||
|
|||||||
Reference in New Issue
Block a user