pass tn to tap rendering, like hold rendering
simplify
This commit is contained in:
@@ -926,7 +926,7 @@ void NoteDisplay::DrawHold( const TapNote &tn, int iCol, int iRow, bool bIsBeing
|
|||||||
DrawHold( tn, iCol, iRow, bIsBeingHeld, bIsActive, Result, bIsAddition, fPercentFadeToFail, true, fReverseOffsetPixels, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
DrawHold( tn, iCol, iRow, bIsBeingHeld, bIsActive, Result, bIsAddition, fPercentFadeToFail, true, fReverseOffsetPixels, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteDisplay::DrawActor( Actor* pActor, int iCol, float fBeat, bool bIsAddition, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels, bool bUseLighting, NotePart part, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
void NoteDisplay::DrawActor( const TapNote& tn, Actor* pActor, int iCol, float fBeat, bool bIsAddition, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels, bool bUseLighting, NotePart part, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
||||||
{
|
{
|
||||||
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, iCol, fBeat );
|
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, iCol, fBeat );
|
||||||
const float fYPos = ArrowEffects::GetYPos( m_pPlayerState, iCol, fYOffset, fReverseOffsetPixels );
|
const float fYPos = ArrowEffects::GetYPos( m_pPlayerState, iCol, fYOffset, fReverseOffsetPixels );
|
||||||
@@ -981,19 +981,19 @@ void NoteDisplay::DrawActor( Actor* pActor, int iCol, float fBeat, bool bIsAddit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteDisplay::DrawTap( int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition, bool bIsMine, bool bIsLift, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
void NoteDisplay::DrawTap( const TapNote& tn, int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
||||||
{
|
{
|
||||||
Actor* pActor = NULL;
|
Actor* pActor = NULL;
|
||||||
bool bUseLighting = false;
|
bool bUseLighting = false;
|
||||||
NotePart part = NotePart_Tap;
|
NotePart part = NotePart_Tap;
|
||||||
|
|
||||||
if( bIsLift )
|
if( tn.type == TapNote::lift )
|
||||||
{
|
{
|
||||||
pActor = GetTapActor( m_TapLift, NotePart_Lift, fBeat );
|
pActor = GetTapActor( m_TapLift, NotePart_Lift, fBeat );
|
||||||
bUseLighting = cache->m_bTapLiftUseLighting;
|
bUseLighting = cache->m_bTapLiftUseLighting;
|
||||||
part = NotePart_Lift;
|
part = NotePart_Lift;
|
||||||
}
|
}
|
||||||
else if( bIsMine )
|
else if( tn.type == TapNote::mine )
|
||||||
{
|
{
|
||||||
pActor = GetTapActor( m_TapMine, NotePart_Mine, fBeat );
|
pActor = GetTapActor( m_TapMine, NotePart_Mine, fBeat );
|
||||||
bUseLighting = cache->m_bTapMineUseLighting;
|
bUseLighting = cache->m_bTapMineUseLighting;
|
||||||
@@ -1010,7 +1010,7 @@ void NoteDisplay::DrawTap( int iCol, float fBeat, bool bOnSameRowAsHoldStart, bo
|
|||||||
bUseLighting = cache->m_bTapNoteUseLighting;
|
bUseLighting = cache->m_bTapNoteUseLighting;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawActor( pActor, iCol, fBeat, bIsAddition, fPercentFadeToFail, fLife, fReverseOffsetPixels, bUseLighting, part, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
DrawActor( tn, pActor, iCol, fBeat, bIsAddition, fPercentFadeToFail, fLife, fReverseOffsetPixels, bUseLighting, part, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -77,9 +77,9 @@ public:
|
|||||||
|
|
||||||
static void Update( float fDeltaTime );
|
static void Update( float fDeltaTime );
|
||||||
|
|
||||||
void DrawActor( Actor* pActor, int iCol, float fBeat, bool bIsAddition, float fPercentFadeToFail, float fLife,
|
void DrawActor( const TapNote& tn, Actor* pActor, int iCol, float fBeat, bool bIsAddition, float fPercentFadeToFail, float fLife,
|
||||||
float fReverseOffsetPixels, bool bUseLighting, NotePart part, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
float fReverseOffsetPixels, bool bUseLighting, NotePart part, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
||||||
void DrawTap( int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition, bool bIsMine, bool bIsLift,
|
void DrawTap( const TapNote& tn, int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition,
|
||||||
float fPercentFadeToFail, float fLife, float fReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
float fPercentFadeToFail, float fLife, float fReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
||||||
void DrawHold( const TapNote& tn, int iCol, int iRow, bool bIsBeingHeld, bool bIsActive, const HoldNoteResult &Result,
|
void DrawHold( const TapNote& tn, int iCol, int iRow, bool bIsBeingHeld, bool bIsActive, const HoldNoteResult &Result,
|
||||||
bool bIsAddition, float fPercentFadeToFail, bool bDrawGlowOnly, float fReverseOffsetPixels, float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels,
|
bool bIsAddition, float fPercentFadeToFail, bool bDrawGlowOnly, float fReverseOffsetPixels, float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels,
|
||||||
|
|||||||
@@ -858,9 +858,7 @@ void NoteField::DrawPrimitives()
|
|||||||
bool bIsAddition = (tn.source == TapNote::addition);
|
bool bIsAddition = (tn.source == TapNote::addition);
|
||||||
bool bIsHopoPossible = (tn.bHopoPossible);
|
bool bIsHopoPossible = (tn.bHopoPossible);
|
||||||
bool bUseAdditionColoring = bIsAddition || bIsHopoPossible;
|
bool bUseAdditionColoring = bIsAddition || bIsHopoPossible;
|
||||||
bool bIsMine = (tn.type == TapNote::mine);
|
|
||||||
bool bIsAttack = (tn.type == TapNote::attack);
|
bool bIsAttack = (tn.type == TapNote::attack);
|
||||||
bool bIsLift = (tn.type == TapNote::lift);
|
|
||||||
NoteDisplayCols *displayCols = tn.pn == PLAYER_INVALID ? m_pCurDisplay : m_pDisplays[tn.pn];
|
NoteDisplayCols *displayCols = tn.pn == PLAYER_INVALID ? m_pCurDisplay : m_pDisplays[tn.pn];
|
||||||
|
|
||||||
if( bIsAttack )
|
if( bIsAttack )
|
||||||
@@ -868,11 +866,11 @@ void NoteField::DrawPrimitives()
|
|||||||
Sprite sprite;
|
Sprite sprite;
|
||||||
sprite.Load( THEME->GetPathG("NoteField","attack "+tn.sAttackModifiers) );
|
sprite.Load( THEME->GetPathG("NoteField","attack "+tn.sAttackModifiers) );
|
||||||
float fBeat = NoteRowToBeat(i);
|
float fBeat = NoteRowToBeat(i);
|
||||||
displayCols->display[c].DrawActor( &sprite, c, fBeat, bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels, false, NotePart_Tap, iDrawDistanceBeforeTargetsPixels, FADE_BEFORE_TARGETS_PERCENT );
|
displayCols->display[c].DrawActor( tn, &sprite, c, fBeat, bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels, false, NotePart_Tap, iDrawDistanceBeforeTargetsPixels, FADE_BEFORE_TARGETS_PERCENT );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
displayCols->display[c].DrawTap( c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bUseAdditionColoring, bIsMine, bIsLift, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels, iDrawDistanceBeforeTargetsPixels, FADE_BEFORE_TARGETS_PERCENT );
|
displayCols->display[c].DrawTap( tn, c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels, iDrawDistanceBeforeTargetsPixels, FADE_BEFORE_TARGETS_PERCENT );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user