diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index ace7105224..c8c1ac9feb 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -4,6 +4,23 @@ 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/03/08 +---------- +* [EditMode] Clearing an area now prompts for confirmation if it contains + EditClearPromptThreshold notes or more. EditClearPromptThreshold is a + preference that can be set in the Advanced Options section, or in the + options in Edit Mode. [kyzentun] + +2015/03/05 +---------- +* [Graphics] DX9 support improved, giving a large speed boost and fixing the + problem that made people get stuck with 16bit color. [xwidghet] + +2015/03/04 +---------- +* [Loading] The song length from the cache is used now. This cut loading time + by 30% for kyz. [kyzentun] + 2015/03/01 ---------- * [SelectMusic] Select Music now plays music file named by #PREVIEW tag if @@ -14,10 +31,18 @@ ________________________________________________________________________________ * [foreach] foreach_ordered lua function now works on tables that have both number and string keys. Number keys are iterated over first. [kyzentun] +2015/02/28 +---------- +* [General] Pause/Break key now toggles "action" sounds off or on. There is + also a button in the F3 debug menu (press A, there are so many that it is + off the bottom) for people that don't have a Pause/Break key. [kyzentun] + 2015/02/27 ---------- * [ActorFrame] Fixed RemoveChild and RemoveAllChildren lua functions to delete the children instead of leaking memory. [kyzentun] +* [Font] Asserts and other things that caused Stepmania to crash on font + mistakes now emit non-fatal errors. [kyzentun] 2015/02/26 ---------- diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 52a14ab7f6..44b9a91eed 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -398,6 +398,7 @@ 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. +EditClearPromptThreshold=Set the amount of notes that can be cleared without prompting. Effect=Effect EffectsReceptor=Add alternative behaviors to the receptors and notes. EffectsArrow=Add alternative behaviors to the receptors and notes. @@ -599,6 +600,7 @@ UserPrefScoringMode=Select the scoring mode to be used when not in a course. 80ms=80ms 90ms=90ms 100ms=100ms +-1=-1 0=0 0.25x=0.25x 0.3x=0.3x @@ -663,6 +665,10 @@ x2.5=2.5x 8=8 8th=8th 9=9 +50=50 +100=100 +1000=1000 +1000000=1000000 Actual=Actual Add=Additive All Music=All Music @@ -1034,6 +1040,7 @@ Edit fake=Edit fake segment Editor options=Options EditorShowBGChangesPlay=Show Backgrounds EditRecordModeLeadIn=Record Lead In +EditClearPromptThreshold=Clear Prompt Amount Erase step timing=Erase step timing Effect=Effect EffectsReceptor=Effects @@ -1475,6 +1482,7 @@ Zoom In Camera=Zoom In Camera '%s' is not a track id.='%s' is not a track id. Adding New Attack=Enter the new modifier for this attack.\nThe length can be adjusted later.\nLeave it blank to cancel. Adding New Mod=Please enter the new modifier for this attack.\n\nLeave it blank to cancel. +Are you sure you want to clear %d notes?=Are you sure you want to clear %d notes? Edit Existing Mod=Please adjust the present modifier below.\n\nLeave it blank to erase the mod. Edit Attack Start=Enter the time when this attack starts. Edit Attack Length=Enter how long it takes for this attack to finish. diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index f67ee80759..857cbb29a8 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -3012,7 +3012,7 @@ Line20="conf,VisualDelaySeconds" Fallback="ScreenOptionsServiceChild" NextScreen="ScreenOptionsService" PrevScreen="ScreenOptionsService" -LineNames="3,4,8,SI,SM,HN,11,13,14,15,16,28,29,30,31" +LineNames="3,4,8,SI,SM,HN,11,13,14,15,16,28,29,30,31,ECPT" #LineScore="lua,UserPrefScoringMode()" Line3="conf,TimingWindowScale" Line4="conf,LifeDifficulty" @@ -3029,6 +3029,7 @@ Line28="conf,AutogenSteps" Line29="conf,AutogenGroupCourses" Line30="conf,FastLoad" Line31="conf,FastLoadAdditionalSongs" +LineECPT="conf,EditClearPromptThreshold" # unused options #Line2="conf,ScoringType" @@ -4134,7 +4135,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,lead_in" +LineNames="1,2,3,4,5,6,R1,R2,7,8,9,10,Attacks,11,12,13,14,15,16,lead_in,ECPT" # uses legacy speed line Line1="list,Speed" Line2="list,Accel" @@ -4156,6 +4157,7 @@ Line14="list,Rate" Line15="list,AutoAdjust" Line16="conf,EditorShowBGChangesPlay" Linelead_in="conf,EditRecordModeLeadIn" +LineECPT="conf,EditClearPromptThreshold" OutCancelCommand= [StepsDisplayEdit] diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index e0b870373a..97d67c063a 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -1322,7 +1322,7 @@ LineFlashyCombo="lua,ThemePrefRow('FlashyCombo')" [ScreenOptionsGraphicsSound] [ScreenOptionsAdvanced] -LineNames="3,4,8,SI,SM,11,13,14,16,28,29,30,RollCombo" +LineNames="3,4,8,SI,SM,11,13,14,16,28,29,30,RollCombo,ECPT" LineRollCombo="lua,ThemePrefRow('ComboOnRolls')" [ScreenAppearanceOptions] @@ -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,lead_in" +LineNames="1,2,3,4,5,6,R1,R2,7,8,9,10,Attacks,11,12,13,14,15,16,SF,lead_in,ECPT" Line1="lua,ArbitrarySpeedMods()" LineSF="lua,OptionRowScreenFilter()" diff --git a/src/NoteData.cpp b/src/NoteData.cpp index bd8de09ef2..f7c6f2f7d7 100644 --- a/src/NoteData.cpp +++ b/src/NoteData.cpp @@ -500,6 +500,21 @@ int NoteData::GetNumTapNotes( int iStartIndex, int iEndIndex ) const return iNumNotes; } +int NoteData::GetNumTapNotesNoTiming( int iStartIndex, int iEndIndex ) const +{ + int iNumNotes = 0; + for( int t=0; t m_EditRecordModeLeadIn; + // User is prompted on clearing an area with more than this note count. + Preference m_EditClearPromptThreshold; // Useful for non 4:3 displays and resolutions < 640x480 where texels don't // map directly to pixels. diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index c90a9d133a..32ee766466 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -90,6 +90,7 @@ AutoScreenMessage( SM_BackFromKeysoundTrack ); AutoScreenMessage( SM_BackFromNewKeysound ); AutoScreenMessage( SM_DoRevertToLastSave ); AutoScreenMessage( SM_DoRevertFromDisk ); +AutoScreenMessage( SM_ConfirmClearArea ); AutoScreenMessage( SM_BackFromTimingDataInformation ); AutoScreenMessage( SM_BackFromDifficultyMeterChange ); AutoScreenMessage( SM_BackFromBeat0Change ); @@ -4131,6 +4132,14 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM ) SetDirty( false ); } } + else if(SM == SM_ConfirmClearArea) + { + if(ScreenPrompt::s_LastAnswer == ANSWER_YES) + { + m_NoteDataEdit.ClearRange( + m_NoteFieldEdit.m_iBeginMarker, m_NoteFieldEdit.m_iEndMarker); + } + } else if( SM == SM_DoEraseStepTiming ) { if( ScreenPrompt::s_LastAnswer == ANSWER_YES ) @@ -4764,6 +4773,7 @@ static LocalizedString ENTER_ARBITRARY_MAPPING( "ScreenEdit", "Enter the new tra static LocalizedString TOO_MANY_TRACKS("ScreenEdit", "Too many tracks specified."); static LocalizedString NOT_A_TRACK("ScreenEdit", "'%s' is not a track id."); static LocalizedString OUT_OF_RANGE_ID("ScreenEdit", "Entry %d, '%d', is out of range 1 to %d."); +static LocalizedString CONFIRM_CLEAR("ScreenEdit", "Are you sure you want to clear %d notes?"); static bool ConvertMappingInputToMapping(RString const& mapstr, int* mapping, RString& error) { @@ -4875,7 +4885,17 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector &iAn break; case clear: { - m_NoteDataEdit.ClearRange( m_NoteFieldEdit.m_iBeginMarker, m_NoteFieldEdit.m_iEndMarker ); + int note_count= m_NoteDataEdit.GetNumTapNotesNoTiming( + m_NoteFieldEdit.m_iBeginMarker, m_NoteFieldEdit.m_iEndMarker); + if(note_count >= PREFSMAN->m_EditClearPromptThreshold) + { + ScreenPrompt::Prompt(SM_ConfirmClearArea, ssprintf(CONFIRM_CLEAR.GetValue(), note_count), PROMPT_YES_NO); + } + else + { + m_NoteDataEdit.ClearRange( + m_NoteFieldEdit.m_iBeginMarker, m_NoteFieldEdit.m_iEndMarker); + } } break; case quantize: diff --git a/src/ScreenOptionsMasterPrefs.cpp b/src/ScreenOptionsMasterPrefs.cpp index c8395978e8..c901820fbb 100644 --- a/src/ScreenOptionsMasterPrefs.cpp +++ b/src/ScreenOptionsMasterPrefs.cpp @@ -690,6 +690,12 @@ static void EditRecordModeLeadIn(int &sel, bool to_sel, const ConfOption* conf_o MoveMap(sel, conf_option, to_sel, mapping, ARRAYLEN(mapping)); } +static void EditClearPromptThreshold(int& sel, bool to_sel, const ConfOption* conf_option) +{ + int mapping[]= {-1, 10, 50, 100, 1000, 1000000}; + MoveMap(sel, conf_option, to_sel, mapping, ARRAYLEN(mapping)); +} + static vector g_ConfOptions; static void InitializeConfOptions() { @@ -743,6 +749,7 @@ static void InitializeConfOptions() } ADD(c); } + ADD(ConfOption("EditClearPromptThreshold", EditClearPromptThreshold, "-1", "10", "50", "100", "1000", "1000000")); // Background options ADD( ConfOption( "RandomBackgroundMode", MovePref, "Off","Animations","Random Movies" ) );