Edit Mode plays until music end if the music ends after the notes.

This commit is contained in:
Kyzentun
2014-12-09 15:37:06 -07:00
parent 9887b83997
commit 89ed68f86d
3 changed files with 12 additions and 2 deletions
+2
View File
@@ -6,6 +6,8 @@ ________________________________________________________________________________
2014/12/10 2014/12/10
---------- ----------
* [EditMode] Play whole song and play from current beat will now play until
either the music or the notes end, whichever is greater. [kyzentun]
* [Player] "ComboBreakOnImmediateHoldLetGo" theme metric added. [sillybear] * [Player] "ComboBreakOnImmediateHoldLetGo" theme metric added. [sillybear]
2014/12/03 2014/12/03
+9 -2
View File
@@ -4423,6 +4423,13 @@ static LocalizedString DESTROY_ALL_UNSAVED_CHANGES ( "ScreenEdit", "This will de
static LocalizedString REVERT_FROM_DISK ( "ScreenEdit", "Do you want to revert from disk?" ); static LocalizedString REVERT_FROM_DISK ( "ScreenEdit", "Do you want to revert from disk?" );
static LocalizedString SAVE_CHANGES_BEFORE_EXITING ( "ScreenEdit", "Do you want to save changes before exiting?" ); static LocalizedString SAVE_CHANGES_BEFORE_EXITING ( "ScreenEdit", "Do you want to save changes before exiting?" );
int ScreenEdit::GetSongOrNotesEnd()
{
return max(m_iStartPlayingAt, max(m_NoteDataEdit.GetLastRow(),
BeatToNoteRow(m_pSteps->GetTimingData()->GetBeatFromElapsedTime(
GAMESTATE->m_pCurSong->m_fMusicLengthSeconds))));
}
void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAnswers ) void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAnswers )
{ {
GAMESTATE->SetProcessedTimingData(m_pSteps->GetTimingData()); GAMESTATE->SetProcessedTimingData(m_pSteps->GetTimingData());
@@ -4440,7 +4447,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
case play_whole_song: case play_whole_song:
{ {
m_iStartPlayingAt = 0; m_iStartPlayingAt = 0;
m_iStopPlayingAt = m_NoteDataEdit.GetLastRow(); m_iStopPlayingAt= GetSongOrNotesEnd();
TransitionEditState( STATE_PLAYING ); TransitionEditState( STATE_PLAYING );
} }
break; break;
@@ -4454,7 +4461,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
case play_current_beat_to_end: case play_current_beat_to_end:
{ {
m_iStartPlayingAt = BeatToNoteRow(GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat); m_iStartPlayingAt = BeatToNoteRow(GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat);
m_iStopPlayingAt = max( m_iStartPlayingAt, m_NoteDataEdit.GetLastRow() ); m_iStopPlayingAt= GetSongOrNotesEnd();
TransitionEditState( STATE_PLAYING ); TransitionEditState( STATE_PLAYING );
} }
break; break;
+1
View File
@@ -397,6 +397,7 @@ public:
NUM_MAIN_MENU_CHOICES, NUM_MAIN_MENU_CHOICES,
MAIN_MENU_CHOICE_INVALID MAIN_MENU_CHOICE_INVALID
}; };
int GetSongOrNotesEnd();
void HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAnswers ); void HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAnswers );
void HandleMainMenuChoice( MainMenuChoice c ) { const vector<int> v; HandleMainMenuChoice( c, v ); } void HandleMainMenuChoice( MainMenuChoice c ) { const vector<int> v; HandleMainMenuChoice( c, v ); }
MainMenuChoice m_CurrentAction; MainMenuChoice m_CurrentAction;