fix saving and copying of tap attack notes

This commit is contained in:
Chris Danford
2003-11-17 03:38:24 +00:00
parent 929c8108c8
commit 3b8718c1e1
11 changed files with 257 additions and 127 deletions
+6 -1
View File
@@ -35,6 +35,7 @@ class NoteData
void LoadOverlapped( const NoteData* pOriginal, int iNewNumTracks );
public:
/* Set up to hold the data in From; same number of tracks, same
* divisor. Doesn't allocate or copy anything. */
void Config( const NoteData &From );
@@ -46,6 +47,10 @@ public:
int GetNumTracks() const;
void SetNumTracks( int iNewNumTracks );
// TODO: Think of better accessors
const map<TapNote,Attack>& GetAttackMap() const { return m_AttackMap; }
map<TapNote,Attack>& GetAttackMap() { return m_AttackMap; }
/* 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
@@ -144,7 +149,7 @@ public:
HoldNote &GetHoldNote( int index ) { return m_HoldNotes[index]; }
const HoldNote &GetHoldNote( int index ) const { return m_HoldNotes[index]; }
void AddAttackNote( int track, int row, Attack attack );
void SetTapAttackNote( int track, int row, Attack attack );
void PruneUnusedAttacksFromMap(); // slow
const Attack& GetAttackAt( int track, int row );
// remove Attacks with SetTapNote(TAP_EMPTY)