chugging away at 3.0

This commit is contained in:
Chris Danford
2002-05-28 20:01:22 +00:00
parent 7800df57a1
commit f3c360a7d6
50 changed files with 605 additions and 555 deletions
+9 -24
View File
@@ -38,32 +38,17 @@ void TransitionKeepAlive::Update( float fDeltaTime )
void TransitionKeepAlive::DrawPrimitives()
{
if( m_TransitionState == closing_left ) // we're going back
{
// Draw a fade
// draw keep alive graphic
const float fPercentageOpaque = 1 - GetPercentageOpen();
if( fPercentageOpaque == 0 )
return; // draw nothing
float fPercentClosed = 1 - this->GetPercentageOpen();
fPercentClosed = min( 1, fPercentClosed*2 );
const float fPercentColor = fPercentClosed;
const float fPercentAlpha = min( fPercentClosed * 2, 1 );
D3DXCOLOR colorTemp = m_Color * fPercentageOpaque;
m_rect.SetDiffuseColor( colorTemp );
m_rect.Draw();
}
else // we're going forward
{
// draw keep alive graphic
float fPercentClosed = 1 - this->GetPercentageOpen();
fPercentClosed = min( 1, fPercentClosed*2 );
const float fPercentColor = fPercentClosed;
const float fPercentAlpha = min( fPercentClosed * 2, 1 );
m_sprLogo.SetDiffuseColor( D3DXCOLOR(fPercentColor,fPercentColor,fPercentColor,fPercentAlpha) );
m_sprLogo.SetZoomY( fPercentClosed );
if( fPercentClosed > 0 )
m_sprLogo.Draw();
}
m_sprLogo.SetDiffuseColor( D3DXCOLOR(fPercentColor,fPercentColor,fPercentColor,fPercentAlpha) );
m_sprLogo.SetZoomY( fPercentClosed );
if( fPercentClosed > 0 )
m_sprLogo.Draw();
}