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 )
|
void NoteDisplay::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
/* This function is static: it's called once per game loop, not once per
|
/* This function is static: it's called once per game loop, not once per
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ public:
|
|||||||
void DrawTap( int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition, bool bIsMine, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels );
|
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 );
|
void DrawHold( const HoldNote& hn, bool bIsBeingHeld, bool bIsActive, const HoldNoteResult &Result, float fPercentFadeToFail, bool bDrawGlowOnly, float fReverseOffsetPixels );
|
||||||
|
|
||||||
|
bool DrawHoldHeadForTapsOnSameRow() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor );
|
void SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor );
|
||||||
Actor *GetTapNoteActor( float fNoteBeat );
|
Actor *GetTapNoteActor( float fNoteBeat );
|
||||||
|
|||||||
@@ -632,14 +632,22 @@ void NoteField::DrawPrimitives()
|
|||||||
if( fYOffset < iFirstPixelToDraw ) // off screen
|
if( fYOffset < iFirstPixelToDraw ) // off screen
|
||||||
continue; // skip
|
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;
|
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;
|
if( m_pNoteData->GetTapNote(c2, i).type == TapNote::hold_head)
|
||||||
break;
|
{
|
||||||
|
bHoldNoteBeginsOnThisBeat = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -654,9 +662,6 @@ void NoteField::DrawPrimitives()
|
|||||||
bool bIsMine = (tn.type == TapNote::mine);
|
bool bIsMine = (tn.type == TapNote::mine);
|
||||||
bool bIsAttack = (tn.type == TapNote::attack);
|
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 )
|
if( bIsAttack )
|
||||||
{
|
{
|
||||||
Sprite sprite;
|
Sprite sprite;
|
||||||
|
|||||||
Reference in New Issue
Block a user