IsHoldNoteAtBeat -> IsHoldNoteAtRow

This commit is contained in:
Glenn Maynard
2005-07-22 00:14:24 +00:00
parent ea8705fa9d
commit 4ec405f13b
7 changed files with 21 additions and 21 deletions
+3 -3
View File
@@ -338,7 +338,7 @@ void NoteData::AddHoldNote( int iTrack, int iStartRow, int iEndRow, TapNote tn )
}
/* Return true if a hold note lies on or adjacent to the given spot. */
bool NoteData::IsHoldNoteAtBeat( int iTrack, int iRow, int *pHeadRow ) const
bool NoteData::IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow ) const
{
int iDummy;
if( pHeadRow == NULL )
@@ -512,7 +512,7 @@ bool NoteData::RowNeedsAtLeastSimultaneousPresses( int iMinSimultaneousPresses,
/* We have at least one, but not enough. Count holds. Do count adjacent holds. */
for( int t=0; t<GetNumTracks(); ++t )
{
if( IsHoldNoteAtBeat(t, row) )
if( IsHoldNoteAtRow(t, row) )
++iNumNotesThisIndex;
}
}
@@ -649,7 +649,7 @@ void NoteData::SetTapNote( int track, int row, const TapNote& t )
void NoteData::GetTracksHeldAtRow( int row, set<int>& addTo )
{
for( int t=0; t<GetNumTracks(); ++t )
if( IsHoldNoteAtBeat( t, row ) )
if( IsHoldNoteAtRow( t, row ) )
addTo.insert( t );
}
+1 -1
View File
@@ -119,7 +119,7 @@ public:
/* Determine if a given spot is within a hold note (being on the tail doesn't count).
* Return true if so. If pHeadRow is non-NULL, return the row of the head. If pTailRow is
* non-NULL, return the row of the tail. This function is faster if pTailRow is NULL. */
bool IsHoldNoteAtBeat( int iTrack, int iRow, int *pHeadRow = NULL ) const;
bool IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow = NULL ) const;
//
// statistics
+10 -10
View File
@@ -120,7 +120,7 @@ void NoteDataUtil::LoadFromSMNoteDataString( NoteData &out, CString sSMNoteData
{
/* This is the end of a hold. Search for the beginning. */
int iHeadRow;
if( !out.IsHoldNoteAtBeat( iTrack, iIndex, &iHeadRow ) )
if( !out.IsHoldNoteAtRow( iTrack, iIndex, &iHeadRow ) )
{
LOG->Warn( "Unmatched 3 in \"%s\"", sMeasureLine.c_str() );
}
@@ -372,8 +372,8 @@ void NoteDataUtil::LoadTransformedSlidingWindow( const NoteData &in, NoteData &o
for( int t=0; t<in.GetNumTracks(); t++ )
{
if( in.IsHoldNoteAtBeat( t, r-1 ) &&
in.IsHoldNoteAtBeat( t, r ) )
if( in.IsHoldNoteAtRow( t, r-1 ) &&
in.IsHoldNoteAtRow( t, r ) )
{
bHoldCrossesThisMeasure = true;
break;
@@ -723,7 +723,7 @@ void NoteDataUtil::RemoveSimultaneousNotes( NoteData &in, int iMaxSimultaneous,
else if( tn.type == TapNote::hold_head )
{
int iStartTrack;
if( !in.IsHoldNoteAtBeat( t, r, &iStartTrack ) )
if( !in.IsHoldNoteAtRow( t, r, &iStartTrack ) )
continue;
in.SetTapNote( t, iStartTrack, TAP_EMPTY );
@@ -942,7 +942,7 @@ static void SuperShuffleTaps( NoteData &inout, int iStartIndex, int iEndIndex )
}
#if _DEBUG
ASSERT_M( !inout.IsHoldNoteAtBeat(t1,r), ssprintf("There is a tap.type = %d inside of a hold at row %d", tn1.type, r) );
ASSERT_M( !inout.IsHoldNoteAtRow(t1,r), ssprintf("There is a tap.type = %d inside of a hold at row %d", tn1.type, r) );
#endif
// Probe for a spot to swap with.
@@ -975,7 +975,7 @@ static void SuperShuffleTaps( NoteData &inout, int iStartIndex, int iEndIndex )
}
// don't swap into the middle of a hold note
if( inout.IsHoldNoteAtBeat(t2,r) )
if( inout.IsHoldNoteAtRow(t2,r) )
continue;
// do the swap
@@ -1070,7 +1070,7 @@ void NoteDataUtil::Wide( NoteData &inout, int iStartIndex, int iEndIndex )
bool bHoldNoteAtBeat = false;
for( int t = 0; !bHoldNoteAtBeat && t < inout.GetNumTracks(); ++t )
if( inout.IsHoldNoteAtBeat(t, i) )
if( inout.IsHoldNoteAtRow(t, i) )
bHoldNoteAtBeat = true;
if( bHoldNoteAtBeat )
continue; // skip. Don't place during holds
@@ -1176,7 +1176,7 @@ void NoteDataUtil::InsertIntelligentTaps(
// don't insert a new note if there's already one within this interval
bool bNoteInMiddle = false;
for( int t = 0; t < inout.GetNumTracks(); ++t )
if( inout.IsHoldNoteAtBeat(t, iRowEarlier+1) )
if( inout.IsHoldNoteAtRow(t, iRowEarlier+1) )
bNoteInMiddle = true;
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( inout, j, iRowEarlier+1, iRowLater-1 )
bNoteInMiddle = true;
@@ -1537,7 +1537,7 @@ void NoteDataUtil::SnapToNearestNoteType( NoteData &inout, NoteType nt1, NoteTyp
inout.SetTapNote(c, iOldIndex, TAP_EMPTY);
if( tnNew.type == TapNote::tap && inout.IsHoldNoteAtBeat(c, iNewIndex) )
if( tnNew.type == TapNote::tap && inout.IsHoldNoteAtRow(c, iNewIndex) )
continue; // HoldNotes override TapNotes
if( tnNew.type == TapNote::hold_head )
@@ -1969,7 +1969,7 @@ bool NoteDataUtil::AnyTapsAndHoldsInTrackRange( const NoteData& in, int iTrack,
}
}
if( in.IsHoldNoteAtBeat( iTrack, iEnd ) )
if( in.IsHoldNoteAtRow( iTrack, iEnd ) )
return true;
return false;
+1 -1
View File
@@ -108,7 +108,7 @@ int GetSuccessfulHands( const NoteData &in, int iStartIndex = 0, int iEndIndex =
for( int t=0; t<in.GetNumTracks(); ++t )
{
int iHeadRow;
if( !in.IsHoldNoteAtBeat( t, i, &iHeadRow ) )
if( !in.IsHoldNoteAtRow( t, i, &iHeadRow ) )
continue;
const TapNote &tn = in.GetTapNote( t, iHeadRow );
+2 -2
View File
@@ -430,7 +430,7 @@ void Player::Update( float fDeltaTime )
{
// TODO: Make the CPU miss sometimes.
int iHeadRow;
if( !m_NoteData.IsHoldNoteAtBeat(iTrack, iSongRow, &iHeadRow) )
if( !m_NoteData.IsHoldNoteAtRow(iTrack, iSongRow, &iHeadRow) )
continue;
const TapNote &tn = m_NoteData.GetTapNote( iTrack, iHeadRow );
@@ -1468,7 +1468,7 @@ void Player::RandomizeNotes( int iNoteRow )
continue;
/* Make sure the destination row isn't in the middle of a hold. */
if( m_NoteData.IsHoldNoteAtBeat(iSwapWith, iNoteRow) )
if( m_NoteData.IsHoldNoteAtRow(iSwapWith, iNoteRow) )
continue;
m_NoteData.SetTapNote( t, iNewNoteRow, t2 );
+2 -2
View File
@@ -1051,7 +1051,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
// check for to see if the user intended to remove a HoldNote
int iHeadRow;
if( m_NoteDataEdit.IsHoldNoteAtBeat( iCol, iSongIndex, &iHeadRow ) )
if( m_NoteDataEdit.IsHoldNoteAtRow( iCol, iSongIndex, &iHeadRow ) )
{
m_soundRemoveNote.Play();
SaveUndo();
@@ -1650,7 +1650,7 @@ void ScreenEdit::InputRecord( const DeviceInput& DeviceI, const InputEventType t
// Remove hold if any so that we don't have taps inside of a hold.
int iHeadRow;
if( m_NoteDataRecord.IsHoldNoteAtBeat( iCol, iRow, &iHeadRow ) )
if( m_NoteDataRecord.IsHoldNoteAtRow( iCol, iRow, &iHeadRow ) )
m_NoteDataRecord.SetTapNote( iCol, iHeadRow, TAP_EMPTY );
TapNote tn = TAP_ORIGINAL_TAP;
+2 -2
View File
@@ -1663,7 +1663,7 @@ void ScreenGameplay::UpdateLights()
bBlinkCabinetLight[cl] = true;
}
if( m_CabinetLightsNoteData.IsHoldNoteAtBeat( cl, iSongRow ) )
if( m_CabinetLightsNoteData.IsHoldNoteAtRow( cl, iSongRow ) )
bBlinkCabinetLight[cl] = true;
}
@@ -1682,7 +1682,7 @@ void ScreenGameplay::UpdateLights()
}
// check if a hold should be active
if( m_Player[pn].m_NoteData.IsHoldNoteAtBeat( t, iSongRow ) )
if( m_Player[pn].m_NoteData.IsHoldNoteAtRow( t, iSongRow ) )
bBlink = true;
if( bBlink )