bFlipHeadAndTailWhenReverse flips the head and tail, and flips
the hold body. Flip the caps, too.
This commit is contained in:
@@ -462,8 +462,7 @@ void NoteDisplay::DrawHoldPart( vector<Sprite*> &vpSpr, int iCol, int fYStep, fl
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NoteDisplay::DrawHoldBody( const TapNote& tn, int iCol, float fBeat, bool bIsBeingHeld, float fYHead, float fYTail, int fYStep, bool bIsAddition, float fPercentFadeToFail, float fColorScale, bool bGlow,
|
void NoteDisplay::DrawHoldBody( const TapNote& tn, int iCol, float fBeat, bool bIsBeingHeld, float fYHead, float fYTail, int fYStep, bool bIsAddition, float fPercentFadeToFail, float fColorScale, bool bGlow,
|
||||||
float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar,
|
float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
||||||
bool bDrawTop, bool bDrawBottom )
|
|
||||||
{
|
{
|
||||||
vector<Sprite*> vpSprTop;
|
vector<Sprite*> vpSprTop;
|
||||||
Sprite *pSpriteTop = GetHoldSprite( m_HoldTopCap, NotePart_HoldTopCap, fBeat, tn.subType == TapNote::hold_head_roll, bIsBeingHeld && !cache->m_bHoldActiveIsAddLayer );
|
Sprite *pSpriteTop = GetHoldSprite( m_HoldTopCap, NotePart_HoldTopCap, fBeat, tn.subType == TapNote::hold_head_roll, bIsBeingHeld && !cache->m_bHoldActiveIsAddLayer );
|
||||||
@@ -487,6 +486,14 @@ void NoteDisplay::DrawHoldBody( const TapNote& tn, int iCol, float fBeat, bool b
|
|||||||
vpSprBottom.push_back( pSprBottom );
|
vpSprBottom.push_back( pSprBottom );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool bReverse = m_pPlayerState->m_PlayerOptions.GetCurrent().GetReversePercentForColumn(iCol) > 0.5f;
|
||||||
|
bool bFlipHeadAndTail = bReverse && cache->m_bFlipHeadAndTailWhenReverse;
|
||||||
|
if( bFlipHeadAndTail )
|
||||||
|
{
|
||||||
|
swap( vpSprTop, vpSprBottom );
|
||||||
|
swap( pSpriteTop, pSpriteBottom );
|
||||||
|
}
|
||||||
|
|
||||||
const float fFrameHeightTop = pSpriteTop->GetZoomedHeight();
|
const float fFrameHeightTop = pSpriteTop->GetZoomedHeight();
|
||||||
const float fFrameHeightBottom = pSpriteBottom->GetZoomedHeight();
|
const float fFrameHeightBottom = pSpriteBottom->GetZoomedHeight();
|
||||||
const float fYCapTop = fYHead+cache->m_iStartDrawingHoldBodyOffsetFromHead-fFrameHeightTop;
|
const float fYCapTop = fYHead+cache->m_iStartDrawingHoldBodyOffsetFromHead-fFrameHeightTop;
|
||||||
@@ -494,22 +501,20 @@ void NoteDisplay::DrawHoldBody( const TapNote& tn, int iCol, float fBeat, bool b
|
|||||||
const float fYBodyBottom = fYTail+cache->m_iStopDrawingHoldBodyOffsetFromTail;
|
const float fYBodyBottom = fYTail+cache->m_iStopDrawingHoldBodyOffsetFromTail;
|
||||||
const float fYCapBottom = fYTail+cache->m_iStopDrawingHoldBodyOffsetFromTail+fFrameHeightBottom;
|
const float fYCapBottom = fYTail+cache->m_iStopDrawingHoldBodyOffsetFromTail+fFrameHeightBottom;
|
||||||
|
|
||||||
const bool bReverse = m_pPlayerState->m_PlayerOptions.GetCurrent().GetReversePercentForColumn(iCol) > 0.5f;
|
|
||||||
|
|
||||||
float fYStartPos = ArrowEffects::GetYPos( m_pPlayerState, iCol, fDrawDistanceAfterTargetsPixels, m_fYReverseOffsetPixels );
|
float fYStartPos = ArrowEffects::GetYPos( m_pPlayerState, iCol, fDrawDistanceAfterTargetsPixels, m_fYReverseOffsetPixels );
|
||||||
float fYEndPos = ArrowEffects::GetYPos( m_pPlayerState, iCol, fDrawDistanceBeforeTargetsPixels, m_fYReverseOffsetPixels );
|
float fYEndPos = ArrowEffects::GetYPos( m_pPlayerState, iCol, fDrawDistanceBeforeTargetsPixels, m_fYReverseOffsetPixels );
|
||||||
if( bReverse )
|
if( bReverse )
|
||||||
swap( fYStartPos, fYEndPos );
|
swap( fYStartPos, fYEndPos );
|
||||||
|
|
||||||
// Draw the top cap
|
// Draw the top cap
|
||||||
if( bDrawTop )
|
|
||||||
DrawHoldPart(
|
DrawHoldPart(
|
||||||
vpSprTop,
|
vpSprTop,
|
||||||
iCol, fYStep, fPercentFadeToFail, fColorScale, bGlow,
|
iCol, fYStep, fPercentFadeToFail, fColorScale, bGlow,
|
||||||
fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar,
|
fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar,
|
||||||
fYCapTop, fYBodyTop,
|
fYCapTop, fYBodyTop,
|
||||||
fYStartPos, min(fYEndPos, fYTail),
|
fYStartPos, min(fYEndPos, fYTail),
|
||||||
false, false );
|
false,
|
||||||
|
bFlipHeadAndTail );
|
||||||
|
|
||||||
// Draw the body
|
// Draw the body
|
||||||
DrawHoldPart(
|
DrawHoldPart(
|
||||||
@@ -519,17 +524,17 @@ void NoteDisplay::DrawHoldBody( const TapNote& tn, int iCol, float fBeat, bool b
|
|||||||
fYBodyTop, fYBodyBottom,
|
fYBodyTop, fYBodyBottom,
|
||||||
fYStartPos, fYEndPos,
|
fYStartPos, fYEndPos,
|
||||||
true,
|
true,
|
||||||
bReverse && cache->m_bFlipHeadAndTailWhenReverse );
|
bFlipHeadAndTail );
|
||||||
|
|
||||||
// Draw the bottom cap
|
// Draw the bottom cap
|
||||||
if( bDrawBottom )
|
|
||||||
DrawHoldPart(
|
DrawHoldPart(
|
||||||
vpSprBottom,
|
vpSprBottom,
|
||||||
iCol, fYStep, fPercentFadeToFail, fColorScale, bGlow,
|
iCol, fYStep, fPercentFadeToFail, fColorScale, bGlow,
|
||||||
fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar,
|
fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar,
|
||||||
fYBodyBottom, fYCapBottom,
|
fYBodyBottom, fYCapBottom,
|
||||||
max(fYStartPos, fYHead), fYEndPos,
|
max(fYStartPos, fYHead), fYEndPos,
|
||||||
false, false );
|
false,
|
||||||
|
bFlipHeadAndTail );
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteDisplay::DrawHoldHeadTail( const TapNote& tn, Actor* pActor, NotePart part, int iCol, float fBeat, float fY, bool bIsAddition, float fPercentFadeToFail, float fColorScale,
|
void NoteDisplay::DrawHoldHeadTail( const TapNote& tn, Actor* pActor, NotePart part, int iCol, float fBeat, float fY, bool bIsAddition, float fPercentFadeToFail, float fColorScale,
|
||||||
@@ -663,7 +668,7 @@ void NoteDisplay::DrawHold( const TapNote &tn, int iCol, int iRow, bool bIsBeing
|
|||||||
DISPLAY->SetZTestMode( WavyPartsNeedZBuffer?ZTEST_WRITE_ON_PASS:ZTEST_OFF );
|
DISPLAY->SetZTestMode( WavyPartsNeedZBuffer?ZTEST_WRITE_ON_PASS:ZTEST_OFF );
|
||||||
DISPLAY->SetZWrite( WavyPartsNeedZBuffer );
|
DISPLAY->SetZWrite( WavyPartsNeedZBuffer );
|
||||||
|
|
||||||
DrawHoldBody( tn, iCol, fBeat, bIsBeingHeld, fYHead, fYTail, fYStep, bIsAddition, fPercentFadeToFail, fColorScale, bDrawGlowOnly, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar, bFlipHeadAndTail, !bFlipHeadAndTail );
|
DrawHoldBody( tn, iCol, fBeat, bIsBeingHeld, fYHead, fYTail, fYStep, bIsAddition, fPercentFadeToFail, fColorScale, bDrawGlowOnly, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||||
|
|
||||||
/* These set the texture mode themselves. */
|
/* These set the texture mode themselves. */
|
||||||
if( cache->m_bHoldTailIsAboveWavyParts )
|
if( cache->m_bHoldTailIsAboveWavyParts )
|
||||||
|
|||||||
@@ -95,8 +95,7 @@ private:
|
|||||||
float fReverseOffsetPixels, bool bUseLighting, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
float fReverseOffsetPixels, bool bUseLighting, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
||||||
void DrawHoldBody( const TapNote& tn, int iCol, float fBeat, bool bIsBeingHeld, float fYHead, float fYTail, int fYStep, bool bIsAddition, float fPercentFadeToFail,
|
void DrawHoldBody( const TapNote& tn, int iCol, float fBeat, bool bIsBeingHeld, float fYHead, float fYTail, int fYStep, bool bIsAddition, float fPercentFadeToFail,
|
||||||
float fColorScale,
|
float fColorScale,
|
||||||
bool bGlow, float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar,
|
bool bGlow, float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
||||||
bool bDrawTop, bool bDrawBottom );
|
|
||||||
void DrawHoldHeadTail( const TapNote& tn, Actor* pActor, NotePart part, int iCol, float fBeat, float fYHead, bool bIsAddition, float fPercentFadeToFail, float fColorScale,
|
void DrawHoldHeadTail( const TapNote& tn, Actor* pActor, NotePart part, int iCol, float fBeat, float fYHead, bool bIsAddition, float fPercentFadeToFail, float fColorScale,
|
||||||
bool bGlow, bool bUseLighting, float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
bool bGlow, bool bUseLighting, float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
||||||
void DrawHoldPart( vector<Sprite*> &vpSpr, int iCol, int fYStep, float fPercentFadeToFail, float fColorScale, bool bGlow,
|
void DrawHoldPart( vector<Sprite*> &vpSpr, int iCol, int fYStep, float fPercentFadeToFail, float fColorScale, bool bGlow,
|
||||||
|
|||||||
Reference in New Issue
Block a user