2x overdraw on the whole life meter stream so that translucency is even
This commit is contained in:
@@ -80,7 +80,10 @@ LifeMeterBar::LifeMeterBar()
|
|||||||
NUM_CHAMBERS,
|
NUM_CHAMBERS,
|
||||||
THEME->GetPathG(sType,sExtra+"normal"),
|
THEME->GetPathG(sType,sExtra+"normal"),
|
||||||
THEME->GetPathG(sType,sExtra+"hot"),
|
THEME->GetPathG(sType,sExtra+"hot"),
|
||||||
THEME->GetPathG(sType,sExtra+"passing")
|
THEME->GetPathG(sType,sExtra+"passing"),
|
||||||
|
THEME->GetMetricA(sType,"StreamNormalOnCommand"),
|
||||||
|
THEME->GetMetricA(sType,"StreamHotOnCommand"),
|
||||||
|
THEME->GetMetricA(sType,"StreamPassingOnCommand")
|
||||||
);
|
);
|
||||||
this->AddChild( m_pStream );
|
this->AddChild( m_pStream );
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,10 @@ void LifeMeterTime::Load( PlayerNumber pn )
|
|||||||
NUM_CHAMBERS,
|
NUM_CHAMBERS,
|
||||||
THEME->GetPathG(sType,sExtra+"normal"),
|
THEME->GetPathG(sType,sExtra+"normal"),
|
||||||
THEME->GetPathG(sType,sExtra+"hot"),
|
THEME->GetPathG(sType,sExtra+"hot"),
|
||||||
THEME->GetPathG(sType,sExtra+"passing")
|
THEME->GetPathG(sType,sExtra+"passing"),
|
||||||
|
THEME->GetMetricA(sType,"StreamNormalOnCommand"),
|
||||||
|
THEME->GetMetricA(sType,"StreamHotOnCommand"),
|
||||||
|
THEME->GetMetricA(sType,"StreamPassingOnCommand")
|
||||||
);
|
);
|
||||||
this->AddChild( m_pStream );
|
this->AddChild( m_pStream );
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ void StreamDisplay::Load(
|
|||||||
int iNumChambers,
|
int iNumChambers,
|
||||||
const CString &sNormalPath,
|
const CString &sNormalPath,
|
||||||
const CString &sHotPath,
|
const CString &sHotPath,
|
||||||
const CString &sPassingPath
|
const CString &sPassingPath,
|
||||||
|
const apActorCommands &acNormalOnCommand,
|
||||||
|
const apActorCommands &acHotOnCommand,
|
||||||
|
const apActorCommands &acPassingOnCommand
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
m_fMeterWidth = fMeterWidth;
|
m_fMeterWidth = fMeterWidth;
|
||||||
@@ -30,14 +33,17 @@ void StreamDisplay::Load(
|
|||||||
ID.filename = sNormalPath;
|
ID.filename = sNormalPath;
|
||||||
m_sprStreamNormal.Load( ID );
|
m_sprStreamNormal.Load( ID );
|
||||||
m_sprStreamNormal.SetUseZBuffer( true );
|
m_sprStreamNormal.SetUseZBuffer( true );
|
||||||
|
m_sprStreamNormal.RunCommands( acNormalOnCommand );
|
||||||
|
|
||||||
ID.filename = sHotPath;
|
ID.filename = sHotPath;
|
||||||
m_sprStreamHot.Load( ID );
|
m_sprStreamHot.Load( ID );
|
||||||
m_sprStreamHot.SetUseZBuffer( true );
|
m_sprStreamHot.SetUseZBuffer( true );
|
||||||
|
m_sprStreamHot.RunCommands( acHotOnCommand );
|
||||||
|
|
||||||
ID.filename = sPassingPath;
|
ID.filename = sPassingPath;
|
||||||
m_sprStreamPassing.Load( ID );
|
m_sprStreamPassing.Load( ID );
|
||||||
m_sprStreamPassing.SetUseZBuffer( true );
|
m_sprStreamPassing.SetUseZBuffer( true );
|
||||||
|
m_sprStreamPassing.RunCommands( acPassingOnCommand );
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamDisplay::Update( float fDeltaSecs )
|
void StreamDisplay::Update( float fDeltaSecs )
|
||||||
@@ -89,7 +95,7 @@ void StreamDisplay::DrawPrimitives()
|
|||||||
float fPercentOffset = fmodf( GAMESTATE->m_fSongBeat/4+1000, fPercentBetweenStrips );
|
float fPercentOffset = fmodf( GAMESTATE->m_fSongBeat/4+1000, fPercentBetweenStrips );
|
||||||
ASSERT( fPercentOffset >= 0 && fPercentOffset <= fPercentBetweenStrips );
|
ASSERT( fPercentOffset >= 0 && fPercentOffset <= fPercentBetweenStrips );
|
||||||
|
|
||||||
for( float f=fPercentOffset+1; f>=0; f-=fPercentBetweenStrips )
|
for( float f=fPercentOffset+2; f>=0; f-=fPercentBetweenStrips )
|
||||||
{
|
{
|
||||||
DrawMask( f );
|
DrawMask( f );
|
||||||
DrawStrip( f );
|
DrawStrip( f );
|
||||||
@@ -187,14 +193,20 @@ void StreamDisplay::DrawStrip( float fRightEdgePercent )
|
|||||||
m_sprStreamPassing.SetCustomTextureRect( frectCustomTexRect );
|
m_sprStreamPassing.SetCustomTextureRect( frectCustomTexRect );
|
||||||
m_sprStreamHot.SetCustomTextureRect( frectCustomTexRect );
|
m_sprStreamHot.SetCustomTextureRect( frectCustomTexRect );
|
||||||
|
|
||||||
m_sprStreamPassing.SetDiffuse( RageColor(1,1,1,m_fPassingAlpha) );
|
float fOrigPassingAlpha = m_sprStreamPassing.GetDiffuse().a;
|
||||||
m_sprStreamHot.SetDiffuse( RageColor(1,1,1,m_fHotAlpha) );
|
float fOrigHotAlpha = m_sprStreamHot.GetDiffuse().a;
|
||||||
|
|
||||||
|
m_sprStreamPassing.SetDiffuseAlpha( m_fPassingAlpha * fOrigPassingAlpha );
|
||||||
|
m_sprStreamHot.SetDiffuseAlpha( m_fHotAlpha * fOrigHotAlpha );
|
||||||
|
|
||||||
if( m_fPassingAlpha < 1 && m_fHotAlpha < 1)
|
if( m_fPassingAlpha < 1 && m_fHotAlpha < 1)
|
||||||
m_sprStreamNormal.Draw();
|
m_sprStreamNormal.Draw();
|
||||||
if( m_fHotAlpha < 1)
|
if( m_fHotAlpha < 1)
|
||||||
m_sprStreamPassing.Draw();
|
m_sprStreamPassing.Draw();
|
||||||
m_sprStreamHot.Draw();
|
m_sprStreamHot.Draw();
|
||||||
|
|
||||||
|
m_sprStreamPassing.SetDiffuseAlpha( fOrigPassingAlpha );
|
||||||
|
m_sprStreamHot.SetDiffuseAlpha( fOrigHotAlpha );
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamDisplay::DrawMask( float fPercent )
|
void StreamDisplay::DrawMask( float fPercent )
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ public:
|
|||||||
int iNumChambers,
|
int iNumChambers,
|
||||||
const CString &sNormalPath,
|
const CString &sNormalPath,
|
||||||
const CString &sHotPath,
|
const CString &sHotPath,
|
||||||
const CString &sPassingPath
|
const CString &sPassingPath,
|
||||||
|
const apActorCommands &acNormalOnCommand,
|
||||||
|
const apActorCommands &acHotOnCommand,
|
||||||
|
const apActorCommands &acPassingOnCommand
|
||||||
);
|
);
|
||||||
|
|
||||||
void DrawPrimitives();
|
void DrawPrimitives();
|
||||||
|
|||||||
Reference in New Issue
Block a user