diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 2263fcc511..a6b6c015c7 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,12 @@ ________________________________________________________________________________ StepMania 5.0 Preview 2 | 20110??? -------------------------------------------------------------------------------- +2011/06/11 +---------- +* [ScreenEdit] Allow setting the Music Preview via the Alter Menu. Just select + your area, enter the menu, and choose "Designate as Music Preview". No more + math calculations needed! [Wolfman2000] + 2011/06/10 ---------- * [ScreenEdit] Split the Area Menu into the Area Menu and Alter Menu. Use the diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 4bdf6c7716..1e0a33cef6 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -833,6 +833,7 @@ DelayedTextureDelete=Keep Textures In Memory Delete=Delete Delete beat and shift up=Delete beat and shift up Description=Description +Designate as Music Preview=Designate as Music Preview Difficulty=Difficulty Display BPM=Display BPM DisplayAspectRatio=Aspect Ratio diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index b5ff78ffae..b3feb57c2e 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -536,6 +536,8 @@ static MenuDef g_AlterMenu( EditMode_Practice, true, true, 0, NULL ), MenuRowDef(ScreenEdit::record, "Record in selection", true, EditMode_Practice, true, true, 0, NULL ), + MenuRowDef(ScreenEdit::preview_designation, "Designate as Music Preview", true, + EditMode_Full, true, true, 0, NULL ), MenuRowDef(ScreenEdit::convert_to_pause, "Convert selection to pause", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef(ScreenEdit::convert_to_delay, "Convert selection to delay", true, @@ -3698,6 +3700,15 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector &iAn m_iStopPlayingAt = m_NoteFieldEdit.m_iEndMarker; TransitionEditState( STATE_RECORDING ); break; + case preview_designation: + { + ASSERT( m_NoteFieldEdit.m_iBeginMarker!=-1 && m_NoteFieldEdit.m_iEndMarker!=-1 ); + float fMarkerStart = GetAppropriateTiming().GetElapsedTimeFromBeat( NoteRowToBeat(m_NoteFieldEdit.m_iBeginMarker) ); + float fMarkerEnd = GetAppropriateTiming().GetElapsedTimeFromBeat( NoteRowToBeat(m_NoteFieldEdit.m_iEndMarker) ); + GAMESTATE->m_pCurSong->m_fMusicSampleStartSeconds = fMarkerStart; + GAMESTATE->m_pCurSong->m_fMusicSampleLengthSeconds = fMarkerEnd - fMarkerStart; + break; + } case convert_to_pause: { ASSERT_M( m_NoteFieldEdit.m_iBeginMarker!=-1 && m_NoteFieldEdit.m_iEndMarker!=-1, "Attempted to convert beats outside the notefield to pauses!" ); diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index f3e4a912e5..2b3119a10a 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -384,6 +384,7 @@ public: tempo, play, record, + preview_designation, convert_to_pause, convert_to_delay, convert_to_warp,