本文整理汇总了C++中Profile::GetDisplayName方法的典型用法代码示例。如果您正苦于以下问题:C++ Profile::GetDisplayName方法的具体用法?C++ Profile::GetDisplayName怎么用?C++ Profile::GetDisplayName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile
的用法示例。
在下文中一共展示了Profile::GetDisplayName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ScreenAttract
ScreenEnding::ScreenEnding( const CString &sClassName ) : ScreenAttract( sClassName, false/*dont reset GAMESTATE*/ )
{
if( PREFSMAN->m_bScreenTestMode )
{
PROFILEMAN->LoadFirstAvailableProfile(PLAYER_1);
PROFILEMAN->LoadFirstAvailableProfile(PLAYER_2);
GAMESTATE->m_PlayMode = PLAY_MODE_REGULAR;
GAMESTATE->m_pCurStyle = GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(), "versus" );
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true;
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
GAMESTATE->m_pCurSong = SONGMAN->GetRandomSong();
GAMESTATE->m_pCurCourse = SONGMAN->GetRandomCourse();
GAMESTATE->m_pCurSteps[PLAYER_1] = GAMESTATE->m_pCurSong->GetAllSteps()[0];
GAMESTATE->m_pCurSteps[PLAYER_2] = GAMESTATE->m_pCurSong->GetAllSteps()[0];
g_CurStageStats.vpSteps[PLAYER_1].push_back( GAMESTATE->m_pCurSteps[PLAYER_1] );
g_CurStageStats.vpSteps[PLAYER_2].push_back( GAMESTATE->m_pCurSteps[PLAYER_2] );
GAMESTATE->m_PlayerOptions[PLAYER_1].m_fScrollSpeed = 2;
GAMESTATE->m_PlayerOptions[PLAYER_2].m_fScrollSpeed = 2;
GAMESTATE->m_iCurrentStageIndex = 0;
GAMESTATE->m_PlayerOptions[PLAYER_1].ChooseRandomMofifiers();
GAMESTATE->m_PlayerOptions[PLAYER_2].ChooseRandomMofifiers();
for( float f = 0; f < 100.0f; f += 1.0f )
{
float fP1 = fmodf(f/100*4+.3f,1);
g_CurStageStats.SetLifeRecordAt( PLAYER_1, fP1, f );
g_CurStageStats.SetLifeRecordAt( PLAYER_2, 1-fP1, f );
}
g_CurStageStats.iActualDancePoints[PLAYER_1] = rand()%3;
g_CurStageStats.iPossibleDancePoints[PLAYER_1] = 2;
g_CurStageStats.iActualDancePoints[PLAYER_2] = rand()&1;
g_CurStageStats.iPossibleDancePoints[PLAYER_2] = 1;
g_CurStageStats.iCurCombo[PLAYER_1] = 0;
g_CurStageStats.UpdateComboList( PLAYER_1, 0, false );
g_CurStageStats.iCurCombo[PLAYER_1] = 1;
g_CurStageStats.UpdateComboList( PLAYER_1, 1, false );
g_CurStageStats.iCurCombo[PLAYER_1] = 50;
g_CurStageStats.UpdateComboList( PLAYER_1, 25, false );
g_CurStageStats.iCurCombo[PLAYER_1] = 250;
g_CurStageStats.UpdateComboList( PLAYER_1, 100, false );
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_MARVELOUS] = rand()&1;
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_PERFECT] = rand()&1;
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_GREAT] = rand()&1;
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_MARVELOUS] = rand()&1;
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_PERFECT] = rand()&1;
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_GREAT] = rand()&1;
g_vPlayedStageStats.clear();
}
// Update final profile stats before we load them for display below.
GAMESTATE->FinishStage();
vector<Song*> arraySongs;
SONGMAN->GetSongs( arraySongs );
SongUtil::SortSongPointerArrayByTitle( arraySongs );
const CString sStatsTitleFont = THEME->GetPathToF( "ScreenEnding stats title" );
const CString sStatsValueFont = THEME->GetPathToF( "ScreenEnding stats value" );
FOREACH_PlayerNumber( p )
{
if( !GAMESTATE->IsHumanPlayer(p) )
continue; // skip
Profile* pProfile = PROFILEMAN->GetProfile( p );
m_textPlayerName[p].LoadFromFont( THEME->GetPathToF("ScreenEnding player name") );
m_textPlayerName[p].SetText( pProfile ? pProfile->GetDisplayName() : CString("NO CARD") );
m_textPlayerName[p].SetName( ssprintf("PlayerNameP%d",p+1) );
SET_XY_AND_ON_COMMAND( m_textPlayerName[p] );
this->AddChild( &m_textPlayerName[p] );
if( pProfile == NULL )
continue; // don't show the stats lines
FOREACH_EndingStatsLine( i )
{
m_Lines[i][p].title.LoadFromFont( sStatsTitleFont );
m_Lines[i][p].title.SetText( GetStatsLineTitle(p, i) );
m_Lines[i][p].title.SetName( ssprintf("StatsTitleP%dLine%d",p+1,i+1) );
SET_XY_AND_ON_COMMAND( m_Lines[i][p].title );
this->AddChild( &m_Lines[i][p].title );
m_Lines[i][p].value.LoadFromFont( sStatsValueFont );
m_Lines[i][p].value.SetText( GetStatsLineValue(p, i) );
m_Lines[i][p].value.SetName( ssprintf("StatsValueP%dLine%d",p+1,i+1) );
SET_XY_AND_ON_COMMAND( m_Lines[i][p].value );
this->AddChild( &m_Lines[i][p].value );
}
}
this->MoveToTail( &m_In ); // put it in the back so it covers up the stuff we just added
this->MoveToTail( &m_Out ); // put it in the back so it covers up the stuff we just added
//.........这里部分代码省略.........
示例2: GetProfileDisplayNameFromDir
CString Profile::GetProfileDisplayNameFromDir( CString sDir )
{
Profile profile;
profile.LoadEditableDataFromDir( sDir );
return profile.GetDisplayName();
}