cleanup: variable name and const

This commit is contained in:
Chris Danford
2004-10-24 10:20:24 +00:00
parent bcfa824a36
commit 1b3c786213
7 changed files with 412 additions and 380 deletions
+90 -59
View File
@@ -50,8 +50,8 @@ void NoteData::ClearRange( int rowBegin, int rowEnd )
this->ConvertHoldNotesTo4s();
for( int t=0; t<GetNumTracks(); t++ )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, i, rowBegin, rowEnd )
SetTapNote(t, i, TAP_EMPTY);
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, rowBegin, rowEnd )
SetTapNote(t, r, TAP_EMPTY);
}
this->Convert4sToHoldNotes();
}
@@ -65,7 +65,7 @@ void NoteData::ClearAll()
/* Copy a range from pFrom to this. (Note that this does *not* overlay;
* all data in the range is overwritten.) */
void NoteData::CopyRange( const NoteData& from, int iFromIndexBegin, int iFromIndexEnd, int iToIndexBegin )
void NoteData::CopyRange( const NoteData& from, int rowFromBegin, int rowFromEnd, int rowToBegin )
{
ASSERT( from.GetNumTracks() == GetNumTracks() );
@@ -77,10 +77,10 @@ void NoteData::CopyRange( const NoteData& from, int iFromIndexBegin, int iFromIn
for( int t=0; t<GetNumTracks(); t++ )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( From, t, iFrom, iFromIndexBegin, iFromIndexEnd )
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( From, t, iFrom, rowFromBegin, rowFromEnd )
{
int iTo = iToIndexBegin + iFrom - iFromIndexBegin;
TapNote tn = From.GetTapNote( t, iFrom );
int iTo = rowToBegin + iFrom - rowFromBegin;
const TapNote &tn = From.GetTapNote( t, iFrom );
To.SetTapNote( t, iTo, tn );
}
}
@@ -103,88 +103,119 @@ void NoteData::CopyAll( const NoteData& from )
m_HoldNotes = from.m_HoldNotes;
}
bool NoteData::IsRowEmpty( int index ) const
bool NoteData::IsRowEmpty( int row ) const
{
for( int t=0; t<GetNumTracks(); t++ )
if( GetTapNoteX(t, index).type != TapNote::empty )
if( GetTapNoteX(t, row).type != TapNote::empty )
return false;
return true;
}
bool NoteData::IsRangeEmpty( int track, int iIndexBegin, int iIndexEnd ) const
bool NoteData::IsRangeEmpty( int track, int rowBegin, int rowEnd ) const
{
ASSERT( track < GetNumTracks() );
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, track, i, iIndexBegin, iIndexEnd )
if( GetTapNoteX(track,i).type != TapNote::empty )
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, track, r, rowBegin, rowEnd )
if( GetTapNoteX(track,r).type != TapNote::empty )
return false;
return true;
}
int NoteData::GetNumTapNonEmptyTracks( int index ) const
int NoteData::GetNumTapNonEmptyTracks( int row ) const
{
int iNum = 0;
for( int t=0; t<GetNumTracks(); t++ )
if( GetTapNote(t, index).type != TapNote::empty )
if( GetTapNote(t, row).type != TapNote::empty )
iNum++;
return iNum;
}
void NoteData::GetTapNonEmptyTracks( int index, set<int>& addTo ) const
void NoteData::GetTapNonEmptyTracks( int row, set<int>& addTo ) const
{
for( int t=0; t<GetNumTracks(); t++ )
if( GetTapNote(t, index).type != TapNote::empty )
if( GetTapNote(t, row).type != TapNote::empty )
addTo.insert(t);
}
int NoteData::GetFirstNonEmptyTrack( int index ) const
bool NoteData::GetTapFirstNonEmptyTrack( int row, int &iNonEmptyTrackOut ) const
{
for( int t=0; t<GetNumTracks(); t++ )
if( GetTapNoteX( t, index ).type != TapNote::empty )
return t;
return -1;
{
if( GetTapNoteX( t, row ).type != TapNote::empty )
{
iNonEmptyTrackOut = t;
return true;
}
}
return false;
}
int NoteData::GetNumTracksWithTap( int index ) const
bool NoteData::GetTapFirstEmptyTrack( int row, int &iEmptyTrackOut ) const
{
for( int t=0; t<GetNumTracks(); t++ )
{
if( GetTapNoteX( t, row ).type == TapNote::empty )
{
iEmptyTrackOut = t;
return true;
}
}
return false;
}
bool NoteData::GetTapLastEmptyTrack( int row, int &iEmptyTrackOut ) const
{
for( int t=GetNumTracks()-1; t>=0; t-- )
{
if( GetTapNoteX( t, row ).type == TapNote::empty )
{
iEmptyTrackOut = t;
return true;
}
}
return false;
}
int NoteData::GetNumTracksWithTap( int row ) const
{
int iNum = 0;
for( int t=0; t<GetNumTracks(); t++ )
{
TapNote tn = GetTapNoteX( t, index );
const TapNote &tn = GetTapNoteX( t, row );
if( tn.type == TapNote::tap )
iNum++;
}
return iNum;
}
int NoteData::GetNumTracksWithTapOrHoldHead( int index ) const
int NoteData::GetNumTracksWithTapOrHoldHead( int row ) const
{
int iNum = 0;
for( int t=0; t<GetNumTracks(); t++ )
{
TapNote tn = GetTapNoteX( t, index );
const TapNote &tn = GetTapNoteX( t, row );
if( tn.type == TapNote::tap || tn.type == TapNote::hold_head )
iNum++;
}
return iNum;
}
int NoteData::GetFirstTrackWithTap( int index ) const
int NoteData::GetFirstTrackWithTap( int row ) const
{
for( int t=0; t<GetNumTracks(); t++ )
{
TapNote tn = GetTapNoteX( t, index );
const TapNote &tn = GetTapNoteX( t, row );
if( tn.type == TapNote::tap )
return t;
}
return -1;
}
int NoteData::GetFirstTrackWithTapOrHoldHead( int index ) const
int NoteData::GetFirstTrackWithTapOrHoldHead( int row ) const
{
for( int t=0; t<GetNumTracks(); t++ )
{
TapNote tn = GetTapNoteX( t, index );
const TapNote &tn = GetTapNoteX( t, row );
if( tn.type == TapNote::tap || tn.type == TapNote::hold_head )
return t;
}
@@ -333,9 +364,9 @@ int NoteData::GetNumTapNotes( float fStartBeat, float fEndBeat ) const
for( int t=0; t<GetNumTracks(); t++ )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, i, iStartIndex, iEndIndex )
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
{
TapNote tn = GetTapNoteX(t, i);
const TapNote &tn = GetTapNoteX(t, r);
if( tn.type != TapNote::empty && tn.type != TapNote::mine )
iNumNotes++;
}
@@ -354,8 +385,8 @@ int NoteData::GetNumRowsWithTap( float fStartBeat, float fEndBeat ) const
int iStartIndex = BeatToNoteRow( fStartBeat );
int iEndIndex = BeatToNoteRow( fEndBeat );
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, i, iStartIndex, iEndIndex )
if( IsThereATapAtRow(i) )
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, r, iStartIndex, iEndIndex )
if( IsThereATapAtRow(r) )
iNumNotes++;
return iNumNotes;
@@ -377,8 +408,8 @@ int NoteData::GetNumMines( float fStartBeat, float fEndBeat ) const
for( int t=0; t<GetNumTracks(); t++ )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, i, iStartIndex, iEndIndex )
if( GetTapNoteX(t, i).type == TapNote::mine )
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
if( GetTapNoteX(t, r).type == TapNote::mine )
iNumMines++;
}
@@ -395,8 +426,8 @@ int NoteData::GetNumRowsWithTapOrHoldHead( float fStartBeat, float fEndBeat ) co
int iStartIndex = BeatToNoteRow( fStartBeat );
int iEndIndex = BeatToNoteRow( fEndBeat );
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, i, iStartIndex, iEndIndex )
if( IsThereATapOrHoldHeadAtRow(i) )
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, r, iStartIndex, iEndIndex )
if( IsThereATapOrHoldHeadAtRow(r) )
iNumNotes++;
return iNumNotes;
@@ -407,7 +438,7 @@ int NoteData::RowNeedsHands( const int row ) const
int iNumNotesThisIndex = 0;
for( int t=0; t<GetNumTracks(); t++ )
{
TapNote tn = GetTapNoteX(t, row);
const TapNote &tn = GetTapNoteX(t, row);
switch( tn.type )
{
case TapNote::mine:
@@ -454,9 +485,9 @@ int NoteData::GetNumHands( float fStartBeat, float fEndBeat ) const
iEndIndex = min( iEndIndex, GetLastRow() );
int iNum = 0;
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, i, iStartIndex, iEndIndex )
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, r, iStartIndex, iEndIndex )
{
if( !RowNeedsHands(i) )
if( !RowNeedsHands(r) )
continue;
iNum++;
@@ -465,7 +496,7 @@ int NoteData::GetNumHands( float fStartBeat, float fEndBeat ) const
return iNum;
}
int NoteData::GetNumN( int MinTaps, float fStartBeat, float fEndBeat ) const
int NoteData::GetNumN( int iMinTaps, float fStartBeat, float fEndBeat ) const
{
if( fEndBeat == -1 )
fEndBeat = GetLastBeat();
@@ -478,16 +509,16 @@ int NoteData::GetNumN( int MinTaps, float fStartBeat, float fEndBeat ) const
iEndIndex = min( iEndIndex, GetLastRow() );
int iNum = 0;
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, i, iStartIndex, iEndIndex )
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, r, iStartIndex, iEndIndex )
{
int iNumNotesThisIndex = 0;
for( int t=0; t<GetNumTracks(); t++ )
{
TapNote tn = GetTapNoteX(t, i);
const TapNote &tn = GetTapNoteX(t, r);
if( tn.type != TapNote::mine && tn.type != TapNote::empty ) // mines don't count
iNumNotesThisIndex++;
}
if( iNumNotesThisIndex >= MinTaps )
if( iNumNotesThisIndex >= iMinTaps )
iNum++;
}
@@ -519,15 +550,15 @@ void NoteData::Convert2sAnd3sToHoldNotes()
for( int t=0; t<GetNumTracks(); t++ ) // foreach column
{
FOREACH_NONEMPTY_ROW_IN_TRACK( *this, t, i )
FOREACH_NONEMPTY_ROW_IN_TRACK( *this, t, r )
{
if( GetTapNote(t,i).type != TapNote::hold_head )
if( GetTapNote(t,r).type != TapNote::hold_head )
continue; // skip
SetTapNote(t, i, TAP_EMPTY); // clear the hold head marker
SetTapNote(t, r, TAP_EMPTY); // clear the hold head marker
// search for end of HoldNote
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, j, i+1, 999999 )
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, j, r+1, 999999 )
{
// End hold on the next note we see. This should be a hold_tail if the
// data is in a consistent state, but doesn't have to be.
@@ -536,7 +567,7 @@ void NoteData::Convert2sAnd3sToHoldNotes()
SetTapNote(t, j, TAP_EMPTY);
AddHoldNote( HoldNote(t, i, j) );
AddHoldNote( HoldNote(t, r, j) );
break; // done searching for the end of this hold
}
}
@@ -598,19 +629,19 @@ void NoteData::Convert4sToHoldNotes()
{
for( int t=0; t<GetNumTracks(); t++ ) // foreach column
{
FOREACH_NONEMPTY_ROW_IN_TRACK( *this, t, i )
FOREACH_NONEMPTY_ROW_IN_TRACK( *this, t, r )
{
if( GetTapNote(t, i).type == TapNote::hold ) // this is a HoldNote body
if( GetTapNote(t, r).type == TapNote::hold ) // this is a HoldNote body
{
HoldNote hn( t, i, 0 );
HoldNote hn( t, r, 0 );
// search for end of HoldNote
do {
SetTapNote( t, i, TAP_EMPTY );
i++;
} while( GetTapNote(t, i).type == TapNote::hold );
SetTapNote( t, i, TAP_EMPTY );
SetTapNote( t, r, TAP_EMPTY );
r++;
} while( GetTapNote(t, r).type == TapNote::hold );
SetTapNote( t, r, TAP_EMPTY );
hn.iEndRow = i;
hn.iEndRow = r;
AddHoldNote( hn );
}
}
@@ -656,19 +687,19 @@ void NoteData::LoadTransformed( const NoteData& original, int iNewNumTracks, con
Convert4sToHoldNotes();
}
void NoteData::PadTapNotes(int rows)
void NoteData::PadTapNotes( int rows )
{
// Nothing to do for a track map.
}
void NoteData::MoveTapNoteTrack(int dest, int src)
void NoteData::MoveTapNoteTrack( int dest, int src )
{
if(dest == src) return;
m_TapNotes[dest] = m_TapNotes[src];
m_TapNotes[src].clear();
}
void NoteData::SetTapNote( int track, int row, TapNote t )
void NoteData::SetTapNote( int track, int row, const TapNote& t )
{
DEBUG_ASSERT( track>=0 && track<GetNumTracks() );
@@ -698,7 +729,7 @@ void NoteData::ReserveRows( int row )
// Nothing to do for a track map.
}
void NoteData::EliminateAllButOneTap(int row)
void NoteData::EliminateAllButOneTap( int row )
{
if(row < 0) return;
+19 -17
View File
@@ -44,7 +44,7 @@ public:
/* Return the note at the given track and row. Row may be out of
* range; pretend the song goes on with TAP_EMPTYs indefinitely. */
inline TapNote GetTapNote(unsigned track, int row) const
inline const TapNote &GetTapNote(unsigned track, int row) const
{
return GetTapNoteX( track, row );
}
@@ -52,7 +52,7 @@ public:
/* GetTapNote is called a lot. This one doesn't do any bounds checking,
* which is much faster. Be sure that 0 <= row < GetNumRows(). */
inline TapNote GetTapNoteX(unsigned track, int row) const
inline const TapNote &GetTapNoteX(unsigned track, int row) const
{
const TrackMap &mapTrack = m_TapNotes[track];
TrackMap::const_iterator iter = mapTrack.find( row );
@@ -69,30 +69,32 @@ public:
bool GetNextTapNoteRowForAllTracks( int &rowInOut ) const;
void MoveTapNoteTrack( int dest, int src );
void SetTapNote( int track, int row, TapNote tn );
void SetTapNote( int track, int row, const TapNote& tn );
void ClearRange( int rowBegin, int rowEnd );
void ClearAll();
void CopyRange( const NoteData& from, int iFromIndexBegin, int iFromIndexEnd, int iToIndexBegin = 0 );
void CopyRange( const NoteData& from, int rowFromBegin, int rowFromEnd, int rowToBegin = 0 );
void CopyAll( const NoteData& from );
bool IsRowEmpty( int index ) const;
bool IsRangeEmpty( int track, int iIndexBegin, int iIndexEnd ) const;
int GetNumTapNonEmptyTracks( int index ) const;
void GetTapNonEmptyTracks( int index, set<int>& addTo ) const;
int GetFirstNonEmptyTrack( int index ) const;
int GetNumTracksWithTap( int index ) const;
int GetNumTracksWithTapOrHoldHead( int index ) const;
int GetFirstTrackWithTap( int index ) const;
int GetFirstTrackWithTapOrHoldHead( int index ) const;
bool IsRowEmpty( int row ) const;
bool IsRangeEmpty( int track, int rowBegin, int rowEnd ) const;
int GetNumTapNonEmptyTracks( int row ) const;
void GetTapNonEmptyTracks( int row, set<int>& addTo ) const;
bool GetTapFirstNonEmptyTrack( int row, int &iNonEmptyTrackOut ) const; // return false if no non-empty tracks at row
bool GetTapFirstEmptyTrack( int row, int &iEmptyTrackOut ) const; // return false if no non-empty tracks at row
bool GetTapLastEmptyTrack( int row, int &iEmptyTrackOut ) const; // return false if no empty tracks at row
int GetNumTracksWithTap( int row ) const;
int GetNumTracksWithTapOrHoldHead( int row ) const;
int GetFirstTrackWithTap( int row ) const;
int GetFirstTrackWithTapOrHoldHead( int row ) const;
inline bool IsThereATapAtRow( int index ) const
inline bool IsThereATapAtRow( int row ) const
{
return GetFirstTrackWithTap( index ) != -1;
return GetFirstTrackWithTap( row ) != -1;
}
inline bool IsThereATapOrHoldHeadAtRow( int index ) const
inline bool IsThereATapOrHoldHeadAtRow( int row ) const
{
return GetFirstTrackWithTapOrHoldHead( index ) != -1;
return GetFirstTrackWithTapOrHoldHead( row ) != -1;
}
void GetTracksHeldAtRow( int row, set<int>& addTo );
int GetNumTracksHeldAtRow( int row );
File diff suppressed because it is too large Load Diff
+35 -35
View File
@@ -32,20 +32,20 @@ namespace NoteDataUtil
void GetRadarValues( const NoteData &in, float fSongSeconds, RadarValues& out );
void RemoveHoldNotes( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveSimultaneousNotes( NoteData &in, int iMaxSimultaneous, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveJumps( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveHands( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveQuads( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveMines( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveHoldNotes( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveSimultaneousNotes( NoteData &inout, int iMaxSimultaneous, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveJumps( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveHands( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveQuads( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void RemoveMines( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
enum TrackMapping { left, right, mirror, shuffle, super_shuffle, stomp, NUM_TRACK_MAPPINGS };
void Turn( NoteData &in, StepsType st, TrackMapping tt, float fStartBeat = 0, float fEndBeat = -1 );
void Little( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void Wide( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void Big( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void Quick( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void BMRize( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void Skippy( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void Turn( NoteData &inout, StepsType st, TrackMapping tt, float fStartBeat = 0, float fEndBeat = -1 );
void Little( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void Wide( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void Big( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void Quick( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void BMRize( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void Skippy( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void InsertIntelligentTaps(
NoteData &in,
float fWindowSizeBeats,
@@ -54,36 +54,36 @@ namespace NoteDataUtil
bool bSkippy,
float fStartBeat = 0,
float fEndBeat = 99999 );
void AddMines( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void Echo( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void Stomp( NoteData &in, StepsType st, float fStartBeat = 0, float fEndBeat = 99999 );
void Planted( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void Floored( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void Twister( NoteData &in, float fStartBeat = 0, float fEndBeat = 99999 );
void ConvertTapsToHolds( NoteData &in, int iSimultaneousHolds, float fStartBeat = 0, float fEndBeat = 99999 );
void AddMines( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void Echo( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void Stomp( NoteData &inout, StepsType st, float fStartBeat = 0, float fEndBeat = 99999 );
void Planted( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void Floored( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void Twister( NoteData &inout, float fStartBeat = 0, float fEndBeat = 99999 );
void ConvertTapsToHolds( NoteData &inout, int iSimultaneousHolds, float fStartBeat = 0, float fEndBeat = 99999 );
// change all TAP_ADDITIONs to TAP_TAPs
void ConvertAdditionsToRegular( NoteData &in );
void ConvertAdditionsToRegular( NoteData &inout );
void Backwards( NoteData &in );
void SwapSides( NoteData &in );
void CopyLeftToRight( NoteData &in );
void CopyRightToLeft( NoteData &in );
void ClearLeft( NoteData &in );
void ClearRight( NoteData &in );
void CollapseToOne( NoteData &in );
void CollapseLeft( NoteData &in );
void ShiftLeft( NoteData &in );
void ShiftRight( NoteData &in );
void Backwards( NoteData &inout );
void SwapSides( NoteData &inout );
void CopyLeftToRight( NoteData &inout );
void CopyRightToLeft( NoteData &inout );
void ClearLeft( NoteData &inout );
void ClearRight( NoteData &inout );
void CollapseToOne( NoteData &inout );
void CollapseLeft( NoteData &inout );
void ShiftLeft( NoteData &inout );
void ShiftRight( NoteData &inout );
void SnapToNearestNoteType( NoteData &in, NoteType nt1, NoteType nt2, float fBeginBeat, float fEndBeat );
void SnapToNearestNoteType( NoteData &inout, NoteType nt1, NoteType nt2, float fBeginBeat, float fEndBeat );
inline void SnapToNearestNoteType( NoteData &in, NoteType nt, float fBeginBeat, float fEndBeat ) { SnapToNearestNoteType( in, nt, (NoteType)-1, fBeginBeat, fEndBeat ); }
inline void SnapToNearestNoteType( NoteData &inout, NoteType nt, float fBeginBeat, float fEndBeat ) { SnapToNearestNoteType( inout, nt, (NoteType)-1, fBeginBeat, fEndBeat ); }
void FixImpossibleRows( NoteData &in, StepsType st );
void FixImpossibleRows( NoteData &inout, StepsType st );
// True if no notes in row that aren't true in the mask
bool RowPassesValidMask( NoteData &in, int row, const bool bValidMask[] );
bool RowPassesValidMask( NoteData &inout, int row, const bool bValidMask[] );
void TransformNoteData( NoteData &nd, const AttackArray &aa, StepsType st, Song* pSong );
void TransformNoteData( NoteData &nd, const PlayerOptions &po, StepsType st, float fStartBeat = 0, float fEndBeat = 99999 );
+2 -2
View File
@@ -32,9 +32,9 @@ int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float
for( int t=0; t<GetNumTracks(); t++ )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, i, iStartIndex, iEndIndex )
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
{
if( GetTapNoteScore(t, i) >= tns )
if( GetTapNoteScore(t, r) >= tns )
iNumSuccessfulTapNotes++;
}
}
+8 -8
View File
@@ -53,7 +53,7 @@ struct TapNote
bKeysound = bKeysound_;
iKeysoundIndex = iKeysoundIndex_;
}
bool operator==( const TapNote &other )
bool operator==( const TapNote &other ) const
{
#define COMPARE(x) if(x!=other.x) return false;
COMPARE(type);
@@ -69,13 +69,13 @@ struct TapNote
const unsigned MAX_NUM_ATTACKS = 2*2*2; // 3 bits to hold the attack index currently
extern TapNote TAP_EMPTY; // '0'
extern TapNote TAP_ORIGINAL_TAP; // '1'
extern TapNote TAP_ORIGINAL_HOLD_HEAD; // '2'
extern TapNote TAP_ORIGINAL_HOLD_TAIL; // '3'
extern TapNote TAP_ORIGINAL_HOLD; // '4'
extern TapNote TAP_ORIGINAL_MINE; // 'M'
extern TapNote TAP_ORIGINAL_ATTACK; // 'A'
extern TapNote TAP_EMPTY; // '0'
extern TapNote TAP_ORIGINAL_TAP; // '1'
extern TapNote TAP_ORIGINAL_HOLD_HEAD; // '2'
extern TapNote TAP_ORIGINAL_HOLD_TAIL; // '3'
extern TapNote TAP_ORIGINAL_HOLD; // '4'
extern TapNote TAP_ORIGINAL_MINE; // 'M'
extern TapNote TAP_ORIGINAL_ATTACK; // 'A'
extern TapNote TAP_ADDITION_TAP;
extern TapNote TAP_ADDITION_MINE;
+2 -5
View File
@@ -827,7 +827,6 @@ void ScreenGameplay::SetupSong( PlayerNumber p, int iSongIndex )
m_pPrimaryScoreKeeper[p],
m_pSecondaryScoreKeeper[p] );
// Put course options into effect. Do this after Player::Load so
// that mods aren't double-applied.
GAMESTATE->m_ModsToApply[p].clear();
@@ -899,7 +898,6 @@ void ScreenGameplay::LoadNextSong()
m_textSongOptions.SetText( GAMESTATE->m_SongOptions.GetString() );
FOREACH_EnabledPlayer( p )
{
SetupSong( p, iPlaySongIndex );
@@ -1273,7 +1271,9 @@ void ScreenGameplay::Update( float fDeltaTime )
m_bZeroDeltaOnNextUpdate = false;
}
else
{
Screen::Update( fDeltaTime );
}
/* This happens if ScreenDemonstration::HandleScreenMessage sets a new screen when
* PREFSMAN->m_bDelayedScreenLoad. */
@@ -1292,7 +1292,6 @@ void ScreenGameplay::Update( float fDeltaTime )
m_BeginnerHelper.Update(fDeltaTime);
//
// update GameState HealthState
//
@@ -1524,8 +1523,6 @@ void ScreenGameplay::Update( float fDeltaTime )
{
FOREACH_CabinetLight( cl )
{
// Somehow, step data was getting majorly corrupted, therefor causing light
// signals to be sent at incorrect times where notes were not even present.
bool bBlink = (m_CabinetLightsNoteData.GetTapNote( cl, r ).type != TapNote::empty );
bBlinkCabinetLight[cl] |= bBlink;
}