working on battle attacks

This commit is contained in:
Chris Danford
2003-11-15 08:51:47 +00:00
parent 7af9e51359
commit d51a3491a8
9 changed files with 143 additions and 87 deletions
+36 -20
View File
@@ -465,9 +465,9 @@ void NoteField::DrawPrimitives()
{
g_NoteFieldMode[m_PlayerNumber].BeginDrawTrack(c);
/////////////////////////////////
//
// Draw all HoldNotes in this column (so that they appear under the tap notes)
/////////////////////////////////
//
int i;
NDMap::iterator CurDisplay = m_BeatToNoteDisplays.begin();
@@ -507,9 +507,9 @@ void NoteField::DrawPrimitives()
}
///////////////////////////////////
//
// Draw all TapNotes in this column
///////////////////////////////////
//
CurDisplay = m_BeatToNoteDisplays.begin();
NextDisplay = CurDisplay; ++NextDisplay;
@@ -543,25 +543,41 @@ void NoteField::DrawPrimitives()
bool bIsAddition = (tn == TAP_ADDITION);
bool bIsMine = (tn == TAP_MINE);
bool bIsAttack = (tn==TAP_ATTACK);
if( bIsAttack )
{
const AttackNote* pA = GetAttackNoteAt( c, i );
Sprite sprite;
sprite.Load( THEME->GetPathToG("NoteField attack "+pA->sModifiers) );
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
NoteDisplayCols *nd = CurDisplay->second;
nd->display[c].DrawActor( &sprite, c, NoteRowToBeat(i), bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels );
}
else
{
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
NoteDisplayCols *nd = CurDisplay->second;
nd->display[c].DrawTap( c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bIsAddition, bIsMine, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels );
}
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
NoteDisplayCols *nd = CurDisplay->second;
nd->display[c].DrawTap( c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bIsAddition, bIsMine, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels );
}
//
// Draw all AttackNotes in this column
//
for( i=0; i < GetNumAttackNotes(); i++ )
{
const AttackNote& an = GetAttackNote( i );
// If this AttackNote isn't on the screen, skip it
if( an.iTrack != c ||
an.fBeat < fFirstBeatToDraw ||
an.fBeat > fLastBeatToDraw )
continue; // skip
bool bIsInSelectionRange = false;
if( m_fBeginMarker!=-1 && m_fEndMarker!=-1 )
{
bIsInSelectionRange = m_fBeginMarker<=an.fBeat && an.fBeat<=m_fEndMarker;
}
Sprite sprite;
sprite.Load( THEME->GetPathToG("NoteField attack "+an.sModifiers) );
SearchForBeat( CurDisplay, NextDisplay, an.fBeat );
NoteDisplayCols *nd = CurDisplay->second;
nd->display[c].DrawActor( &sprite, an.iTrack, an.fBeat, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels );
}
g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c);
}