From 2e0649f6f44265e9a89ebf009e5a60b89ba35b30 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Mon, 16 May 2011 11:30:39 -0400 Subject: [PATCH] [splittiming] Let Fakes be edited. Also expand on some descriptions. --- Themes/_fallback/Languages/en.ini | 18 ++++++++++-------- src/ScreenEdit.cpp | 24 ++++++++++++++++++++++++ src/ScreenEdit.h | 1 + 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 2c5192464e..9b9fbf2f51 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -857,6 +857,7 @@ Edit warp=Edit warp Edit speed (percent)=Edit speed (percent) Edit speed (wait)=Edit speed (length) Edit speed (mode)=Edit speed (mode) +Edit fake=Edit fake segment Editor options=Options EditorShowBGChangesPlay=Show Backgrounds Erase step timing=Erase step timing @@ -1223,18 +1224,19 @@ Can't undo - no undo data.=Can't undo - no undo data. Do you want to revert from disk?=Do you want to revert from disk? Do you want to revert to your last save?=Do you want to revert to your last save? Do you want to save changes before exiting?=Do you want to save changes before exiting? -Enter a new BPM value.=Enter a new BPM value. -Enter a new Stop value.=Enter a new Stop value. -Enter a new Delay value.=Enter a new Delay value. +Enter a new BPM value.=Enter a new BPM value.\n\nEnter the previous value to remove. +Enter a new Stop value.=Enter a new Stop value.\n\nType "0" to remove. +Enter a new Delay value.=Enter a new Delay value.\n\nType "0" to remove. Enter a new Time Signature numerator value.=Enter the number of beats per measure. Enter a new Time Signature denominator value.=Enter the note value that represents one beat. -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 number of beats you will warp over. -Enter a new Speed percent value.=Enter the ratio for speed scrolling.\n\n1 is the default scroll. +Enter a new Tickcount value.=Enter a new Tickcount value.\n\nEnter the previous value to remove. +Enter a new Combo value.=Enter a new Combo value.\n\nEnter the previous value to remove. +Enter a new Label value.=Enter a name for this section of the chart.\n\nEnter a previously used label to remove. +Enter a new Warp value.=Enter the number of beats you will warp over.\n\nType "0" to remove this segment. +Enter a new Speed percent value.=Enter the ratio for speed scrolling.\n\nEnter the previous value to remove.\n\n1 is the default scroll. Enter a new Speed wait value.=Enter how long in seconds/beats it takes to change.\n\n0 is instant. Enter a new Speed mode value.=Enter how this segment is handled.\n\nType "0" for beats, "1" for seconds. +Enter a new Fake value.=Enter the number of beats that won't be judged.\n\nType "0" to remove this. 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 680a9598af..92f4f1d6aa 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -86,6 +86,7 @@ AutoScreenMessage( SM_BackFromWarpChange ); AutoScreenMessage( SM_BackFromSpeedPercentChange ); AutoScreenMessage( SM_BackFromSpeedWaitChange ); AutoScreenMessage( SM_BackFromSpeedModeChange ); +AutoScreenMessage( SM_BackFromFakeChange ); AutoScreenMessage( SM_DoEraseStepTiming ); AutoScreenMessage( SM_DoSaveAndExit ); AutoScreenMessage( SM_DoExit ); @@ -582,6 +583,7 @@ static MenuDef g_TimingDataInformation( 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::speed_mode, "Edit speed (mode)", true, EditMode_Full, true, true, 0, "Beats", "Seconds" ), + MenuRowDef( ScreenEdit::fake, "Edit fake", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::erase_step_timing, "Erase step timing", true, EditMode_Full, true, true, 0, NULL ) ); @@ -2797,6 +2799,15 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM ) } SetDirty( true ); } + else if ( SM == SM_BackFromFakeChange ) + { + float fFake = StringToFloat( ScreenTextEntry::s_sLastAnswer ); + if( fFake >= 0 ) // allow 0 to kill a warp. + { + GetAppropriateTiming().SetFakeAtBeat( GetBeat(), fFake ); + SetDirty( true ); + } + } else if( SM == SM_BackFromBGChange ) { @@ -3217,12 +3228,15 @@ void ScreenEdit::DisplayTimingMenu() RString starting = ( pTime.GetSpeedModeAtBeat( fBeat ) == 1 ? "Seconds" : "Beats" ); g_TimingDataInformation.rows[speed_mode].SetOneUnthemedChoice( starting.c_str() ); + g_TimingDataInformation.rows[fake].SetOneUnthemedChoice( ssprintf("%.5f", pTime.GetFakeAtBeat( 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; g_TimingDataInformation.rows[speed_mode].bEnabled = GAMESTATE->m_bIsEditorStepTiming; + g_TimingDataInformation.rows[fake].bEnabled = GAMESTATE->m_bIsEditorStepTiming; EditMiniMenu( &g_TimingDataInformation, SM_BackFromTimingDataInformation ); } @@ -3904,6 +3918,7 @@ static LocalizedString ENTER_WARP_VALUE ( "ScreenEdit", "Enter a new Warp val 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 ENTER_SPEED_MODE_VALUE ( "ScreenEdit", "Enter a new Speed mode value." ); +static LocalizedString ENTER_FAKE_VALUE ( "ScreenEdit", "Enter a new Fake 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 ) { @@ -4014,6 +4029,15 @@ void ScreenEdit::HandleTimingDataInformationChoice( TimingDataInformationChoice break; } + case fake: + { + ScreenTextEntry::TextEntry( + SM_BackFromFakeChange, + ENTER_FAKE_VALUE, + ssprintf("%.5f", GetAppropriateTiming().GetFakeAtBeat( GetBeat() ) ), + 10 + ); + } 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 e1e3bd4435..4336517238 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -501,6 +501,7 @@ public: speed_wait, speed_mode, erase_step_timing, + fake, NUM_TIMING_DATA_INFORMATION_CHOICES };