Make PaneDisplay show fallback values when Song/Course is null.

This commit is contained in:
AJ Kelly
2010-05-07 01:19:09 -05:00
parent 08e2147e0a
commit 4432344761
2 changed files with 59 additions and 0 deletions
+15
View File
@@ -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
--------
+44
View File
@@ -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 )