use GetHoldNote
This commit is contained in:
@@ -89,7 +89,7 @@ int NoteDataWithScoring::GetNumHoldNotesWithScore( HoldNoteScore hns, const floa
|
||||
|
||||
for( int i=0; i<m_iNumHoldNotes; i++ )
|
||||
{
|
||||
HoldNote &hn = m_HoldNotes[i];
|
||||
const HoldNote &hn = GetHoldNote(i);
|
||||
if( fStartBeat <= hn.m_fStartBeat && hn.m_fEndBeat <= fEndBeat && m_HoldNoteScores[i] == hns )
|
||||
iNumSuccessfulHolds++;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ void NoteField::DrawPrimitives()
|
||||
/////////////////////////////////
|
||||
for( int i=0; i<m_iNumHoldNotes; i++ )
|
||||
{
|
||||
HoldNote &hn = m_HoldNotes[i];
|
||||
const HoldNote &hn = GetHoldNote(i);
|
||||
HoldNoteScore &hns = m_HoldNoteScores[i];
|
||||
const float fLife = m_fHoldNoteLife[i];
|
||||
const bool bIsHoldingNote = m_bIsHoldingHoldNote[i]; // hack: added -1 because hn.m_iStartIndex changes as note is held
|
||||
|
||||
@@ -199,9 +199,9 @@ void Player::Update( float fDeltaTime )
|
||||
//
|
||||
// update HoldNotes logic
|
||||
//
|
||||
for( int i=0; i<m_iNumHoldNotes; i++ ) // for each HoldNote
|
||||
for( int i=0; i < GetNumHoldNotes(); i++ ) // for each HoldNote
|
||||
{
|
||||
HoldNote &hn = m_HoldNotes[i];
|
||||
const HoldNote &hn = GetHoldNote(i);
|
||||
HoldNoteScore &hns = m_HoldNoteScores[i];
|
||||
float &fLife = m_fHoldNoteLife[i];
|
||||
int iHoldStartIndex = BeatToNoteRow(hn.m_fStartBeat);
|
||||
@@ -229,7 +229,7 @@ void Player::Update( float fDeltaTime )
|
||||
|
||||
if( bSteppedOnTapNote ) // this note is not judged and we stepped on its head
|
||||
{
|
||||
m_NoteField.m_HoldNotes[i].m_fStartBeat = fSongBeat; // move the start of this Hold
|
||||
m_NoteField.GetHoldNote(i).m_fStartBeat = fSongBeat; // move the start of this Hold
|
||||
}
|
||||
|
||||
if( bSteppedOnTapNote && bIsHoldingButton )
|
||||
@@ -462,7 +462,7 @@ void Player::OnRowDestroyed( int iIndexThatWasSteppedOn )
|
||||
// bool bHoldNoteOnThisBeat = false;
|
||||
// for( int j=0; j<m_iNumHoldNotes; j++ )
|
||||
// {
|
||||
// if( m_HoldNotes[j].m_iStartIndex == iIndexThatWasSteppedOn )
|
||||
// if( GetHoldNote(j).m_iStartIndex == iIndexThatWasSteppedOn )
|
||||
// {
|
||||
// bHoldNoteOnThisBeat = true;
|
||||
// break;
|
||||
|
||||
@@ -719,9 +719,9 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
/* XXX: easier to do with 4s */
|
||||
// check for to see if the user intended to remove a HoldNote
|
||||
bool bRemovedAHoldNote = false;
|
||||
for( int i=0; i<m_NoteFieldEdit.m_iNumHoldNotes; i++ ) // for each HoldNote
|
||||
for( int i=0; i<m_NoteFieldEdit.GetNumHoldNotes(); i++ ) // for each HoldNote
|
||||
{
|
||||
HoldNote &hn = m_NoteFieldEdit.m_HoldNotes[i];
|
||||
const HoldNote &hn = m_NoteFieldEdit.GetHoldNote(i);
|
||||
if( iCol == hn.m_iTrack && // the notes correspond
|
||||
fSongBeat >= hn.m_fStartBeat && fSongBeat <= hn.m_fEndBeat ) // the cursor lies within this HoldNote
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user