make TapNote a struct. Over time, more properties will move from the enums and into bit flags.

This commit is contained in:
Chris Danford
2004-09-12 05:56:24 +00:00
parent bc38866cda
commit d2a54cca31
26 changed files with 306 additions and 292 deletions
+5 -4
View File
@@ -17,7 +17,7 @@ class NoteData
vector<HoldNote> m_HoldNotes;
map<TapNote,Attack> m_AttackMap;
map<unsigned,Attack> m_AttackMap;
/* Pad m_TapNotes so it includes the row "rows". */
void PadTapNotes(int rows);
@@ -36,14 +36,15 @@ public:
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; }
const map<unsigned,Attack>& GetAttackMap() const { return m_AttackMap; }
map<unsigned,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
{
if(row < 0 || row >= (int) m_TapNotes[track].size()) return TapNote(TAP_EMPTY);
if(row < 0 || row >= (int) m_TapNotes[track].size())
return TAP_EMPTY;
return m_TapNotes[track][row];
}
void ReserveRows( int row );