diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 539e603033..0cb07982a4 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -17,6 +17,9 @@ StepMania 5.0 ????????? | 20110??? more detailed descriptions, or perhaps some short hand lingo. All files that used #DESCRIPTION will have their values moved to #CHARTNAME on load. [Wolfman2000] +* [ScreenEdit] Add a Steps Data menu for getting numerical step data on the + chart. This is a read only menu. Edit Steps Information contains writable + information. [Wolfman2000] 2011/07/06 ---------- diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 8cd1019f9d..cd50fdfe69 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -1051,6 +1051,7 @@ Type=Type Turn=Turn Undo=Undo UseUnlockSystem=Unlock System +View steps data=View Steps Data VisualDelaySeconds=Visual Delay Voltage=Voltage Vsync=Wait For Vsync diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 5749ed105f..bd7f5d931a 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -3740,6 +3740,9 @@ Fallback="ScreenMiniMenu" [ScreenMiniMenuStepsInformation] Fallback="ScreenMiniMenu" +[ScreenMiniMenuStepsData] +Fallback="ScreenMiniMenu" + [ScreenMiniMenuSongInformation] Fallback="ScreenMiniMenu" diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index e1e8e1098f..8a319ecf96 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -63,6 +63,7 @@ AutoScreenMessage( SM_BackFromMainMenu ); AutoScreenMessage( SM_BackFromAreaMenu ); AutoScreenMessage( SM_BackFromAlterMenu ); AutoScreenMessage( SM_BackFromStepsInformation ); +AutoScreenMessage( SM_BackFromStepsData ); AutoScreenMessage( SM_BackFromOptions ); AutoScreenMessage( SM_BackFromSongInformation ); AutoScreenMessage( SM_BackFromBGChange ); @@ -527,6 +528,7 @@ static MenuDef g_MainMenu( MenuRowDef( ScreenEdit::edit_song_info, "Edit song info", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::edit_steps_information, "Edit steps information", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::edit_timing_data, "Edit Timing Data", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::view_steps_data, "View steps data", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::play_preview_music, "Play preview music", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::exit, "Exit Edit Mode", true, EditMode_Practice, true, true, 0, NULL ) ); @@ -600,22 +602,27 @@ static MenuDef g_StepsInformation( "ScreenMiniMenuStepsInformation", MenuRowDef( ScreenEdit::difficulty, "Difficulty", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::meter, "Meter", true, EditMode_Practice, true, false, 0, NULL ), + MenuRowDef( ScreenEdit::predict_meter, "Predicted Meter", false, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::chartname, "Chart Name", true, EditMode_Practice, true, true, 0, NULL ), 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 ), - MenuRowDef( ScreenEdit::jumps, "Jumps", false, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::hands, "Hands", false, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::quads, "Quads", false, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::holds, "Holds", false, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::mines, "Mines", false, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::stream, "Stream", false, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::voltage, "Voltage", false, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::air, "Air", false, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::freeze, "Freeze", false, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::chaos, "Chaos", false, EditMode_Full, true, true, 0, NULL ) + MenuRowDef( ScreenEdit::step_credit, "Step Author", true, EditMode_Practice, true, true, 0, NULL ) + +); + +static MenuDef g_StepsData( + "ScreenMiniMenuStepsData", + MenuRowDef( ScreenEdit::tap_notes, "Tap Steps", false, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::jumps, "Jumps", false, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::hands, "Hands", false, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::quads, "Quads", false, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::holds, "Holds", false, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::mines, "Mines", false, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::stream, "Stream", false, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::voltage, "Voltage", false, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::air, "Air", false, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::freeze, "Freeze", false, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::chaos, "Chaos", false, EditMode_Full, true, true, 0, NULL ) ); static MenuDef g_SongInformation( @@ -2931,6 +2938,12 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM ) { HandleStepsInformationChoice( (StepsInformationChoice)ScreenMiniMenu::s_iLastRowCode, ScreenMiniMenu::s_viLastAnswers ); } + else if (SM == SM_BackFromStepsData) + { + HandleStepsDataChoice((StepsDataChoice)ScreenMiniMenu::s_iLastRowCode, + ScreenMiniMenu::s_viLastAnswers); + } + else if( SM == SM_BackFromSongInformation ) { HandleSongInformationChoice( (SongInformationChoice)ScreenMiniMenu::s_iLastRowCode, ScreenMiniMenu::s_viLastAnswers ); @@ -3655,7 +3668,6 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns /* XXX: If the difficulty is changed from EDIT, and pSteps->WasLoadedFromProfile() * is true, we should warn that the steps will no longer be saved to the profile. */ Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; - float fMusicSeconds = m_pSoundMusic->GetLengthSeconds(); g_StepsInformation.rows[difficulty].choices.clear(); FOREACH_ENUM( Difficulty, dc ) @@ -3675,20 +3687,26 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns 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()) ); - g_StepsInformation.rows[jumps].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumJumps()) ); - g_StepsInformation.rows[hands].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumHands()) ); - g_StepsInformation.rows[quads].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumQuads()) ); - g_StepsInformation.rows[holds].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumHoldNotes()) ); - g_StepsInformation.rows[mines].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumMines()) ); - g_StepsInformation.rows[stream].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetStreamRadarValue(m_NoteDataEdit,fMusicSeconds)) ); - g_StepsInformation.rows[voltage].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetVoltageRadarValue(m_NoteDataEdit,fMusicSeconds)) ); - g_StepsInformation.rows[air].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetAirRadarValue(m_NoteDataEdit,fMusicSeconds)) ); - g_StepsInformation.rows[freeze].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetFreezeRadarValue(m_NoteDataEdit,fMusicSeconds)) ); - g_StepsInformation.rows[chaos].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetChaosRadarValue(m_NoteDataEdit,fMusicSeconds)) ); EditMiniMenu( &g_StepsInformation, SM_BackFromStepsInformation, SM_None ); } break; + case view_steps_data: + { + float fMusicSeconds = m_pSoundMusic->GetLengthSeconds(); + g_StepsData.rows[tap_notes].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumTapNotes()) ); + g_StepsData.rows[jumps].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumJumps()) ); + g_StepsData.rows[hands].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumHands()) ); + g_StepsData.rows[quads].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumQuads()) ); + g_StepsData.rows[holds].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumHoldNotes()) ); + g_StepsData.rows[mines].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumMines()) ); + g_StepsData.rows[stream].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetStreamRadarValue(m_NoteDataEdit,fMusicSeconds)) ); + g_StepsData.rows[voltage].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetVoltageRadarValue(m_NoteDataEdit,fMusicSeconds)) ); + g_StepsData.rows[air].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetAirRadarValue(m_NoteDataEdit,fMusicSeconds)) ); + g_StepsData.rows[freeze].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetFreezeRadarValue(m_NoteDataEdit,fMusicSeconds)) ); + g_StepsData.rows[chaos].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetChaosRadarValue(m_NoteDataEdit,fMusicSeconds)) ); + EditMiniMenu( &g_StepsData, SM_BackFromStepsData, SM_None ); + break; + } case save: case save_on_exit: { @@ -4264,6 +4282,11 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, const vector &iAns CheckNumberOfNotesAndUndo(); } +void ScreenEdit::HandleStepsDataChoice( StepsDataChoice c, const vector &iAnswers ) +{ + return; // nothing is done with the choices. Yet. +} + static LocalizedString ENTER_NEW_DESCRIPTION( "ScreenEdit", "Enter a new description." ); static LocalizedString ENTER_NEW_CHART_NAME("ScreenEdit", "Enter a new chart name."); static LocalizedString ENTER_NEW_CHART_STYLE( "ScreenEdit", "Enter a new chart style." ); diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index 416b71b1f5..610822b43a 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -380,6 +380,7 @@ public: options, /**< Modify the PlayerOptions and SongOptions. */ edit_song_info, /**< Edit some general information about the song. */ edit_timing_data, /**< Edit the chart's timing data. */ + view_steps_data, /**< View step statistics. */ play_preview_music, /**< Play the song's preview music. */ exit, save_on_exit, @@ -510,6 +511,12 @@ public: chartstyle, /**< How is this chart meant to be played? */ step_credit, /**< Who wrote this individual chart? */ predict_meter, /**< What does the game think this chart's rating should be? */ + NUM_STEPS_INFORMATION_CHOICES + }; + void HandleStepsInformationChoice( StepsInformationChoice c, const vector &iAnswers ); + + enum StepsDataChoice + { tap_notes, jumps, hands, @@ -521,9 +528,9 @@ public: air, freeze, chaos, - NUM_STEPS_INFORMATION_CHOICES + NUM_STEPS_DATA_CHOICES }; - void HandleStepsInformationChoice( StepsInformationChoice c, const vector &iAnswers ); + void HandleStepsDataChoice(StepsDataChoice c, const vector &answers); enum SongInformationChoice {