ProfileHighScore -> PersonalHighScore, move ItsARecord decorations to Lua
This commit is contained in:
@@ -57,7 +57,7 @@ void PlayerStageStats::Init()
|
||||
|
||||
m_pdaToShow = PerDifficultyAward_Invalid;
|
||||
m_pcaToShow = PeakComboAward_Invalid;
|
||||
m_iProfileHighScoreIndex = -1;
|
||||
m_iPersonalHighScoreIndex = -1;
|
||||
m_iMachineHighScoreIndex = -1;
|
||||
m_bDisqualified = false;
|
||||
m_rc = RankingCategory_Invalid;
|
||||
@@ -673,7 +673,7 @@ public:
|
||||
DEFINE_METHOD( GetPercentDancePoints, GetPercentDancePoints() )
|
||||
DEFINE_METHOD( GetLessonScoreActual, GetLessonScoreActual() )
|
||||
DEFINE_METHOD( GetLessonScoreNeeded, GetLessonScoreNeeded() )
|
||||
DEFINE_METHOD( GetPersonalHighScoreIndex, m_iProfileHighScoreIndex )
|
||||
DEFINE_METHOD( GetPersonalHighScoreIndex, m_iPersonalHighScoreIndex )
|
||||
DEFINE_METHOD( GetMachineHighScoreIndex, m_iMachineHighScoreIndex )
|
||||
DEFINE_METHOD( GetPerDifficultyAward, m_pdaToShow )
|
||||
DEFINE_METHOD( GetPeakComboAward, m_pcaToShow )
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
PerDifficultyAward m_pdaToShow;
|
||||
PeakComboAward m_pcaToShow;
|
||||
|
||||
int m_iProfileHighScoreIndex;
|
||||
int m_iPersonalHighScoreIndex;
|
||||
int m_iMachineHighScoreIndex;
|
||||
bool m_bDisqualified;
|
||||
bool IsDisqualified() const;
|
||||
|
||||
@@ -171,7 +171,9 @@ void ScreenEvaluation::Init()
|
||||
ss.m_player[p].m_iTapNoteScores[TNS_W3] = RandomInt( 3 );
|
||||
ss.m_player[p].m_iPossibleGradePoints = 4*ScoreKeeperNormal::TapNoteScoreToGradePoints(TNS_W1, false);
|
||||
ss.m_player[p].m_fLifeRemainingSeconds = randomf( 90, 580 );
|
||||
ss.m_player[p].m_iScore = rand() % (90*1000*1000);
|
||||
ss.m_player[p].m_iScore = rand() % (900*1000*1000);
|
||||
ss.m_player[p].m_iPersonalHighScoreIndex = (rand() % 3) - 1;
|
||||
ss.m_player[p].m_iMachineHighScoreIndex = (rand() % 3) - 1;
|
||||
FOREACH_ENUM( RadarCategory, rc )
|
||||
{
|
||||
switch( rc )
|
||||
@@ -612,31 +614,9 @@ void ScreenEvaluation::Init()
|
||||
//
|
||||
// init records area
|
||||
//
|
||||
FOREACH_EnabledPlayer( p )
|
||||
{
|
||||
if( m_pStageStats->m_player[p].m_iMachineHighScoreIndex != -1 )
|
||||
{
|
||||
LuaThreadVariable var( "MachineHighScoreNumber", LuaReference::Create(m_pStageStats->m_player[p].m_iMachineHighScoreIndex+1) );
|
||||
m_sprMachineRecord[p].Load( THEME->GetPathG( m_sName, ssprintf("MachineRecord",m_pStageStats->m_player[p].m_iMachineHighScoreIndex+1) ) );
|
||||
m_sprMachineRecord[p]->SetName( ssprintf("MachineRecordP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( *m_sprMachineRecord[p], m_sName );
|
||||
SET_XY( m_sprMachineRecord[p] );
|
||||
this->AddChild( m_sprMachineRecord[p] );
|
||||
}
|
||||
if( m_pStageStats->m_player[p].m_iProfileHighScoreIndex != -1 )
|
||||
{
|
||||
LuaThreadVariable var( "ProfileHighScoreNumber", LuaReference::Create(m_pStageStats->m_player[p].m_iProfileHighScoreIndex+1) );
|
||||
m_sprProfileRecord[p].Load( THEME->GetPathG( m_sName, ssprintf("ProfileRecord",m_pStageStats->m_player[p].m_iProfileHighScoreIndex+1) ) );
|
||||
m_sprProfileRecord[p]->SetName( ssprintf("ProfileRecordP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( *m_sprProfileRecord[p], m_sName );
|
||||
SET_XY( m_sprProfileRecord[p] );
|
||||
this->AddChild( m_sprProfileRecord[p] );
|
||||
}
|
||||
}
|
||||
|
||||
bool bOneHasNewTopRecord = false;
|
||||
FOREACH_PlayerNumber( p )
|
||||
if( GAMESTATE->IsPlayerEnabled(p) && (m_pStageStats->m_player[p].m_iMachineHighScoreIndex != -1 || m_pStageStats->m_player[p].m_iProfileHighScoreIndex != -1) )
|
||||
if( GAMESTATE->IsPlayerEnabled(p) && (m_pStageStats->m_player[p].m_iMachineHighScoreIndex == 0 || m_pStageStats->m_player[p].m_iPersonalHighScoreIndex == 0) )
|
||||
bOneHasNewTopRecord = true;
|
||||
|
||||
Grade best_grade = Grade_NoData;
|
||||
|
||||
@@ -108,8 +108,6 @@ protected:
|
||||
BitmapText m_textTime[NUM_PLAYERS];
|
||||
|
||||
// extra area
|
||||
AutoActor m_sprMachineRecord[NUM_PLAYERS];
|
||||
AutoActor m_sprProfileRecord[NUM_PLAYERS];
|
||||
AutoActor m_sprTryExtraStage;
|
||||
bool m_bFailed;
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ void StageStats::CommitScores( bool bSummary )
|
||||
{
|
||||
FOREACH_PlayerNumber( pn )
|
||||
{
|
||||
m_player[pn].m_iProfileHighScoreIndex = 0;
|
||||
m_player[pn].m_iPersonalHighScoreIndex = 0;
|
||||
m_player[pn].m_iMachineHighScoreIndex = 0;
|
||||
}
|
||||
}
|
||||
@@ -209,7 +209,7 @@ void StageStats::CommitScores( bool bSummary )
|
||||
int iAverageMeter = GetAverageMeter(p);
|
||||
m_player[p].m_rc = AverageMeterToRankingCategory( iAverageMeter );
|
||||
|
||||
PROFILEMAN->AddCategoryScore( st, m_player[p].m_rc, p, hs, m_player[p].m_iProfileHighScoreIndex, m_player[p].m_iMachineHighScoreIndex );
|
||||
PROFILEMAN->AddCategoryScore( st, m_player[p].m_rc, p, hs, m_player[p].m_iPersonalHighScoreIndex, m_player[p].m_iMachineHighScoreIndex );
|
||||
|
||||
// TRICKY: Increment play count here, and not on ScreenGameplay like the others.
|
||||
PROFILEMAN->IncrementCategoryPlayCount( st, m_player[p].m_rc, p );
|
||||
@@ -220,13 +220,13 @@ void StageStats::CommitScores( bool bSummary )
|
||||
ASSERT( pCourse );
|
||||
Trail* pTrail = GAMESTATE->m_pCurTrail[p];
|
||||
|
||||
PROFILEMAN->AddCourseScore( pCourse, pTrail, p, hs, m_player[p].m_iProfileHighScoreIndex, m_player[p].m_iMachineHighScoreIndex );
|
||||
PROFILEMAN->AddCourseScore( pCourse, pTrail, p, hs, m_player[p].m_iPersonalHighScoreIndex, m_player[p].m_iMachineHighScoreIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT( pSteps );
|
||||
|
||||
PROFILEMAN->AddStepsScore( pSong, pSteps, p, hs, m_player[p].m_iProfileHighScoreIndex, m_player[p].m_iMachineHighScoreIndex );
|
||||
PROFILEMAN->AddStepsScore( pSong, pSteps, p, hs, m_player[p].m_iPersonalHighScoreIndex, m_player[p].m_iMachineHighScoreIndex );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user