From 4432344761a30c0089354874ca31bb2939b9fb7b Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 7 May 2010 01:19:09 -0500 Subject: [PATCH] Make PaneDisplay show fallback values when Song/Course is null. --- Docs/Changelog_sm-ssc.txt | 15 +++++++++++++ src/PaneDisplay.cpp | 44 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 2295e8d49c..76dd0617ab 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -9,10 +9,25 @@ Not all changes are documented, for various reasons. supported but exist anyways.) _____________________________________________________________________________ +20100507 +-------- +* [PaneDisplay] Show fallback values when Song/Course is null. + +20100506 +-------- +* [ScreenSelectMusic] Make it so changing difficulty also cancels + TwoPartSelection if TwoPartConfirmsOnly. + +20100504 +-------- +* [ScreenGameplay] Un-hardcoded the diffuse command on CourseSongNumber. + 20100502 -------- * Add dance-threepanel StepsType. Thanks to kurisu for the original 3.9 code. * XMode mod added, thanks to v1toko/StepNXA. +* [Song] add GetDisplayBpms() [a table of two floats], IsDisplayBpmSecret(), + IsDisplayBpmConstant() [both bools] Lua bindings 20100501 -------- diff --git a/src/PaneDisplay.cpp b/src/PaneDisplay.cpp index b8f7ba1019..2226289dd8 100644 --- a/src/PaneDisplay.cpp +++ b/src/PaneDisplay.cpp @@ -63,6 +63,7 @@ void PaneDisplay::Load( const RString &sMetricsGroup, PlayerNumber pn ) EMPTY_MACHINE_HIGH_SCORE_NAME.Load( sMetricsGroup, "EmptyMachineHighScoreName" ); NOT_AVAILABLE.Load( sMetricsGroup, "NotAvailable" ); + //BLANK_COUNT_VALUE.Load( sMetricsGroup, "BlankCountValue" ); // todo: better name -aj COUNT_FORMAT.Load( sMetricsGroup, "CountFormat" ); FOREACH_ENUM( PaneCategory, pc ) @@ -122,6 +123,49 @@ void PaneDisplay::SetContent( PaneCategory c ) const Profile *pProfile = PROFILEMAN->IsPersistentProfile(m_PlayerNumber) ? PROFILEMAN->GetProfile(m_PlayerNumber) : NULL; bool bIsPlayerEdit = pSteps && pSteps->IsAPlayerEdit(); + // in SM3.9, all values would get set to a "?". In sm-ssc, we follow the + // fallbacks above. (todo: make this a preference? see BLANK_COUNT_VALUE) -aj + if(GAMESTATE->IsCourseMode() && !pTrail) + { + if( (g_Contents[c].req&NEED_PROFILE) ) + str = NOT_AVAILABLE; + + { + switch( c ) + { + case PaneCategory_MachineHighName: + str = EMPTY_MACHINE_HIGH_SCORE_NAME; + break; + case PaneCategory_MachineHighScore: + case PaneCategory_ProfileHighScore: + str = NOT_AVAILABLE; + break; + } + } + + goto done; + } + else if(!GAMESTATE->IsCourseMode() && !pSong) + { + if( (g_Contents[c].req&NEED_PROFILE) ) + str = NOT_AVAILABLE; + + { + switch( c ) + { + case PaneCategory_MachineHighName: + str = EMPTY_MACHINE_HIGH_SCORE_NAME; + break; + case PaneCategory_MachineHighScore: + case PaneCategory_ProfileHighScore: + str = NOT_AVAILABLE; + break; + } + } + + goto done; + } + if( (g_Contents[c].req&NEED_NOTES) && !pSteps && !pTrail ) goto done; if( (g_Contents[c].req&NEED_PROFILE) && !pProfile )