cleanup
This commit is contained in:
@@ -25,11 +25,6 @@ NoteData::~NoteData()
|
||||
{
|
||||
}
|
||||
|
||||
int NoteData::GetNumTracks() const
|
||||
{
|
||||
return m_TapNotes.size();
|
||||
}
|
||||
|
||||
void NoteData::SetNumTracks( int iNewNumTracks )
|
||||
{
|
||||
ASSERT( iNewNumTracks > 0 );
|
||||
@@ -284,19 +279,6 @@ int NoteData::GetMatchingHoldNote( const HoldNote &hn ) const
|
||||
FAIL_M( ssprintf("%i..%i, %i", hn.iStartRow, hn.iEndRow, hn.iTrack) );
|
||||
}
|
||||
|
||||
|
||||
void NoteData::SetTapAttackNote( int track, int row, CString sModifiers, float fDurationSeconds )
|
||||
{
|
||||
TapNote tn(
|
||||
TapNote::attack,
|
||||
TapNote::original,
|
||||
sModifiers,
|
||||
fDurationSeconds,
|
||||
false,
|
||||
0 );
|
||||
SetTapNote( track, row, tn );
|
||||
}
|
||||
|
||||
int NoteData::GetFirstRow() const
|
||||
{
|
||||
int iEarliestRowFoundSoFar = -1;
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
~NoteData();
|
||||
void Init();
|
||||
|
||||
int GetNumTracks() const;
|
||||
int GetNumTracks() const { return m_TapNotes.size(); }
|
||||
void SetNumTracks( int iNewNumTracks );
|
||||
|
||||
/* Return the note at the given track and row. Row may be out of
|
||||
@@ -105,9 +105,6 @@ public:
|
||||
const HoldNote &GetHoldNote( int index ) const { ASSERT( index < (int) m_HoldNotes.size() ); return m_HoldNotes[index]; }
|
||||
int GetMatchingHoldNote( const HoldNote &hn ) const;
|
||||
|
||||
// remove me
|
||||
void SetTapAttackNote( int track, int row, CString sModifiers, float fDurationSeconds );
|
||||
|
||||
//
|
||||
// statistics
|
||||
//
|
||||
|
||||
@@ -1564,7 +1564,13 @@ void NoteDataUtil::AddTapAttacks( NoteData &nd, Song* pSong )
|
||||
float fBeat = pSong->GetBeatFromElapsedTime( sec );
|
||||
int iBeat = (int)fBeat;
|
||||
int iTrack = iBeat % nd.GetNumTracks(); // deterministically calculates track
|
||||
nd.SetTapAttackNote( iTrack, BeatToNoteRow(fBeat), szAttacks[rand()%ARRAYSIZE(szAttacks)], 15 );
|
||||
TapNote tn(
|
||||
TapNote::attack, TapNote::original,
|
||||
szAttacks[rand()%ARRAYSIZE(szAttacks)],
|
||||
15.0f,
|
||||
false,
|
||||
0 );
|
||||
nd.SetTapNote( iTrack, BeatToNoteRow(fBeat), tn );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1564,7 +1564,13 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
CString sMods = poChosen.GetString();
|
||||
const int row = BeatToNoteRow( GAMESTATE->m_fSongBeat );
|
||||
|
||||
m_NoteDataEdit.SetTapAttackNote( g_iLastInsertAttackTrack, row, sMods, g_fLastInsertAttackDurationSeconds );
|
||||
TapNote tn(
|
||||
TapNote::attack, TapNote::original,
|
||||
sMods,
|
||||
g_fLastInsertAttackDurationSeconds,
|
||||
false,
|
||||
0 );
|
||||
m_NoteDataEdit.SetTapNote( g_iLastInsertAttackTrack, row, tn );
|
||||
GAMESTATE->RestoreSelectedOptions(); // restore the edit and playback options
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user