narrow StageStats* -> PlayerStageStats*
This commit is contained in:
@@ -55,7 +55,7 @@ void LifeMeterBattery::Load( PlayerNumber pn )
|
|||||||
if( bPlayerEnabled )
|
if( bPlayerEnabled )
|
||||||
{
|
{
|
||||||
m_Percent.SetName( "LifeMeterBattery Percent" );
|
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 );
|
this->AddChild( &m_Percent );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ PercentageDisplay::PercentageDisplay()
|
|||||||
m_pSource = NULL;
|
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!
|
ASSERT( m_sName != "" ); // set this!
|
||||||
m_PlayerNumber = pn;
|
m_PlayerNumber = pn;
|
||||||
@@ -64,7 +64,7 @@ void PercentageDisplay::Update( float fDeltaTime )
|
|||||||
|
|
||||||
void PercentageDisplay::Refresh()
|
void PercentageDisplay::Refresh()
|
||||||
{
|
{
|
||||||
const int iActualDancePoints = m_pSource->m_player[m_PlayerNumber].iActualDancePoints;
|
const int iActualDancePoints = m_pSource->iActualDancePoints;
|
||||||
if( iActualDancePoints == m_Last )
|
if( iActualDancePoints == m_Last )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ void PercentageDisplay::Refresh()
|
|||||||
}
|
}
|
||||||
else
|
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 percentage - feedback is that negative numbers look weird here.
|
||||||
CLAMP( fPercentDancePoints, 0.f, 1.f );
|
CLAMP( fPercentDancePoints, 0.f, 1.f );
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ class PercentageDisplay: public ActorFrame
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PercentageDisplay();
|
PercentageDisplay();
|
||||||
void Load( PlayerNumber pn, StageStats *pSource, bool bAutoRefresh );
|
void Load( PlayerNumber pn, PlayerStageStats *pSource, bool bAutoRefresh );
|
||||||
void Update( float fDeltaTime );
|
void Update( float fDeltaTime );
|
||||||
void TweenOffScreen();
|
void TweenOffScreen();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Refresh();
|
void Refresh();
|
||||||
PlayerNumber m_PlayerNumber;
|
PlayerNumber m_PlayerNumber;
|
||||||
StageStats *m_pSource;
|
PlayerStageStats *m_pSource;
|
||||||
bool m_bAutoRefresh;
|
bool m_bAutoRefresh;
|
||||||
int m_Last;
|
int m_Last;
|
||||||
BitmapText m_textPercent;
|
BitmapText m_textPercent;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ ScoreDisplayPercentage::ScoreDisplayPercentage()
|
|||||||
|
|
||||||
void ScoreDisplayPercentage::Init( const PlayerState* pPlayerState )
|
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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ void ScreenEvaluation::Init()
|
|||||||
/* Use "ScreenEvaluation Percent" for the [metric set], but position and
|
/* Use "ScreenEvaluation Percent" for the [metric set], but position and
|
||||||
* tween it with "PercentP1X", etc. */
|
* tween it with "PercentP1X", etc. */
|
||||||
m_Percent[p].SetName( "ScreenEvaluation Percent" );
|
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)),
|
m_Percent[p].SetXY( THEME->GetMetricF(m_sName, ssprintf("PercentP%dX",p+1)),
|
||||||
THEME->GetMetricF(m_sName,ssprintf("PercentP%dY",p+1)) );
|
THEME->GetMetricF(m_sName,ssprintf("PercentP%dY",p+1)) );
|
||||||
m_Percent[p].RunCommands( THEME->GetMetricA(m_sName,ssprintf("PercentP%dOnCommand",p+1)) );
|
m_Percent[p].RunCommands( THEME->GetMetricA(m_sName,ssprintf("PercentP%dOnCommand",p+1)) );
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S
|
|||||||
this->AddChild( &display.m_Difficulty );
|
this->AddChild( &display.m_Difficulty );
|
||||||
|
|
||||||
display.m_textScore.SetName( "ScreenNameEntryTraditional Percent" );
|
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) );
|
display.m_textScore.SetName( ssprintf("ScoreP%i",p+1) );
|
||||||
SET_ON( display.m_textScore );
|
SET_ON( display.m_textScore );
|
||||||
this->AddChild( &display.m_textScore );
|
this->AddChild( &display.m_textScore );
|
||||||
|
|||||||
Reference in New Issue
Block a user