fix goofy lifemeter and disappearing HoldNote bodies (z-buffer problems)
This commit is contained in:
@@ -53,8 +53,10 @@ public:
|
||||
|
||||
bool bExtra = GAMESTATE->IsExtraStage()||GAMESTATE->IsExtraStage2();
|
||||
|
||||
m_quadMask.SetDiffuse( RageColor(0,0,0,0) );
|
||||
m_quadMask.SetDiffuse( RageColor(0,0,0,1) );
|
||||
m_quadMask.SetZ( 1 );
|
||||
m_quadMask.SetBlendMode( BLEND_NO_EFFECT );
|
||||
m_quadMask.SetUseZBuffer( true );
|
||||
|
||||
CString sGraphicPath;
|
||||
RageTextureID ID;
|
||||
@@ -63,10 +65,12 @@ public:
|
||||
sGraphicPath = ssprintf("LifeMeterBar %snormal", bExtra?"extra ":"");
|
||||
ID.filename = THEME->GetPathToG(sGraphicPath);
|
||||
m_sprStreamNormal.Load( ID );
|
||||
m_sprStreamNormal.SetUseZBuffer( true );
|
||||
|
||||
sGraphicPath = ssprintf("LifeMeterBar %shot", bExtra?"extra ":"");
|
||||
ID.filename = THEME->GetPathToG(sGraphicPath);
|
||||
m_sprStreamHot.Load( ID );
|
||||
m_sprStreamHot.SetUseZBuffer( true );
|
||||
|
||||
sGraphicPath = ssprintf("LifeMeterBar %sframe", bExtra?"extra ":"");
|
||||
ID.filename = THEME->GetPathToG(sGraphicPath);
|
||||
@@ -116,8 +120,6 @@ public:
|
||||
|
||||
void DrawPrimitives()
|
||||
{
|
||||
DISPLAY->SetZBuffer( true );
|
||||
|
||||
if( GAMESTATE->IsPlayerEnabled(m_PlayerNumber) )
|
||||
{
|
||||
DrawMask( m_fPercent ); // this is the "right endcap" to the life
|
||||
@@ -139,8 +141,6 @@ public:
|
||||
|
||||
}
|
||||
|
||||
DISPLAY->SetZBuffer( false );
|
||||
|
||||
m_sprFrame.Draw();
|
||||
|
||||
}
|
||||
@@ -226,7 +226,6 @@ public:
|
||||
|
||||
m_quadMask.StretchTo( rect );
|
||||
m_quadMask.Draw();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -419,6 +419,8 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
const RectF *pRect = pBottomCap->GetCurrentTextureCoordRect();
|
||||
DISPLAY->SetTexture( pTexture );
|
||||
DISPLAY->SetBlendMode( BLEND_NORMAL );
|
||||
DISPLAY->SetBackfaceCull( false );
|
||||
DISPLAY->SetZBuffer( false );
|
||||
if( bDrawGlowOnly )
|
||||
DISPLAY->SetTextureModeGlow();
|
||||
else
|
||||
@@ -484,6 +486,8 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
const RectF *pRect = pSprBody->GetCurrentTextureCoordRect();
|
||||
DISPLAY->SetTexture( pTexture );
|
||||
DISPLAY->SetBlendMode( BLEND_NORMAL );
|
||||
DISPLAY->SetBackfaceCull( false );
|
||||
DISPLAY->SetZBuffer( false );
|
||||
if( bDrawGlowOnly )
|
||||
DISPLAY->SetTextureModeGlow();
|
||||
else
|
||||
@@ -562,6 +566,8 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
const RectF *pRect = pSprTopCap->GetCurrentTextureCoordRect();
|
||||
DISPLAY->SetTexture( pTexture );
|
||||
DISPLAY->SetBlendMode( BLEND_NORMAL );
|
||||
DISPLAY->SetBackfaceCull( false );
|
||||
DISPLAY->SetZBuffer( false );
|
||||
if( bDrawGlowOnly )
|
||||
DISPLAY->SetTextureModeGlow();
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user