From a2af7dc1a98b028acf93e8cc17514f67d62be6a8 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 23:05:52 -0600 Subject: [PATCH] add #CHARTSTYLE to .ssc format (and now the editor too) --- Docs/Changelog_sm-ssc.txt | 4 ++++ Themes/_fallback/Languages/en.ini | 3 +++ src/ScreenEdit.cpp | 25 ++++++++++++++++++++++++- src/ScreenEdit.h | 1 + 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 12e18fbbe5..5715010638 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -13,6 +13,10 @@ _____________________________________________________________________________ sm-ssc v1.2.2 | 201102?? -------------------------------------------------------------------------------- +20110214 +-------- +* Added #CHARTSTYLE to .ssc format, mainly meant for Pad/Keyboard distinctions. [AJ] + 20110213 -------- * Life Difficulty 4 is now as difficult as Life 6 was. [AJ] diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 032631c80e..9c544d3862 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -787,6 +787,7 @@ CelShadeModels=Cel-shaded Models Center Image=Center Image Chaos=Chaos Characters=Characters +Chart Style=Chart Style Choose=Choose Clear Bookkeeping Data=Clear Bookkeeping Data Clear Machine Edits=Clear Machine Edits @@ -1205,6 +1206,7 @@ Enter a new artist.=Enter a new artist. Enter a new genre.=Enter a new genre. Enter a new credit.=Enter a new credit. Enter a new description.=Enter a new description. +Enter a new chart style.=Enter a new chart style (e.g. "Pad", "Keyboard"). Enter the author who made this step pattern.=Enter the author who made this step pattern. Enter a new last beat hint.=Enter a new last beat hint. Enter a new main title transliteration.=Enter a new main title transliteration. @@ -1231,6 +1233,7 @@ Snap to=Snap to Selection beat=Selection beat Difficulty=Difficulty Description=Description +Chart Style=Chart Style Main title=Main title Subtitle=Subtitle Tap Steps=Tap Steps diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index f2e2594e6c..300633546c 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -542,6 +542,7 @@ static MenuDef g_StepsInformation( // xxx: this giant list of numbers SUUUUUUUUUUCKS -aj MenuRowDef( ScreenEdit::meter, "Meter", true, EditMode_Practice, true, false, 0, "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25" ), MenuRowDef( ScreenEdit::description, "Description", true, EditMode_Practice, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::chartstyle, "Chart Style", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::step_credit, "Step Author", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::predict_meter, "Predicted Meter", false, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::tap_notes, "Tap Steps", false, EditMode_Full, true, true, 0, NULL ), @@ -1016,6 +1017,7 @@ static LocalizedString NOTES("ScreenEdit", "%s notes"); static LocalizedString SELECTION_BEAT("ScreenEdit", "Selection beat"); static LocalizedString DIFFICULTY("ScreenEdit", "Difficulty"); static LocalizedString DESCRIPTION("ScreenEdit", "Description"); +static LocalizedString CHART_STYLE("ScreenEdit", "Chart Style"); static LocalizedString MAIN_TITLE("ScreenEdit", "Main title"); static LocalizedString SUBTITLE("ScreenEdit", "Subtitle"); static LocalizedString TAP_STEPS("ScreenEdit", "Tap Steps"); @@ -1078,6 +1080,7 @@ void ScreenEdit::UpdateTextInfo() case EditMode_Full: sText += ssprintf( "%s:\n %s\n", DIFFICULTY.GetValue().c_str(), DifficultyToString( m_pSteps->GetDifficulty() ).c_str() ); sText += ssprintf( "%s:\n %s\n", DESCRIPTION.GetValue().c_str(), m_pSteps->GetDescription().c_str() ); + sText += ssprintf( "%s:\n %s\n", CHART_STYLE.GetValue().c_str(), m_pSteps->GetChartStyle().c_str() ); sText += ssprintf( "%s:\n %s\n", MAIN_TITLE.GetValue().c_str(), m_pSong->m_sMainTitle.c_str() ); if( m_pSong->m_sSubTitle.size() ) sText += ssprintf( "%s:\n %s\n", SUBTITLE.GetValue().c_str(), m_pSong->m_sSubTitle.c_str() ); @@ -2856,13 +2859,19 @@ static void ChangeDescription( const RString &sNew ) { Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; - /* Don't erase edit descriptions. */ + // Don't erase edit descriptions. if( sNew.empty() && pSteps->GetDifficulty() == Difficulty_Edit ) return; pSteps->SetDescription(sNew); } +static void ChangeChartStyle( const RString &sNew ) +{ + Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; + pSteps->SetChartStyle(sNew); +} + static void ChangeStepCredit( const RString &sNew ) { Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; @@ -3010,6 +3019,8 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns g_StepsInformation.rows[predict_meter].SetOneUnthemedChoice( ssprintf("%.2f",pSteps->PredictMeter()) ); g_StepsInformation.rows[description].bEnabled = (EDIT_MODE.GetValue() >= EditMode_Full); g_StepsInformation.rows[description].SetOneUnthemedChoice( pSteps->GetDescription() ); + g_StepsInformation.rows[chartstyle].bEnabled = (EDIT_MODE.GetValue() >= EditMode_Full); + g_StepsInformation.rows[chartstyle].SetOneUnthemedChoice( pSteps->GetChartStyle() ); g_StepsInformation.rows[step_credit].bEnabled = (EDIT_MODE.GetValue() >= EditMode_Full); g_StepsInformation.rows[step_credit].SetOneUnthemedChoice( pSteps->GetCredit() ); g_StepsInformation.rows[tap_notes].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumTapNotes()) ); @@ -3475,6 +3486,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, const vector &iAns } static LocalizedString ENTER_NEW_DESCRIPTION( "ScreenEdit", "Enter a new description." ); +static LocalizedString ENTER_NEW_CHART_STYLE( "ScreenEdit", "Enter a new chart style." ); static LocalizedString ENTER_NEW_STEP_AUTHOR( "ScreenEdit", "Enter the author who made this step pattern." ); void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const vector &iAnswers ) { @@ -3498,6 +3510,17 @@ void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const v NULL ); break; + case chartstyle: + ScreenTextEntry::TextEntry( + SM_None, + ENTER_NEW_CHART_STYLE, + m_pSteps->GetChartStyle(), + 255, + NULL, + ChangeChartStyle, + NULL + ); + break; case step_credit: ScreenTextEntry::TextEntry( SM_None, diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index 4d7999b277..7587b98dcc 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -407,6 +407,7 @@ public: difficulty, meter, description, + chartstyle, step_credit, predict_meter, tap_notes,