narrow StageStats* -> PlayerStageStats*

This commit is contained in:
Glenn Maynard
2005-01-10 15:18:13 +00:00
parent fc163a4c04
commit c7c28b9aea
6 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ void LifeMeterBattery::Load( PlayerNumber pn )
if( bPlayerEnabled )
{
m_Percent.SetName( "LifeMeterBattery Percent" );
m_Percent.Load( pn, &g_CurStageStats, true );
m_Percent.Load( pn, &g_CurStageStats.m_player[pn], true );
this->AddChild( &m_Percent );
}
+3 -3
View File
@@ -18,7 +18,7 @@ PercentageDisplay::PercentageDisplay()
m_pSource = NULL;
}
void PercentageDisplay::Load( PlayerNumber pn, StageStats* pSource, bool bAutoRefresh )
void PercentageDisplay::Load( PlayerNumber pn, PlayerStageStats* pSource, bool bAutoRefresh )
{
ASSERT( m_sName != "" ); // set this!
m_PlayerNumber = pn;
@@ -64,7 +64,7 @@ void PercentageDisplay::Update( float fDeltaTime )
void PercentageDisplay::Refresh()
{
const int iActualDancePoints = m_pSource->m_player[m_PlayerNumber].iActualDancePoints;
const int iActualDancePoints = m_pSource->iActualDancePoints;
if( iActualDancePoints == m_Last )
return;
@@ -77,7 +77,7 @@ void PercentageDisplay::Refresh()
}
else
{
float fPercentDancePoints = m_pSource->m_player[m_PlayerNumber].GetPercentDancePoints();
float fPercentDancePoints = m_pSource->GetPercentDancePoints();
// clamp percentage - feedback is that negative numbers look weird here.
CLAMP( fPercentDancePoints, 0.f, 1.f );
+2 -2
View File
@@ -10,14 +10,14 @@ class PercentageDisplay: public ActorFrame
{
public:
PercentageDisplay();
void Load( PlayerNumber pn, StageStats *pSource, bool bAutoRefresh );
void Load( PlayerNumber pn, PlayerStageStats *pSource, bool bAutoRefresh );
void Update( float fDeltaTime );
void TweenOffScreen();
private:
void Refresh();
PlayerNumber m_PlayerNumber;
StageStats *m_pSource;
PlayerStageStats *m_pSource;
bool m_bAutoRefresh;
int m_Last;
BitmapText m_textPercent;
+1 -1
View File
@@ -16,7 +16,7 @@ ScoreDisplayPercentage::ScoreDisplayPercentage()
void ScoreDisplayPercentage::Init( const PlayerState* pPlayerState )
{
m_Percent.Load( pPlayerState->m_PlayerNumber, &g_CurStageStats, true );
m_Percent.Load( pPlayerState->m_PlayerNumber, &g_CurStageStats.m_player[pPlayerState->m_PlayerNumber], true );
}
/*
+1 -1
View File
@@ -517,7 +517,7 @@ void ScreenEvaluation::Init()
/* Use "ScreenEvaluation Percent" for the [metric set], but position and
* tween it with "PercentP1X", etc. */
m_Percent[p].SetName( "ScreenEvaluation Percent" );
m_Percent[p].Load( p, &g_CurStageStats, true );
m_Percent[p].Load( p, &g_CurStageStats.m_player[p], true );
m_Percent[p].SetXY( THEME->GetMetricF(m_sName, ssprintf("PercentP%dX",p+1)),
THEME->GetMetricF(m_sName,ssprintf("PercentP%dY",p+1)) );
m_Percent[p].RunCommands( THEME->GetMetricA(m_sName,ssprintf("PercentP%dOnCommand",p+1)) );
+1 -1
View File
@@ -382,7 +382,7 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S
this->AddChild( &display.m_Difficulty );
display.m_textScore.SetName( "ScreenNameEntryTraditional Percent" );
display.m_textScore.Load( p, &ss, false );
display.m_textScore.Load( p, &ss.m_player[p], false );
display.m_textScore.SetName( ssprintf("ScoreP%i",p+1) );
SET_ON( display.m_textScore );
this->AddChild( &display.m_textScore );