add Actor::hidden flag (better than hiding by setting diffusealpha=0)

This commit is contained in:
Chris Danford
2003-10-22 10:18:46 +00:00
parent ca012307a5
commit 25a3a2e26a
3 changed files with 24 additions and 15 deletions
+4
View File
@@ -46,6 +46,7 @@ void Actor::Reset()
m_effectColor1 = RageColor(1,1,1,1);
m_effectColor2 = RageColor(1,1,1,1);
m_bHidden = false;
m_bShadow = false;
m_fShadowLength = 4;
m_bIsAnimating = true;
@@ -66,6 +67,9 @@ Actor::Actor()
void Actor::Draw()
{
if( m_bHidden )
return; // early abort
// call the most-derived versions
this->BeginDraw();
this->DrawPrimitives(); // call the most-derived version of DrawPrimitives();
+2
View File
@@ -240,6 +240,7 @@ public:
//
// other properties
//
void SetHidden( bool b ) { m_bHidden = b; }
void SetShadowLength( float fLength );
void EnableShadow( bool b ) { m_bShadow = b; }
@@ -324,6 +325,7 @@ protected:
//
// other properties
//
bool m_bHidden;
bool m_bShadow;
float m_fShadowLength;
bool m_bIsAnimating;
+18 -15
View File
@@ -533,25 +533,28 @@ void ScreenRanking::SetPage( PageToShow pts )
if( pSteps == NULL )
{
// set alpha to 0.0 and continue
m_sprDiffHeaders[d].SetDiffuse( RageColor(1,1,1,0) );
continue;
}
// set the header visible
m_sprDiffHeaders[d].SetDiffuse( RageColor(1,1,1,1) );
m_sprDiffHeaders[d].SetHidden( true );
else
m_sprDiffHeaders[d].SetDiffuse( RageColor(1,1,1,1) );
for( int l=0; l<NUM_RANKING_LINES; l++ )
{
Steps::MemCardData::HighScore hs;
if( l < (int)pSteps->m_MemCardDatas[MEMORY_CARD_MACHINE].vHighScores.size() )
hs = pSteps->m_MemCardDatas[MEMORY_CARD_MACHINE].vHighScores[l];
if( hs.sName.empty() )
hs.sName = EMPTY_SCORE_NAME;
if( pSteps == NULL )
{
m_textPercent[l][d].SetHidden( true );
}
else
{
Steps::MemCardData::HighScore hs;
if( l < (int)pSteps->m_MemCardDatas[MEMORY_CARD_MACHINE].vHighScores.size() )
hs = pSteps->m_MemCardDatas[MEMORY_CARD_MACHINE].vHighScores[l];
if( hs.sName.empty() )
hs.sName = EMPTY_SCORE_NAME;
m_textPercent[l][d].SetText( ssprintf("%s\n%0.3f%%", hs.sName.c_str(), hs.fPercentDP*100) );
m_textPercent[l][d].SetDiffuse( TEXT_COLOR(pts.colorIndex) );
m_textPercent[l][d].SetText( ssprintf("%s\n%0.3f%%", hs.sName.c_str(), hs.fPercentDP*100) );
m_textPercent[l][d].SetText( ssprintf("%s\n%0.3f%%", hs.sName.c_str(), hs.fPercentDP*100) );
m_textPercent[l][d].SetDiffuse( TEXT_COLOR(pts.colorIndex) );
}
}
}
}