From c7ffbb34532c141720e131ffc606287985171cd3 Mon Sep 17 00:00:00 2001 From: Kyzentun Date: Sat, 31 Jan 2015 14:03:30 -0700 Subject: [PATCH] Lead in time before recording starts in edit mode is now a preference. --- Docs/Changelog_sm5.txt | 5 +++++ Themes/_fallback/Languages/en.ini | 34 +++++++++++++++++++++++++++++++ Themes/_fallback/metrics.ini | 3 ++- Themes/default/metrics.ini | 2 +- src/PrefsManager.cpp | 1 + src/PrefsManager.h | 3 +++ src/ScreenEdit.cpp | 4 ++-- src/ScreenOptionsMasterPrefs.cpp | 18 ++++++++++++++++ 8 files changed, 66 insertions(+), 4 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 3da66d0f3f..54d5565f51 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -4,6 +4,11 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt. ________________________________________________________________________________ +2015/01/31 +---------- +* [EditMode] Want more lead in time before recording starts? + It's a preference. [kyzentun] + 2015/01/20 ---------- * [ScreenSelect] ChoiceNames can be a lua command that is evaluated to get a diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 10505b2a40..cf0de8bf02 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -397,6 +397,7 @@ Edit Courses/Mods=Edit Courses/Mods Edit Songs/Steps=Edit Songs/Steps Practice Songs/Steps=Practice Songs/Steps EditorShowBGChangesPlay=Choose whether to display song backgrounds while playing. +EditRecordModeLeadIn=Set the amount of lead-in time before recording starts. Effect=Effect EffectsReceptor=Add alternative behaviors to the receptors and notes. EffectsArrow=Add alternative behaviors to the receptors and notes. @@ -555,6 +556,38 @@ GamePrefDefaultFail=Immediate fail causes a player to die when their life bar re UserPrefScoringMode=Select the scoring mode to be used when not in a course. [OptionNames] ++0 s=+0 s ++1 s=+1 s ++2 s=+2 s ++3 s=+3 s ++4 s=+4 s ++5 s=+5 s ++6 s=+6 s ++7 s=+7 s ++8 s=+8 s ++9 s=+9 s ++10 s=+10 s ++11 s=+11 s ++12 s=+12 s ++13 s=+13 s ++14 s=+14 s ++15 s=+15 s ++16 s=+16 s ++17 s=+17 s ++18 s=+18 s ++19 s=+19 s ++20 s=+20 s ++21 s=+21 s ++22 s=+22 s ++23 s=+23 s ++24 s=+24 s ++25 s=+25 s ++26 s=+26 s ++27 s=+27 s ++28 s=+28 s ++29 s=+29 s ++30 s=+30 s ++31 s=+31 s 0ms=0ms 10ms=10ms 20ms=20ms @@ -1000,6 +1033,7 @@ Edit scrolling factor=Edit scrolling factor Edit fake=Edit fake segment Editor options=Options EditorShowBGChangesPlay=Show Backgrounds +EditRecordModeLeadIn=Record Lead In Erase step timing=Erase step timing Effect=Effect EffectsReceptor=Effects diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index a5686ff6c9..2d823d19dc 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -4132,7 +4132,7 @@ PlayMusic=false TimerSeconds=-1 ShowStyleIcon=false -LineNames="1,2,3,4,5,6,R1,R2,7,8,9,10,Attacks,11,12,13,14,15,16" +LineNames="1,2,3,4,5,6,R1,R2,7,8,9,10,Attacks,11,12,13,14,15,16,lead_in" # uses legacy speed line Line1="list,Speed" Line2="list,Accel" @@ -4153,6 +4153,7 @@ Line13="list,Assist" Line14="list,Rate" Line15="list,AutoAdjust" Line16="conf,EditorShowBGChangesPlay" +Linelead_in="conf,EditRecordModeLeadIn" OutCancelCommand= [StepsDisplayEdit] diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index f1a18125ff..9805deacea 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -2062,7 +2062,7 @@ TimerOnCommand=visible,false [ScreenPractice] [ScreenEditOptions] -LineNames="1,2,3,4,5,6,R1,R2,7,8,9,10,Attacks,11,12,13,14,15,16,SF" +LineNames="1,2,3,4,5,6,R1,R2,7,8,9,10,Attacks,11,12,13,14,15,16,SF,lead_in" Line1="lua,ArbitrarySpeedMods()" LineSF="lua,OptionRowScreenFilter()" diff --git a/src/PrefsManager.cpp b/src/PrefsManager.cpp index 91f31fe22a..a17b113221 100644 --- a/src/PrefsManager.cpp +++ b/src/PrefsManager.cpp @@ -258,6 +258,7 @@ PrefsManager::PrefsManager() : m_fDebounceCoinInputTime ( "DebounceCoinInputTime", 0 ), m_fPadStickSeconds ( "PadStickSeconds", 0 ), + m_EditRecordModeLeadIn("EditRecordModeLeadIn", 1.0f), m_bForceMipMaps ( "ForceMipMaps", false ), m_bTrilinearFiltering ( "TrilinearFiltering", false ), m_bAnisotropicFiltering ( "AnisotropicFiltering", false ), diff --git a/src/PrefsManager.h b/src/PrefsManager.h index c95692a1e6..4caee949fc 100644 --- a/src/PrefsManager.h +++ b/src/PrefsManager.h @@ -253,6 +253,9 @@ public: // after pressed. Preference m_fPadStickSeconds; + // Lead in time before recording starts in edit mode. + Preference m_EditRecordModeLeadIn; + // Useful for non 4:3 displays and resolutions < 640x480 where texels don't // map directly to pixels. Preference m_bForceMipMaps; diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 8f5d5221fe..f9d17bc839 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -3200,9 +3200,9 @@ void ScreenEdit::TransitionEditState( EditState em ) if( bStateChanging ) AdjustSync::ResetOriginalSyncData(); - /* Give a 1 second lead-in. If we're loading Player, this must be done first. + /* Give a lead-in. If we're loading Player, this must be done first. * Also be sure to get the right timing. */ - float fSeconds = GetAppropriateTiming().GetElapsedTimeFromBeat( NoteRowToBeat(m_iStartPlayingAt) ) - 1; + float fSeconds = GetAppropriateTiming().GetElapsedTimeFromBeat( NoteRowToBeat(m_iStartPlayingAt) ) - PREFSMAN->m_EditRecordModeLeadIn; GAMESTATE->UpdateSongPosition( fSeconds, GetAppropriateTiming(), RageZeroTimer ); GAMESTATE->m_bGameplayLeadIn.Set( false ); diff --git a/src/ScreenOptionsMasterPrefs.cpp b/src/ScreenOptionsMasterPrefs.cpp index 8dca990655..c8395978e8 100644 --- a/src/ScreenOptionsMasterPrefs.cpp +++ b/src/ScreenOptionsMasterPrefs.cpp @@ -680,6 +680,16 @@ static void GlobalOffsetSeconds( int &sel, bool ToSel, const ConfOption *pConfOp MoveMap( sel, pConfOption, ToSel, mapping, ARRAYLEN(mapping) ); } +static void EditRecordModeLeadIn(int &sel, bool to_sel, const ConfOption* conf_option) +{ + float mapping[32]; + for(int i= 0; i < 32; ++i) + { + mapping[i]= static_cast(i); + } + MoveMap(sel, conf_option, to_sel, mapping, ARRAYLEN(mapping)); +} + static vector g_ConfOptions; static void InitializeConfOptions() { @@ -725,6 +735,14 @@ static void InitializeConfOptions() ADD( ConfOption( "AutogenGroupCourses", MovePref, "Off","On" ) ); ADD( ConfOption( "FastLoad", MovePref, "Off","On" ) ); ADD( ConfOption( "FastLoadAdditionalSongs", MovePref, "Off","On" ) ); + { + ConfOption c("EditRecordModeLeadIn", EditRecordModeLeadIn); + for(int i= 0; i < 32; ++i) + { + c.AddOption(ssprintf("%+i s", i)); + } + ADD(c); + } // Background options ADD( ConfOption( "RandomBackgroundMode", MovePref, "Off","Animations","Random Movies" ) );