diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index 06a52a102a..cb9d3af8fa 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -596,6 +596,7 @@ void NoteData::SetTapNoteAttack( int track, int row, CString sMods, float fDurat if(row < 0) return; PadTapNotes(row); + // TODO: mark as TAP_ATTACK and save attack params to array m_TapNotes[track][row]=TAP_TAP; } diff --git a/stepmania/src/NoteData.h b/stepmania/src/NoteData.h index 54fa993be7..0fa67a77ff 100644 --- a/stepmania/src/NoteData.h +++ b/stepmania/src/NoteData.h @@ -51,6 +51,7 @@ public: } void MoveTapNoteTrack(int dest, int src); void SetTapNote(int track, int row, TapNote t); + void SetTapNoteAttack( int track, int row, CString sMods, float fDurationSeconds ); void ClearRange( int iNoteIndexBegin, int iNoteIndexEnd ); void ClearAll(); diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 0686293984..8cffb97df0 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -223,7 +223,7 @@ static Menu g_BGChange( "Background Change", g_BGChangeItems ); static const MenuRow g_InsertAttackItems[] = { - { "Duration", true, 2, { "0:10","0:20","0:30","0:40","0:50","1:00","1:10","1:20","1:30","1:40","1:50","2:00" } }, + { "Duration seconds", true, 2, { "10","20","30","40","50","60","70","80","90" } }, { "Set modifiers", true, 0, { "PRESS START" } }, { NULL, true, 0, { NULL } } }; @@ -233,6 +233,7 @@ static Menu g_InsertAttack( "Insert Attack", g_InsertAttackItems ); // that we can lay the attack note after coming back from // menus. int g_iLastInsertAttackTrack = -1; +float g_fLastInsertAttackDurationSeconds = -1; ScreenEdit::ScreenEdit( CString sName ) : Screen( sName ) { @@ -1264,8 +1265,12 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM ) m_soundMusic.SetPlaybackRate( GAMESTATE->m_SongOptions.m_fMusicRate ); break; case SM_BackFromInsertAttack: - GAMESTATE->StoreSelectedOptions(); // save so that we don't lose the options chosen for edit and playback - SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromInsertAttackModifiers ); + { + int iDurationChoice = ScreenMiniMenu::s_iLastAnswers[0]; + g_fLastInsertAttackDurationSeconds = atof( g_InsertAttackItems[0].choices[iDurationChoice] ); + GAMESTATE->StoreSelectedOptions(); // save so that we don't lose the options chosen for edit and playback + SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromInsertAttackModifiers ); + } break; case SM_BackFromInsertAttackModifiers: { @@ -1273,6 +1278,7 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM ) CString sMods = poChosen.GetString(); int row = BeatToNoteRow( GAMESTATE->m_fSongBeat ); m_NoteFieldEdit.SetTapNote( g_iLastInsertAttackTrack, row, TAP_TAP ); + m_NoteFieldEdit.SetTapNoteAttack( g_iLastInsertAttackTrack, row, sMods, g_fLastInsertAttackDurationSeconds ); GAMESTATE->RestoreSelectedOptions(); // restore the edit and playback options } break;