diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 5221f213de..cca665ecc4 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -852,6 +852,8 @@ Edit tickcount=Edit tickcount Edit combo=Edit combo Edit label=Edit label Edit warp=Edit warp +Edit speed (percent)=Edit speed (percent) +Edit speed (wait)=Edit speed (wait in beats) Editor options=Options EditorShowBGChangesPlay=Show Backgrounds Erase step timing=Erase step timing @@ -1227,6 +1229,8 @@ Enter a new Tickcount value.=Enter a new Tickcount value. Enter a new Combo value.=Enter a new Combo value. Enter a new Label value.=Enter a name for this section of the chart. Enter a new Warp value.=Enter the beat you will warp to when you reach this point. +Enter a new Speed percent value.=Enter the ratio for speed scrolling. 1 is the default. +Enter a new Speed wait value.=Enter how long in beats it takes to change. 0 is instant. Are you sure you want to erase this chart's timing data?=Are you sure you want to erase this chart's timing data? Enter a new artist transliteration.=Enter a new artist transliteration. Enter a new artist.=Enter a new artist. diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 38ff20c18a..aba80b9090 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -83,6 +83,8 @@ AutoScreenMessage( SM_BackFromTickcountChange ); AutoScreenMessage( SM_BackFromComboChange ); AutoScreenMessage( SM_BackFromLabelChange ); AutoScreenMessage( SM_BackFromWarpChange ); +AutoScreenMessage( SM_BackFromSpeedPercentChange ); +AutoScreenMessage( SM_BackFromSpeedWaitChange ); AutoScreenMessage( SM_DoEraseStepTiming ); AutoScreenMessage( SM_DoSaveAndExit ); AutoScreenMessage( SM_DoExit ); @@ -576,7 +578,9 @@ static MenuDef g_TimingDataInformation( MenuRowDef( ScreenEdit::tickcount, "Edit tickcount", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::combo, "Edit combo", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::warp, "Edit warp", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::erase_step_timing, "Erase step timing", true, EditMode_Full, true, true, 0, NULL ) + MenuRowDef( ScreenEdit::speed_percent, "Edit speed (percent)", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::speed_wait, "Edit speed (wait)", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::erase_step_timing, "Erase step timing", true, EditMode_Full, true, true, 0, NULL ) ); enum { song_bganimation, song_movie, song_bitmap, global_bganimation, global_movie, global_movie_song_group, global_movie_song_group_and_genre, dynamic_random, baked_random, none }; @@ -2759,6 +2763,22 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM ) GetAppropriateTiming().SetWarpAtBeat( GetBeat(), fWarp ); SetDirty( true ); } + else if( SM == SM_BackFromSpeedPercentChange ) + { + float fNum = StringToFloat( ScreenTextEntry::s_sLastAnswer ); + GetAppropriateTiming().SetSpeedPercentAtBeat( GetBeat(), fNum ); + SetDirty( true ); + } + else if ( SM == SM_BackFromSpeedWaitChange ) + { + float fDen = StringToFloat( ScreenTextEntry::s_sLastAnswer ); + if( fDen >= 0) + { + GetAppropriateTiming().SetSpeedWaitAtBeat( GetBeat(), fDen ); + } + SetDirty( true ); + } + else if( SM == SM_BackFromBGChange ) { HandleBGChangeChoice( (BGChangeChoice)ScreenMiniMenu::s_iLastRowCode, ScreenMiniMenu::s_viLastAnswers ); @@ -3176,10 +3196,14 @@ void ScreenEdit::DisplayTimingMenu() g_TimingDataInformation.rows[tickcount].SetOneUnthemedChoice( ssprintf("%d", pTime.GetTickcountAtBeat( fBeat ) ) ); g_TimingDataInformation.rows[combo].SetOneUnthemedChoice( ssprintf("%d", pTime.GetComboAtBeat( fBeat ) ) ); g_TimingDataInformation.rows[warp].SetOneUnthemedChoice( ssprintf("%.5f", pTime.GetWarpAtBeat( fBeat ) ) ); + g_TimingDataInformation.rows[speed_percent].SetOneUnthemedChoice( ssprintf("%.5f", pTime.GetSpeedPercentAtBeat( fBeat ) ) ); + g_TimingDataInformation.rows[speed_wait].SetOneUnthemedChoice( ssprintf("%.5f", pTime.GetSpeedWaitAtBeat( fBeat ) ) ); g_TimingDataInformation.rows[tickcount].bEnabled = GAMESTATE->m_bIsEditorStepTiming; g_TimingDataInformation.rows[combo].bEnabled = GAMESTATE->m_bIsEditorStepTiming; g_TimingDataInformation.rows[warp].bEnabled = GAMESTATE->m_bIsEditorStepTiming; + g_TimingDataInformation.rows[speed_percent].bEnabled = GAMESTATE->m_bIsEditorStepTiming; + g_TimingDataInformation.rows[speed_wait].bEnabled = GAMESTATE->m_bIsEditorStepTiming; EditMiniMenu( &g_TimingDataInformation, SM_BackFromTimingDataInformation ); } @@ -3858,6 +3882,8 @@ static LocalizedString ENTER_TICKCOUNT_VALUE ( "ScreenEdit", "Enter a new Tick static LocalizedString ENTER_COMBO_VALUE ( "ScreenEdit", "Enter a new Combo value." ); static LocalizedString ENTER_LABEL_VALUE ( "ScreenEdit", "Enter a new Label value." ); static LocalizedString ENTER_WARP_VALUE ( "ScreenEdit", "Enter a new Warp value." ); +static LocalizedString ENTER_SPEED_PERCENT_VALUE ( "ScreenEdit", "Enter a new Speed percent value." ); +static LocalizedString ENTER_SPEED_WAIT_VALUE ( "ScreenEdit", "Enter a new Speed wait value." ); static LocalizedString CONFIRM_TIMING_ERASE ( "ScreenEdit", "Are you sure you want to erase this chart's timing data?" ); void ScreenEdit::HandleTimingDataInformationChoice( TimingDataInformationChoice c, const vector &iAnswers ) { @@ -3941,6 +3967,22 @@ void ScreenEdit::HandleTimingDataInformationChoice( TimingDataInformationChoice 10 ); break; + case speed_percent: + ScreenTextEntry::TextEntry( + SM_BackFromSpeedPercentChange, + ENTER_SPEED_PERCENT_VALUE, + ssprintf( "%.5f", GetAppropriateTiming().GetSpeedSegmentAtBeat( GetBeat() ).m_fPercent ), + 10 + ); + break; + case speed_wait: + ScreenTextEntry::TextEntry( + SM_BackFromSpeedWaitChange, + ENTER_SPEED_WAIT_VALUE, + ssprintf( "%.5f", GetAppropriateTiming().GetSpeedSegmentAtBeat( GetBeat() ).m_fWait ), + 10 + ); + break; case erase_step_timing: ScreenPrompt::Prompt( SM_DoEraseStepTiming, CONFIRM_TIMING_ERASE , PROMPT_YES_NO, ANSWER_NO ); break; diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index 68eabff5f5..0f31a3e759 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -496,6 +496,9 @@ public: tickcount, combo, warp, +// speed, + speed_percent, + speed_wait, erase_step_timing, NUM_TIMING_DATA_INFORMATION_CHOICES };