Add m_ to StageStats and PlayerStageStats members. There are several methods of these classes with local variable names that are similar to the member names. m_ helps distinguish between those two types.

This commit is contained in:
Chris Danford
2006-11-14 11:13:21 +00:00
parent c86c218522
commit 2f7ac6aa3c
33 changed files with 552 additions and 543 deletions
+22 -22
View File
@@ -144,36 +144,36 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional()
StageStats ss;
for( int z = 0; z < 3; ++z )
{
ss.vpPlayedSongs.push_back( SONGMAN->GetRandomSong() );
ss.vpPossibleSongs = ss.vpPlayedSongs;
ss.pStyle = GAMESTATE->GetCurrentStyle();
ss.playMode = GAMESTATE->m_PlayMode;
ASSERT( ss.vpPlayedSongs[0]->GetAllSteps().size() );
ss.m_vpPlayedSongs.push_back( SONGMAN->GetRandomSong() );
ss.m_vpPossibleSongs = ss.m_vpPlayedSongs;
ss.m_pStyle = GAMESTATE->GetCurrentStyle();
ss.m_playMode = GAMESTATE->m_PlayMode;
ASSERT( ss.m_vpPlayedSongs[0]->GetAllSteps().size() );
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
FOREACH_PlayerNumber( p )
{
Steps *pSteps = ss.vpPlayedSongs[0]->GetAllSteps()[0];
ss.m_player[p].vpPlayedSteps.push_back( pSteps );
Steps *pSteps = ss.m_vpPlayedSongs[0]->GetAllSteps()[0];
ss.m_player[p].m_vpPlayedSteps.push_back( pSteps );
GAMESTATE->m_pCurSteps[p].Set( pSteps );
ss.m_player[p].iPossibleDancePoints = 100;
ss.m_player[p].iActualDancePoints = 100;
ss.m_player[p].iScore = 100;
ss.m_player[p].iPossibleDancePoints = 1000;
ss.m_player[p].iActualDancePoints = 985;
ss.m_player[p].vpPossibleSteps.push_back( pSteps );
ss.m_player[p].m_iPossibleDancePoints = 100;
ss.m_player[p].m_iActualDancePoints = 100;
ss.m_player[p].m_iScore = 100;
ss.m_player[p].m_iPossibleDancePoints = 1000;
ss.m_player[p].m_iActualDancePoints = 985;
ss.m_player[p].m_vpPossibleSteps.push_back( pSteps );
HighScore hs;
hs.SetGrade( Grade_Tier03 );
hs.SetPercentDP( ss.m_player[p].GetPercentDancePoints() );
hs.SetScore( ss.m_player[p].iScore );
hs.SetScore( ss.m_player[p].m_iScore );
hs.SetDateTime( DateTime::GetNowDateTime() );
int a, b;
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
PROFILEMAN->AddCategoryScore( st, RANKING_A, p, hs, a, b );
}
@@ -334,14 +334,14 @@ void ScreenNameEntryTraditional::Init()
for( unsigned i = 0; i < STATSMAN->m_vPlayedStageStats.size(); ++i )
{
StageStats &ss = STATSMAN->m_vPlayedStageStats[i];
Song* pSong = ss.vpPlayedSongs[0];
Steps* pSteps = ss.m_player[p].vpPlayedSteps[0];
Song* pSong = ss.m_vpPlayedSongs[0];
Steps* pSteps = ss.m_player[p].m_vpPlayedSteps[0];
Course* pCourse = GAMESTATE->m_pCurCourse;
Trail* pTrail = GAMESTATE->m_pCurTrail[p];
int iHighScoreIndex = -1; // -1 means "out of ranking"
Grade grade = ss.m_player[p].GetGrade();
int iScore = ss.m_player[p].iScore;
int iScore = ss.m_player[p].m_iScore;
float fPercentDP = ss.m_player[p].GetPercentDancePoints();
// If this is a SHOW_NEVER song, then it's probably a training.