fPercentDP, fSurviveSeconds
This commit is contained in:
@@ -614,8 +614,8 @@ static HighScore MakeRandomHighScore( float fPercentDP )
|
|||||||
hs.SetName( "FAKE" );
|
hs.SetName( "FAKE" );
|
||||||
hs.SetGrade( (Grade)SCALE( rand()%5, 0, 4, GRADE_TIER01, GRADE_TIER05 ) );
|
hs.SetGrade( (Grade)SCALE( rand()%5, 0, 4, GRADE_TIER01, GRADE_TIER05 ) );
|
||||||
hs.SetScore( rand()%100*1000 );
|
hs.SetScore( rand()%100*1000 );
|
||||||
hs.fPercentDP = fPercentDP;
|
hs.SetPercentDP( fPercentDP );
|
||||||
hs.fSurviveSeconds = randomf( 30.0f, 100.0f );
|
hs.SetSurviveSeconds( randomf(30.0f, 100.0f) );
|
||||||
PlayerOptions po;
|
PlayerOptions po;
|
||||||
po.ChooseRandomMofifiers();
|
po.ChooseRandomMofifiers();
|
||||||
hs.sModifiers = po.GetString();
|
hs.sModifiers = po.GetString();
|
||||||
|
|||||||
@@ -1392,7 +1392,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
|
|||||||
feat.Feat = ssprintf("MR #%d in %s %s", j+1, pSong->GetTranslitMainTitle().c_str(), DifficultyToString(pSteps->GetDifficulty()).c_str() );
|
feat.Feat = ssprintf("MR #%d in %s %s", j+1, pSong->GetTranslitMainTitle().c_str(), DifficultyToString(pSteps->GetDifficulty()).c_str() );
|
||||||
feat.pStringToFill = hs.GetNameMutable();
|
feat.pStringToFill = hs.GetNameMutable();
|
||||||
feat.grade = hs.GetGrade();
|
feat.grade = hs.GetGrade();
|
||||||
feat.fPercentDP = hs.fPercentDP;
|
feat.fPercentDP = hs.GetPercentDP();
|
||||||
feat.iScore = hs.GetScore();
|
feat.iScore = hs.GetScore();
|
||||||
|
|
||||||
if( pSong->HasBanner() )
|
if( pSong->HasBanner() )
|
||||||
@@ -1420,7 +1420,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
|
|||||||
feat.Feat = ssprintf("PR #%d in %s %s", j+1, pSong->GetTranslitMainTitle().c_str(), DifficultyToString(pSteps->GetDifficulty()).c_str() );
|
feat.Feat = ssprintf("PR #%d in %s %s", j+1, pSong->GetTranslitMainTitle().c_str(), DifficultyToString(pSteps->GetDifficulty()).c_str() );
|
||||||
feat.pStringToFill = hs.GetNameMutable();
|
feat.pStringToFill = hs.GetNameMutable();
|
||||||
feat.grade = hs.GetGrade();
|
feat.grade = hs.GetGrade();
|
||||||
feat.fPercentDP = hs.fPercentDP;
|
feat.fPercentDP = hs.GetPercentDP();
|
||||||
feat.iScore = hs.GetScore();
|
feat.iScore = hs.GetScore();
|
||||||
|
|
||||||
// XXX: temporary hack
|
// XXX: temporary hack
|
||||||
@@ -1455,7 +1455,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
|
|||||||
feat.pStringToFill = hs.GetNameMutable();
|
feat.pStringToFill = hs.GetNameMutable();
|
||||||
feat.grade = GRADE_NO_DATA;
|
feat.grade = GRADE_NO_DATA;
|
||||||
feat.iScore = hs.GetScore();
|
feat.iScore = hs.GetScore();
|
||||||
feat.fPercentDP = hs.fPercentDP;
|
feat.fPercentDP = hs.GetPercentDP();
|
||||||
asFeatsOut.push_back( feat );
|
asFeatsOut.push_back( feat );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1478,7 +1478,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
|
|||||||
feat.pStringToFill = hs.GetNameMutable();
|
feat.pStringToFill = hs.GetNameMutable();
|
||||||
feat.grade = GRADE_NO_DATA;
|
feat.grade = GRADE_NO_DATA;
|
||||||
feat.iScore = hs.GetScore();
|
feat.iScore = hs.GetScore();
|
||||||
feat.fPercentDP = hs.fPercentDP;
|
feat.fPercentDP = hs.GetPercentDP();
|
||||||
asFeatsOut.push_back( feat );
|
asFeatsOut.push_back( feat );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1515,7 +1515,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
|
|||||||
feat.pStringToFill = hs.GetNameMutable();
|
feat.pStringToFill = hs.GetNameMutable();
|
||||||
feat.grade = GRADE_NO_DATA;
|
feat.grade = GRADE_NO_DATA;
|
||||||
feat.iScore = hs.GetScore();
|
feat.iScore = hs.GetScore();
|
||||||
feat.fPercentDP = hs.fPercentDP;
|
feat.fPercentDP = hs.GetPercentDP();
|
||||||
if( pCourse->HasBanner() )
|
if( pCourse->HasBanner() )
|
||||||
feat.Banner = pCourse->m_sBannerPath;
|
feat.Banner = pCourse->m_sBannerPath;
|
||||||
asFeatsOut.push_back( feat );
|
asFeatsOut.push_back( feat );
|
||||||
@@ -1539,7 +1539,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
|
|||||||
feat.pStringToFill = hs.GetNameMutable();
|
feat.pStringToFill = hs.GetNameMutable();
|
||||||
feat.grade = GRADE_NO_DATA;
|
feat.grade = GRADE_NO_DATA;
|
||||||
feat.iScore = hs.GetScore();
|
feat.iScore = hs.GetScore();
|
||||||
feat.fPercentDP = hs.fPercentDP;
|
feat.fPercentDP = hs.GetPercentDP();
|
||||||
if( pCourse->HasBanner() )
|
if( pCourse->HasBanner() )
|
||||||
feat.Banner = pCourse->m_sBannerPath;
|
feat.Banner = pCourse->m_sBannerPath;
|
||||||
asFeatsOut.push_back( feat );
|
asFeatsOut.push_back( feat );
|
||||||
|
|||||||
+17
-10
@@ -14,6 +14,8 @@ struct HighScoreImpl
|
|||||||
CString sName; // name that shows in the machine's ranking screen
|
CString sName; // name that shows in the machine's ranking screen
|
||||||
Grade grade;
|
Grade grade;
|
||||||
int iScore;
|
int iScore;
|
||||||
|
float fPercentDP;
|
||||||
|
float fSurviveSeconds;
|
||||||
|
|
||||||
void Unset();
|
void Unset();
|
||||||
void AppendChildren( XNode *pNode ) const;
|
void AppendChildren( XNode *pNode ) const;
|
||||||
@@ -29,6 +31,8 @@ bool HighScoreImpl::operator==( const HighScoreImpl& other ) const
|
|||||||
COMPARE( sName );
|
COMPARE( sName );
|
||||||
COMPARE( grade );
|
COMPARE( grade );
|
||||||
COMPARE( iScore );
|
COMPARE( iScore );
|
||||||
|
COMPARE( fPercentDP );
|
||||||
|
COMPARE( fSurviveSeconds );
|
||||||
#undef COMPARE
|
#undef COMPARE
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -39,6 +43,8 @@ void HighScoreImpl::Unset()
|
|||||||
sName = "";
|
sName = "";
|
||||||
grade = GRADE_NO_DATA;
|
grade = GRADE_NO_DATA;
|
||||||
iScore = 0;
|
iScore = 0;
|
||||||
|
fPercentDP = 0;
|
||||||
|
fSurviveSeconds = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,6 +53,8 @@ void HighScoreImpl::AppendChildren( XNode *pNode ) const
|
|||||||
pNode->AppendChild( "Name", IsRankingToFillIn(sName) ? CString("") : sName );
|
pNode->AppendChild( "Name", IsRankingToFillIn(sName) ? CString("") : sName );
|
||||||
pNode->AppendChild( "Grade", GradeToString(grade) );
|
pNode->AppendChild( "Grade", GradeToString(grade) );
|
||||||
pNode->AppendChild( "Score", iScore );
|
pNode->AppendChild( "Score", iScore );
|
||||||
|
pNode->AppendChild( "PercentDP", fPercentDP );
|
||||||
|
pNode->AppendChild( "SurviveSeconds", fSurviveSeconds );
|
||||||
}
|
}
|
||||||
|
|
||||||
void HighScoreImpl::LoadFromNode( const XNode *pNode )
|
void HighScoreImpl::LoadFromNode( const XNode *pNode )
|
||||||
@@ -57,6 +65,8 @@ void HighScoreImpl::LoadFromNode( const XNode *pNode )
|
|||||||
pNode->GetChildValue( "Grade", s );
|
pNode->GetChildValue( "Grade", s );
|
||||||
grade = StringToGrade( s );
|
grade = StringToGrade( s );
|
||||||
pNode->GetChildValue( "Score", iScore );
|
pNode->GetChildValue( "Score", iScore );
|
||||||
|
pNode->GetChildValue( "PercentDP", fPercentDP );
|
||||||
|
pNode->GetChildValue( "SurviveSeconds", fSurviveSeconds );
|
||||||
|
|
||||||
/* Validate input. */
|
/* Validate input. */
|
||||||
grade = clamp( grade, GRADE_TIER01, GRADE_FAILED );
|
grade = clamp( grade, GRADE_TIER01, GRADE_FAILED );
|
||||||
@@ -73,8 +83,6 @@ HighScore::HighScore()
|
|||||||
void HighScore::Unset()
|
void HighScore::Unset()
|
||||||
{
|
{
|
||||||
m_Impl->Unset();
|
m_Impl->Unset();
|
||||||
fPercentDP = 0;
|
|
||||||
fSurviveSeconds = 0;
|
|
||||||
sModifiers = "";
|
sModifiers = "";
|
||||||
dateTime.Init();
|
dateTime.Init();
|
||||||
sPlayerGuid = "";
|
sPlayerGuid = "";
|
||||||
@@ -92,6 +100,11 @@ Grade HighScore::GetGrade() const { return m_Impl->grade; }
|
|||||||
void HighScore::SetGrade( Grade g ) { m_Impl->grade = g; }
|
void HighScore::SetGrade( Grade g ) { m_Impl->grade = g; }
|
||||||
int HighScore::GetScore() const { return m_Impl->iScore; }
|
int HighScore::GetScore() const { return m_Impl->iScore; }
|
||||||
void HighScore::SetScore( int iScore ) { m_Impl->iScore = iScore; }
|
void HighScore::SetScore( int iScore ) { m_Impl->iScore = iScore; }
|
||||||
|
float HighScore::GetPercentDP() const { return m_Impl->fPercentDP; }
|
||||||
|
void HighScore::SetPercentDP( float f ) { m_Impl->fPercentDP = f; }
|
||||||
|
float HighScore::GetSurviveSeconds() const { return m_Impl->fSurviveSeconds; }
|
||||||
|
void HighScore::SetSurviveSeconds( float f ) { m_Impl->fSurviveSeconds = f; }
|
||||||
|
float HighScore::GetSurvivalSeconds() const { return GetSurviveSeconds() + fLifeRemainingSeconds; }
|
||||||
|
|
||||||
/* We normally don't give direct access to the members. We need this one
|
/* We normally don't give direct access to the members. We need this one
|
||||||
* for NameToFillIn; use a special accessor so it's easy to find where this
|
* for NameToFillIn; use a special accessor so it's easy to find where this
|
||||||
@@ -104,10 +117,10 @@ bool HighScore::operator>=( const HighScore& other ) const
|
|||||||
* is the same. */
|
* is the same. */
|
||||||
if( PREFSMAN->m_bPercentageScoring )
|
if( PREFSMAN->m_bPercentageScoring )
|
||||||
{
|
{
|
||||||
if( fPercentDP == other.fPercentDP )
|
if( GetPercentDP() == other.GetPercentDP() )
|
||||||
return GetGrade() >= other.GetGrade();
|
return GetGrade() >= other.GetGrade();
|
||||||
else
|
else
|
||||||
return fPercentDP >= other.fPercentDP;
|
return GetPercentDP() >= other.GetPercentDP();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -123,8 +136,6 @@ bool HighScore::operator==( const HighScore& other ) const
|
|||||||
if( *m_Impl != *other.m_Impl )
|
if( *m_Impl != *other.m_Impl )
|
||||||
return false;
|
return false;
|
||||||
#define COMPARE(x) if( x!=other.x ) return false;
|
#define COMPARE(x) if( x!=other.x ) return false;
|
||||||
COMPARE( fPercentDP );
|
|
||||||
COMPARE( fSurviveSeconds );
|
|
||||||
COMPARE( sModifiers );
|
COMPARE( sModifiers );
|
||||||
COMPARE( dateTime );
|
COMPARE( dateTime );
|
||||||
COMPARE( sPlayerGuid );
|
COMPARE( sPlayerGuid );
|
||||||
@@ -147,8 +158,6 @@ XNode* HighScore::CreateNode() const
|
|||||||
|
|
||||||
// TRICKY: Don't write "name to fill in" markers.
|
// TRICKY: Don't write "name to fill in" markers.
|
||||||
m_Impl->AppendChildren( pNode );
|
m_Impl->AppendChildren( pNode );
|
||||||
pNode->AppendChild( "PercentDP", fPercentDP );
|
|
||||||
pNode->AppendChild( "SurviveSeconds", fSurviveSeconds );
|
|
||||||
pNode->AppendChild( "Modifiers", sModifiers );
|
pNode->AppendChild( "Modifiers", sModifiers );
|
||||||
pNode->AppendChild( "DateTime", dateTime );
|
pNode->AppendChild( "DateTime", dateTime );
|
||||||
pNode->AppendChild( "PlayerGuid", sPlayerGuid );
|
pNode->AppendChild( "PlayerGuid", sPlayerGuid );
|
||||||
@@ -172,8 +181,6 @@ void HighScore::LoadFromNode( const XNode* pNode )
|
|||||||
ASSERT( pNode->m_sName == "HighScore" );
|
ASSERT( pNode->m_sName == "HighScore" );
|
||||||
|
|
||||||
m_Impl->LoadFromNode( pNode );
|
m_Impl->LoadFromNode( pNode );
|
||||||
pNode->GetChildValue( "PercentDP", fPercentDP );
|
|
||||||
pNode->GetChildValue( "SurviveSeconds", fSurviveSeconds );
|
|
||||||
pNode->GetChildValue( "Modifiers", sModifiers );
|
pNode->GetChildValue( "Modifiers", sModifiers );
|
||||||
pNode->GetChildValue( "DateTime", dateTime );
|
pNode->GetChildValue( "DateTime", dateTime );
|
||||||
pNode->GetChildValue( "PlayerGuid", sPlayerGuid );
|
pNode->GetChildValue( "PlayerGuid", sPlayerGuid );
|
||||||
|
|||||||
@@ -23,8 +23,11 @@ struct HighScore
|
|||||||
void SetGrade( Grade g );
|
void SetGrade( Grade g );
|
||||||
int GetScore() const;
|
int GetScore() const;
|
||||||
void SetScore( int iScore );
|
void SetScore( int iScore );
|
||||||
float fPercentDP;
|
float GetPercentDP() const;
|
||||||
float fSurviveSeconds;
|
void SetPercentDP( float f );
|
||||||
|
float GetSurviveSeconds() const;
|
||||||
|
void SetSurviveSeconds( float f );
|
||||||
|
float GetSurvivalSeconds() const;
|
||||||
CString sModifiers;
|
CString sModifiers;
|
||||||
DateTime dateTime; // return value of time() when screenshot was taken
|
DateTime dateTime; // return value of time() when screenshot was taken
|
||||||
CString sPlayerGuid; // who made this high score
|
CString sPlayerGuid; // who made this high score
|
||||||
@@ -42,8 +45,6 @@ struct HighScore
|
|||||||
bool operator>=( const HighScore& other ) const;
|
bool operator>=( const HighScore& other ) const;
|
||||||
bool operator==( const HighScore& other ) const;
|
bool operator==( const HighScore& other ) const;
|
||||||
|
|
||||||
float GetSurvivalSeconds() const { return fSurviveSeconds + fLifeRemainingSeconds; }
|
|
||||||
|
|
||||||
XNode* CreateNode() const;
|
XNode* CreateNode() const;
|
||||||
void LoadFromNode( const XNode* pNode );
|
void LoadFromNode( const XNode* pNode );
|
||||||
|
|
||||||
|
|||||||
@@ -181,22 +181,22 @@ void PaneDisplay::SetContent( PaneContents c )
|
|||||||
case COURSE_HANDS:
|
case COURSE_HANDS:
|
||||||
case SONG_HANDS: val = rv[RADAR_NUM_HANDS]; break;
|
case SONG_HANDS: val = rv[RADAR_NUM_HANDS]; break;
|
||||||
case SONG_PROFILE_HIGH_SCORE:
|
case SONG_PROFILE_HIGH_SCORE:
|
||||||
val = PROFILEMAN->GetProfile(m_PlayerNumber)->GetStepsHighScoreList(pSong,pSteps).GetTopScore().fPercentDP;
|
val = PROFILEMAN->GetProfile(m_PlayerNumber)->GetStepsHighScoreList(pSong,pSteps).GetTopScore().GetPercentDP();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SONG_MACHINE_HIGH_NAME: /* set val for color */
|
case SONG_MACHINE_HIGH_NAME: /* set val for color */
|
||||||
case SONG_MACHINE_HIGH_SCORE:
|
case SONG_MACHINE_HIGH_SCORE:
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
val = PROFILEMAN->GetMachineProfile()->GetStepsHighScoreList(pSong,pSteps).GetTopScore().fPercentDP;
|
val = PROFILEMAN->GetMachineProfile()->GetStepsHighScoreList(pSong,pSteps).GetTopScore().GetPercentDP();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COURSE_MACHINE_HIGH_NAME: /* set val for color */
|
case COURSE_MACHINE_HIGH_NAME: /* set val for color */
|
||||||
case COURSE_MACHINE_HIGH_SCORE:
|
case COURSE_MACHINE_HIGH_SCORE:
|
||||||
val = PROFILEMAN->GetMachineProfile()->GetCourseHighScoreList(pCourse,pTrail).GetTopScore().fPercentDP;
|
val = PROFILEMAN->GetMachineProfile()->GetCourseHighScoreList(pCourse,pTrail).GetTopScore().GetPercentDP();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COURSE_PROFILE_HIGH_SCORE:
|
case COURSE_PROFILE_HIGH_SCORE:
|
||||||
val = PROFILEMAN->GetProfile(m_PlayerNumber)->GetCourseHighScoreList(pCourse,pTrail).GetTopScore().fPercentDP;
|
val = PROFILEMAN->GetProfile(m_PlayerNumber)->GetCourseHighScoreList(pCourse,pTrail).GetTopScore().GetPercentDP();
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ float Profile::GetSongsActual( StepsType st, Difficulty dc ) const
|
|||||||
const HighScoresForASteps& h = j->second;
|
const HighScoresForASteps& h = j->second;
|
||||||
const HighScoreList& hsl = h.hsl;
|
const HighScoreList& hsl = h.hsl;
|
||||||
|
|
||||||
fTotalPercents += hsl.GetTopScore().fPercentDP;
|
fTotalPercents += hsl.GetTopScore().GetPercentDP();
|
||||||
}
|
}
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
}
|
}
|
||||||
@@ -454,7 +454,7 @@ float Profile::GetCoursesActual( StepsType st, CourseDifficulty cd ) const
|
|||||||
const HighScoresForATrail& h = j->second;
|
const HighScoresForATrail& h = j->second;
|
||||||
const HighScoreList& hsl = h.hsl;
|
const HighScoreList& hsl = h.hsl;
|
||||||
|
|
||||||
fTotalPercents += hsl.GetTopScore().fPercentDP;
|
fTotalPercents += hsl.GetTopScore().GetPercentDP();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ int ProfileManager::GetSongNumTimesPlayed( const Song* pSong, ProfileSlot slot )
|
|||||||
void ProfileManager::AddStepsScore( const Song* pSong, const Steps* pSteps, PlayerNumber pn, const HighScore &hs_, int &iPersonalIndexOut, int &iMachineIndexOut )
|
void ProfileManager::AddStepsScore( const Song* pSong, const Steps* pSteps, PlayerNumber pn, const HighScore &hs_, int &iPersonalIndexOut, int &iMachineIndexOut )
|
||||||
{
|
{
|
||||||
HighScore hs = hs_;
|
HighScore hs = hs_;
|
||||||
hs.fPercentDP = max( 0, hs.fPercentDP ); // bump up negative scores
|
hs.SetPercentDP( max(0, hs.GetPercentDP()) ); // bump up negative scores
|
||||||
|
|
||||||
iPersonalIndexOut = -1;
|
iPersonalIndexOut = -1;
|
||||||
iMachineIndexOut = -1;
|
iMachineIndexOut = -1;
|
||||||
@@ -556,7 +556,7 @@ void ProfileManager::AddStepsScore( const Song* pSong, const Steps* pSteps, Play
|
|||||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||||
PROFILEMAN->GetProfile(pn)->AddStepsHighScore( pSong, pSteps, hs, iPersonalIndexOut );
|
PROFILEMAN->GetProfile(pn)->AddStepsHighScore( pSong, pSteps, hs, iPersonalIndexOut );
|
||||||
|
|
||||||
if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForMachineSongHighScore )
|
if( hs.GetPercentDP() >= PREFSMAN->m_fMinPercentageForMachineSongHighScore )
|
||||||
{
|
{
|
||||||
// don't leave machine high scores for edits loaded from the player's card
|
// don't leave machine high scores for edits loaded from the player's card
|
||||||
if( !pSteps->IsAPlayerEdit() )
|
if( !pSteps->IsAPlayerEdit() )
|
||||||
@@ -600,7 +600,7 @@ void ProfileManager::GetHighScoreForDifficulty( const Song *s, const Style *st,
|
|||||||
void ProfileManager::AddCourseScore( const Course* pCourse, const Trail* pTrail, PlayerNumber pn, const HighScore &hs_, int &iPersonalIndexOut, int &iMachineIndexOut )
|
void ProfileManager::AddCourseScore( const Course* pCourse, const Trail* pTrail, PlayerNumber pn, const HighScore &hs_, int &iPersonalIndexOut, int &iMachineIndexOut )
|
||||||
{
|
{
|
||||||
HighScore hs = hs_;
|
HighScore hs = hs_;
|
||||||
hs.fPercentDP = max( 0, hs.fPercentDP ); // bump up negative scores
|
hs.SetPercentDP(max( 0, hs.GetPercentDP()) ); // bump up negative scores
|
||||||
|
|
||||||
iPersonalIndexOut = -1;
|
iPersonalIndexOut = -1;
|
||||||
iMachineIndexOut = -1;
|
iMachineIndexOut = -1;
|
||||||
@@ -626,7 +626,7 @@ void ProfileManager::AddCourseScore( const Course* pCourse, const Trail* pTrail,
|
|||||||
//
|
//
|
||||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||||
PROFILEMAN->GetProfile(pn)->AddCourseHighScore( pCourse, pTrail, hs, iPersonalIndexOut );
|
PROFILEMAN->GetProfile(pn)->AddCourseHighScore( pCourse, pTrail, hs, iPersonalIndexOut );
|
||||||
if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForMachineCourseHighScore )
|
if( hs.GetPercentDP() >= PREFSMAN->m_fMinPercentageForMachineCourseHighScore )
|
||||||
PROFILEMAN->GetMachineProfile()->AddCourseHighScore( pCourse, pTrail, hs, iMachineIndexOut );
|
PROFILEMAN->GetMachineProfile()->AddCourseHighScore( pCourse, pTrail, hs, iMachineIndexOut );
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -654,7 +654,7 @@ void ProfileManager::AddCategoryScore( StepsType st, RankingCategory rc, PlayerN
|
|||||||
hs.SetName( RANKING_TO_FILL_IN_MARKER[pn] );
|
hs.SetName( RANKING_TO_FILL_IN_MARKER[pn] );
|
||||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||||
PROFILEMAN->GetProfile(pn)->AddCategoryHighScore( st, rc, hs, iPersonalIndexOut );
|
PROFILEMAN->GetProfile(pn)->AddCategoryHighScore( st, rc, hs, iPersonalIndexOut );
|
||||||
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForMachineSongHighScore )
|
if( hs.GetPercentDP() > PREFSMAN->m_fMinPercentageForMachineSongHighScore )
|
||||||
PROFILEMAN->GetMachineProfile()->AddCategoryHighScore( st, rc, hs, iMachineIndexOut );
|
PROFILEMAN->GetMachineProfile()->AddCategoryHighScore( st, rc, hs, iMachineIndexOut );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -899,8 +899,8 @@ void ScreenEvaluation::CommitScores(
|
|||||||
hs.SetName( RANKING_TO_FILL_IN_MARKER[p] );
|
hs.SetName( RANKING_TO_FILL_IN_MARKER[p] );
|
||||||
hs.SetGrade( stageStats.m_player[p].GetGrade() );
|
hs.SetGrade( stageStats.m_player[p].GetGrade() );
|
||||||
hs.SetScore( stageStats.m_player[p].iScore );
|
hs.SetScore( stageStats.m_player[p].iScore );
|
||||||
hs.fPercentDP = stageStats.m_player[p].GetPercentDancePoints();
|
hs.SetPercentDP( stageStats.m_player[p].GetPercentDancePoints() );
|
||||||
hs.fSurviveSeconds = stageStats.m_player[p].fAliveSeconds;
|
hs.SetSurviveSeconds( stageStats.m_player[p].fAliveSeconds );
|
||||||
hs.sModifiers = GAMESTATE->m_pPlayerState[p]->m_PlayerOptions.GetString();
|
hs.sModifiers = GAMESTATE->m_pPlayerState[p]->m_PlayerOptions.GetString();
|
||||||
hs.dateTime = DateTime::GetNowDateTime();
|
hs.dateTime = DateTime::GetNowDateTime();
|
||||||
hs.sPlayerGuid = PROFILEMAN->IsPersistentProfile(p) ? PROFILEMAN->GetProfile(p)->m_sGuid : CString("");
|
hs.sPlayerGuid = PROFILEMAN->IsPersistentProfile(p) ? PROFILEMAN->GetProfile(p)->m_sGuid : CString("");
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ void HighScoreWheelItem::Load( int iRankIndex, const HighScore& hs )
|
|||||||
m_textScore.SetName( "Score" );
|
m_textScore.SetName( "Score" );
|
||||||
m_textScore.LoadFromFont( THEME->GetPathF(m_sName,"score") );
|
m_textScore.LoadFromFont( THEME->GetPathF(m_sName,"score") );
|
||||||
if( PREFSMAN->m_bPercentageScoring )
|
if( PREFSMAN->m_bPercentageScoring )
|
||||||
m_textScore.SetText( PercentageDisplay::FormatPercentScore(hs.fPercentDP) );
|
m_textScore.SetText( PercentageDisplay::FormatPercentScore(hs.GetPercentDP()) );
|
||||||
else
|
else
|
||||||
m_textScore.SetText( ssprintf("%i", hs.GetScore()) );
|
m_textScore.SetText( ssprintf("%i", hs.GetScore()) );
|
||||||
m_textScore.SetShadowLength( 2 );
|
m_textScore.SetShadowLength( 2 );
|
||||||
@@ -170,7 +170,7 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S
|
|||||||
|
|
||||||
HighScore hs;
|
HighScore hs;
|
||||||
hs.SetGrade( GRADE_TIER03 );
|
hs.SetGrade( GRADE_TIER03 );
|
||||||
hs.fPercentDP = ss.m_player[p].GetPercentDancePoints();
|
hs.SetPercentDP( ss.m_player[p].GetPercentDancePoints() );
|
||||||
hs.SetScore( ss.m_player[p].iScore );
|
hs.SetScore( ss.m_player[p].iScore );
|
||||||
hs.dateTime = DateTime::GetNowDateTime();
|
hs.dateTime = DateTime::GetNowDateTime();
|
||||||
int a, b;
|
int a, b;
|
||||||
@@ -360,7 +360,7 @@ void ScreenNameEntryTraditional::Init()
|
|||||||
{
|
{
|
||||||
const HighScore &hs = hsl.vHighScores[h];
|
const HighScore &hs = hsl.vHighScores[h];
|
||||||
if( hs.GetName() == RANKING_TO_FILL_IN_MARKER[p] &&
|
if( hs.GetName() == RANKING_TO_FILL_IN_MARKER[p] &&
|
||||||
hs.fPercentDP == fPercentDP &&
|
hs.GetPercentDP() == fPercentDP &&
|
||||||
hs.GetScore() == iScore )
|
hs.GetScore() == iScore )
|
||||||
{
|
{
|
||||||
iHighScoreIndex = h;
|
iHighScoreIndex = h;
|
||||||
|
|||||||
@@ -812,7 +812,7 @@ float ScreenRanking::SetPage( PageToShow pts )
|
|||||||
if( pts.pCourse->IsOni() )
|
if( pts.pCourse->IsOni() )
|
||||||
{
|
{
|
||||||
m_textPoints[l].SetText( ssprintf("%04d",hs.GetScore()) );
|
m_textPoints[l].SetText( ssprintf("%04d",hs.GetScore()) );
|
||||||
m_textTime[l].SetText( SecondsToMMSSMsMs(hs.fSurviveSeconds) );
|
m_textTime[l].SetText( SecondsToMMSSMsMs(hs.GetSurviveSeconds()) );
|
||||||
m_textScores[l].SetText( "" );
|
m_textScores[l].SetText( "" );
|
||||||
} else {
|
} else {
|
||||||
m_textPoints[l].SetText( "" );
|
m_textPoints[l].SetText( "" );
|
||||||
@@ -876,7 +876,7 @@ float ScreenRanking::SetPage( PageToShow pts )
|
|||||||
hs.SetName( NO_SCORE_NAME );
|
hs.SetName( NO_SCORE_NAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
CString s = hs.GetDisplayName() + "\n" + PercentageDisplay::FormatPercentScore( hs.fPercentDP );
|
CString s = hs.GetDisplayName() + "\n" + PercentageDisplay::FormatPercentScore( hs.GetPercentDP() );
|
||||||
if( SHOW_SURVIVAL_TIME )
|
if( SHOW_SURVIVAL_TIME )
|
||||||
s += " " + SecondsToMSSMsMs(hs.GetSurvivalSeconds());
|
s += " " + SecondsToMSSMsMs(hs.GetSurvivalSeconds());
|
||||||
pTextStepsScore->SetText( s );
|
pTextStepsScore->SetText( s );
|
||||||
@@ -923,7 +923,7 @@ float ScreenRanking::SetPage( PageToShow pts )
|
|||||||
hs.SetName( NO_SCORE_NAME );
|
hs.SetName( NO_SCORE_NAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
CString s = hs.GetDisplayName() + "\n" + PercentageDisplay::FormatPercentScore( hs.fPercentDP );
|
CString s = hs.GetDisplayName() + "\n" + PercentageDisplay::FormatPercentScore( hs.GetPercentDP() );
|
||||||
if( SHOW_SURVIVAL_TIME )
|
if( SHOW_SURVIVAL_TIME )
|
||||||
s += " " + SecondsToMSSMsMs(hs.GetSurvivalSeconds());
|
s += " " + SecondsToMSSMsMs(hs.GetSurvivalSeconds());
|
||||||
pTextStepsScore->SetText( s );
|
pTextStepsScore->SetText( s );
|
||||||
|
|||||||
Reference in New Issue
Block a user