From 4d30695f08d3dda69096fbd7ab0decfa64174114 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 5 May 2008 22:34:34 +0000 Subject: [PATCH] add StrokeIsUnder font option --- stepmania/src/BitmapText.cpp | 29 ++++++++++++++++++++++------- stepmania/src/Font.cpp | 2 ++ stepmania/src/Font.h | 2 ++ 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/stepmania/src/BitmapText.cpp b/stepmania/src/BitmapText.cpp index 068dc315a4..fead91cac0 100644 --- a/stepmania/src/BitmapText.cpp +++ b/stepmania/src/BitmapText.cpp @@ -517,6 +517,18 @@ bool BitmapText::EarlyAbortDraw() const return m_wTextLines.empty(); } +#define DRAW_STROKE \ +bool bUsingStrokeTexture = !!m_vpFontPageTextures[0]->m_pTextureStroke; \ +if( bUsingStrokeTexture && m_StrokeColor.a > 0 ) \ +{ \ + RageColor c = m_StrokeColor; \ + c.a *= m_pTempState->diffuse[0].a; \ + for( unsigned i=0; iPopMatrix(); } + // + // render the stroke + // + if( m_pFont->GetStrokeIsUnder() ) + { + DRAW_STROKE; + } + // // render the diffuse pass // @@ -633,14 +653,9 @@ void BitmapText::DrawPrimitives() // // render the stroke // - bool bUsingStrokeTexture = !!m_vpFontPageTextures[0]->m_pTextureStroke; - if( bUsingStrokeTexture && m_StrokeColor.a > 0 ) + if( !m_pFont->GetStrokeIsUnder() ) { - RageColor c = m_StrokeColor; - c.a *= m_pTempState->diffuse[0].a; - for( unsigned i=0; i