Add scrolls: split and alternate

This commit is contained in:
Chris Danford
2003-08-17 00:15:54 +00:00
parent 7429c86ebe
commit 248a61513a
11 changed files with 105 additions and 52 deletions
+19 -20
View File
@@ -479,10 +479,10 @@ void NoteDisplay::DrawHoldTopCap( const HoldNote& hn, const bool bActive, float
ASSERT( fTexCoordTop>=-0.0001 && fTexCoordBottom<=1.0001 ); /* allow for rounding error */
const float fTexCoordLeft = pRect->left;
const float fTexCoordRight = pRect->right;
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop, fPercentFadeToFail );
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, fYBottom, fPercentFadeToFail );
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
const RageColor colorDiffuseTop = RageColor(fColorScale,fColorScale,fColorScale,fAlphaTop);
const RageColor colorDiffuseBottom = RageColor(fColorScale,fColorScale,fColorScale,fAlphaBottom);
const RageColor colorGlowTop = RageColor(1,1,1,fGlowTop);
@@ -562,10 +562,10 @@ void NoteDisplay::DrawHoldBody( const HoldNote& hn, const bool bActive, float fY
ASSERT( fTexCoordTop<=2 && fTexCoordBottom<=2 );
const float fTexCoordLeft = pRect->left;
const float fTexCoordRight = pRect->right;
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop, fPercentFadeToFail );
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, fYBottom, fPercentFadeToFail );
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
const RageColor colorDiffuseTop = RageColor(fColorScale,fColorScale,fColorScale,fAlphaTop);
const RageColor colorDiffuseBottom = RageColor(fColorScale,fColorScale,fColorScale,fAlphaBottom);
const RageColor colorGlowTop = RageColor(1,1,1,fGlowTop);
@@ -632,10 +632,10 @@ void NoteDisplay::DrawHoldBottomCap( const HoldNote& hn, const bool bActive, flo
const float fTexCoordBottom = SCALE( fBottomDistFromTailTop, 0, fFrameHeight, pRect->top, pRect->bottom );
const float fTexCoordLeft = pRect->left;
const float fTexCoordRight = pRect->right;
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop, fPercentFadeToFail );
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, fYBottom, fPercentFadeToFail );
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
const RageColor colorDiffuseTop = RageColor(fColorScale,fColorScale,fColorScale,fAlphaTop);
const RageColor colorDiffuseBottom = RageColor(fColorScale,fColorScale,fColorScale,fAlphaBottom);
const RageColor colorGlowTop = RageColor(1,1,1,fGlowTop);
@@ -667,8 +667,8 @@ void NoteDisplay::DrawHoldTail( const HoldNote& hn, bool bActive, float fYTail,
const float fY = fYTail;
const float fX = ArrowGetXPos( m_PlayerNumber, iCol, fY );
const float fZ = ArrowGetZPos( m_PlayerNumber, iCol, fY );
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fY, fPercentFadeToFail );
const float fGlow = ArrowGetGlow( m_PlayerNumber, fY, fPercentFadeToFail );
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, iCol, fY, fPercentFadeToFail );
const float fGlow = ArrowGetGlow( m_PlayerNumber, iCol, fY, fPercentFadeToFail );
const RageColor colorDiffuse= RageColor(fColorScale,fColorScale,fColorScale,fAlpha);
const RageColor colorGlow = RageColor(1,1,1,fGlow);
@@ -717,8 +717,8 @@ void NoteDisplay::DrawHoldHead( const HoldNote& hn, bool bActive, float fYHead,
const float fY = fYHead;
const float fX = ArrowGetXPos( m_PlayerNumber, iCol, fY );
const float fZ = ArrowGetZPos( m_PlayerNumber, iCol, fY );
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fY, fPercentFadeToFail );
const float fGlow = ArrowGetGlow( m_PlayerNumber, fY, fPercentFadeToFail );
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, iCol, fY, fPercentFadeToFail );
const float fGlow = ArrowGetGlow( m_PlayerNumber, iCol, fY, fPercentFadeToFail );
const RageColor colorDiffuse= RageColor(fColorScale,fColorScale,fColorScale,fAlpha);
const RageColor colorGlow = RageColor(1,1,1,fGlow);
@@ -760,9 +760,8 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
{
// bDrawGlowOnly is a little hacky. We need to draw the diffuse part and the glow part one pass at a time to minimize state changes
const bool bReverse = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fReverseScroll > 0.5;
const int iCol = hn.iTrack;
const bool bReverse = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].GetReversePercentForColumn(iCol) > 0.5;
const float fStartYOffset = ArrowGetYOffset( m_PlayerNumber, iCol, hn.fStartBeat );
const float fStartYPos = ArrowGetYPos( m_PlayerNumber, iCol, fStartYOffset, fReverseOffsetPixels );
const float fEndYOffset = ArrowGetYOffset( m_PlayerNumber, iCol, hn.fEndBeat );
@@ -812,8 +811,8 @@ void NoteDisplay::DrawTap( int iCol, float fBeat, bool bOnSameRowAsHoldStart, bo
const float fRotation = ArrowGetRotation( m_PlayerNumber, fBeat );
const float fXPos = ArrowGetXPos( m_PlayerNumber, iCol, fYPos );
const float fZPos = ArrowGetZPos( m_PlayerNumber, iCol, fYPos );
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fYPos, fPercentFadeToFail );
const float fGlow = ArrowGetGlow( m_PlayerNumber, fYPos, fPercentFadeToFail );
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, iCol, fYPos, fPercentFadeToFail );
const float fGlow = ArrowGetGlow( m_PlayerNumber, iCol, fYPos, fPercentFadeToFail );
const float fColorScale = ArrowGetBrightness( m_PlayerNumber, fBeat ) * SCALE(fLife,0,1,0.2f,1);
RageColor diffuse = RageColor(fColorScale,fColorScale,fColorScale,fAlpha);
RageColor glow = RageColor(1,1,1,fGlow);