Avoid checking for bHoldNoteBeginsOnThisBeat if the note skin doesn't
really need it.
This commit is contained in:
@@ -344,6 +344,11 @@ void NoteDisplay::Load( int iColNum, const PlayerState* pPlayerState, CString No
|
||||
}
|
||||
}
|
||||
|
||||
bool NoteDisplay::DrawHoldHeadForTapsOnSameRow() const
|
||||
{
|
||||
return cache->m_bDrawHoldHeadForTapsOnSameRow;
|
||||
}
|
||||
|
||||
void NoteDisplay::Update( float fDeltaTime )
|
||||
{
|
||||
/* This function is static: it's called once per game loop, not once per
|
||||
|
||||
@@ -24,6 +24,8 @@ public:
|
||||
void DrawActor( Actor* pActor, int iCol, float fBeat, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels, bool bUseLighting );
|
||||
void DrawTap( int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition, bool bIsMine, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels );
|
||||
void DrawHold( const HoldNote& hn, bool bIsBeingHeld, bool bIsActive, const HoldNoteResult &Result, float fPercentFadeToFail, bool bDrawGlowOnly, float fReverseOffsetPixels );
|
||||
|
||||
bool DrawHoldHeadForTapsOnSameRow() const;
|
||||
|
||||
protected:
|
||||
void SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor );
|
||||
|
||||
@@ -632,14 +632,22 @@ void NoteField::DrawPrimitives()
|
||||
if( fYOffset < iFirstPixelToDraw ) // off screen
|
||||
continue; // skip
|
||||
|
||||
// See if there is a hold step that begins on this index.
|
||||
ASSERT_M( NoteRowToBeat(i) > -2000, ssprintf("%i %i %i, %f %f", i, iLastIndexToDraw, iFirstIndexToDraw, GAMESTATE->m_fSongBeat, GAMESTATE->m_fMusicSeconds) );
|
||||
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
|
||||
NoteDisplayCols *nd = CurDisplay->second;
|
||||
|
||||
// See if there is a hold step that begins on this index. Only do this
|
||||
// if the note skin cares.
|
||||
bool bHoldNoteBeginsOnThisBeat = false;
|
||||
for( int c2=0; c2<m_pNoteData->GetNumTracks(); c2++ )
|
||||
if( nd->display[c].DrawHoldHeadForTapsOnSameRow() )
|
||||
{
|
||||
if( m_pNoteData->GetTapNote(c2, i).type == TapNote::hold_head)
|
||||
for( int c2=0; c2<m_pNoteData->GetNumTracks(); c2++ )
|
||||
{
|
||||
bHoldNoteBeginsOnThisBeat = true;
|
||||
break;
|
||||
if( m_pNoteData->GetTapNote(c2, i).type == TapNote::hold_head)
|
||||
{
|
||||
bHoldNoteBeginsOnThisBeat = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -654,9 +662,6 @@ void NoteField::DrawPrimitives()
|
||||
bool bIsMine = (tn.type == TapNote::mine);
|
||||
bool bIsAttack = (tn.type == TapNote::attack);
|
||||
|
||||
ASSERT_M( NoteRowToBeat(i) > -2000, ssprintf("%i %i %i, %f %f", i, iLastIndexToDraw, iFirstIndexToDraw, GAMESTATE->m_fSongBeat, GAMESTATE->m_fMusicSeconds) );
|
||||
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
|
||||
NoteDisplayCols *nd = CurDisplay->second;
|
||||
if( bIsAttack )
|
||||
{
|
||||
Sprite sprite;
|
||||
|
||||
Reference in New Issue
Block a user