GetDisplayName -> GetDisplayNameOrHighScoreName

This commit is contained in:
Chris Danford
2005-07-13 18:49:49 +00:00
parent 881db4c838
commit 505e835214
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -158,7 +158,7 @@ void Profile::InitRecentCourseScores()
m_vRecentCourseScores.clear(); m_vRecentCourseScores.clear();
} }
CString Profile::GetDisplayName() const CString Profile::GetDisplayNameOrHighScoreName() const
{ {
if( !m_sDisplayName.empty() ) if( !m_sDisplayName.empty() )
return m_sDisplayName; return m_sDisplayName;
@@ -897,7 +897,7 @@ XNode* Profile::SaveGeneralDataCreateNode() const
// TRICKY: These are write-only elements that are never read again. This // TRICKY: These are write-only elements that are never read again. This
// data is required by other apps (like internet ranking), but is // data is required by other apps (like internet ranking), but is
// redundant to the game app. // redundant to the game app.
pGeneralDataNode->AppendChild( "DisplayName", GetDisplayName() ); pGeneralDataNode->AppendChild( "DisplayName", GetDisplayNameOrHighScoreName() );
pGeneralDataNode->AppendChild( "IsMachine", IsMachine() ); pGeneralDataNode->AppendChild( "IsMachine", IsMachine() );
pGeneralDataNode->AppendChild( "IsWeightSet", m_iWeightPounds != 0 ); pGeneralDataNode->AppendChild( "IsWeightSet", m_iWeightPounds != 0 );
+1 -1
View File
@@ -63,7 +63,7 @@ public:
// //
// smart accessors // smart accessors
// //
CString GetDisplayName() const; CString GetDisplayNameOrHighScoreName() const;
CString GetDisplayTotalCaloriesBurned() const; // remove me and use Lua instead CString GetDisplayTotalCaloriesBurned() const; // remove me and use Lua instead
CString GetDisplayTotalCaloriesBurnedToday() const; // remove me and use Lua instead CString GetDisplayTotalCaloriesBurnedToday() const; // remove me and use Lua instead
int GetCalculatedWeightPounds() const; // returns a default value if m_iWeightPounds isn't set int GetCalculatedWeightPounds() const; // returns a default value if m_iWeightPounds isn't set
+3 -3
View File
@@ -229,7 +229,7 @@ bool ProfileManager::FastLoadProfileNameFromMemoryCard( CString sRootDir, CStrin
Profile::LoadResult res = profile.LoadEditableDataFromDir( sDir ); Profile::LoadResult res = profile.LoadEditableDataFromDir( sDir );
if( res == Profile::success ) if( res == Profile::success )
{ {
sName = profile.GetDisplayName(); sName = profile.GetDisplayNameOrHighScoreName();
return true; return true;
} }
else if( res != Profile::failed_no_profile ) else if( res != Profile::failed_no_profile )
@@ -283,7 +283,7 @@ const Profile* ProfileManager::GetProfile( PlayerNumber pn ) const
CString ProfileManager::GetPlayerName( PlayerNumber pn ) const CString ProfileManager::GetPlayerName( PlayerNumber pn ) const
{ {
const Profile *prof = GetProfile( pn ); const Profile *prof = GetProfile( pn );
return prof ? prof->GetDisplayName() : CString(""); return prof ? prof->GetDisplayNameOrHighScoreName() : CString("");
} }
@@ -296,7 +296,7 @@ void ProfileManager::RefreshLocalProfilesEditableData()
{ {
Profile &pro = g_mapLocalProfileIdToEditableData[*s]; Profile &pro = g_mapLocalProfileIdToEditableData[*s];
CString sProfileDir = LocalProfileIdToDir( *s ); CString sProfileDir = LocalProfileIdToDir( *s );
LOG->Trace(" '%s'", pro.GetDisplayName().c_str()); LOG->Trace(" '%s'", pro.GetDisplayNameOrHighScoreName().c_str());
pro.LoadEditableDataFromDir( sProfileDir ); pro.LoadEditableDataFromDir( sProfileDir );
} }
} }
+3 -3
View File
@@ -142,12 +142,12 @@ CString ScreenSystemLayer::GetCreditsMessage( PlayerNumber pn ) const
case MEMORY_CARD_STATE_NO_CARD: case MEMORY_CARD_STATE_NO_CARD:
// this is a local machine profile // this is a local machine profile
if( PROFILEMAN->LastLoadWasFromLastGood(pn) ) if( PROFILEMAN->LastLoadWasFromLastGood(pn) )
return pProfile->GetDisplayName() + CREDITS_LOADED_FROM_LAST_GOOD_APPEND.GetValue(); return pProfile->GetDisplayNameOrHighScoreName() + CREDITS_LOADED_FROM_LAST_GOOD_APPEND.GetValue();
else if( PROFILEMAN->LastLoadWasTamperedOrCorrupt(pn) ) else if( PROFILEMAN->LastLoadWasTamperedOrCorrupt(pn) )
return CREDITS_LOAD_FAILED.GetValue(); return CREDITS_LOAD_FAILED.GetValue();
// Prefer the name of the profile over the name of the card. // Prefer the name of the profile over the name of the card.
else if( PROFILEMAN->IsPersistentProfile(pn) ) else if( PROFILEMAN->IsPersistentProfile(pn) )
return pProfile->GetDisplayName(); return pProfile->GetDisplayNameOrHighScoreName();
else if( GAMESTATE->PlayersCanJoin() ) else if( GAMESTATE->PlayersCanJoin() )
return CREDITS_INSERT_CARD.GetValue(); return CREDITS_INSERT_CARD.GetValue();
else else
@@ -166,7 +166,7 @@ CString ScreenSystemLayer::GetCreditsMessage( PlayerNumber pn ) const
// If there is a local profile loaded, prefer it over the name of the memory card. // If there is a local profile loaded, prefer it over the name of the memory card.
if( PROFILEMAN->IsPersistentProfile(pn) ) if( PROFILEMAN->IsPersistentProfile(pn) )
{ {
CString s = pProfile->GetDisplayName(); CString s = pProfile->GetDisplayNameOrHighScoreName();
if( s.empty() ) if( s.empty() )
s = CREDITS_CARD_NO_NAME.GetValue(); s = CREDITS_CARD_NO_NAME.GetValue();
if( PROFILEMAN->LastLoadWasFromLastGood(pn) ) if( PROFILEMAN->LastLoadWasFromLastGood(pn) )