|
|
@ -36,7 +36,7 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
void insertNote(TNote* note)
|
|
|
|
void insertNote(TNote* note)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_timeline.insert(_top_note, note);
|
|
|
|
_top_note = _timeline.insert(note).first;
|
|
|
|
update(_current_offset);
|
|
|
|
update(_current_offset);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -61,6 +61,7 @@ public:
|
|
|
|
if (isExpired(_top_note))
|
|
|
|
if (isExpired(_top_note))
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
checkTopNote(_current_offset);
|
|
|
|
checkCurrentActiveNote();
|
|
|
|
checkCurrentActiveNote();
|
|
|
|
checkForNextActiveNote();
|
|
|
|
checkForNextActiveNote();
|
|
|
|
updateVisibleSprites(_current_offset);
|
|
|
|
updateVisibleSprites(_current_offset);
|
|
|
@ -86,7 +87,7 @@ public:
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
Iterator note_iterator = _top_note;
|
|
|
|
Iterator note_iterator = _top_note;
|
|
|
|
while (isVisiblyClose(note_iterator, music_offset))
|
|
|
|
while (!isExpired(note_iterator) && isVisiblyClose(note_iterator, music_offset))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (nothingToDraw())
|
|
|
|
if (nothingToDraw())
|
|
|
|
_first_visible_note = note_iterator;
|
|
|
|
_first_visible_note = note_iterator;
|
|
|
@ -173,6 +174,15 @@ private:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void checkTopNote(const microsec& offset)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (isExpired(_top_note) || !isExpired(_active_note))
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while ((*_top_note)->offset() < offset)
|
|
|
|
|
|
|
|
++_top_note;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void checkForNextActiveNote()
|
|
|
|
void checkForNextActiveNote()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!isExpired(_active_note))
|
|
|
|
if (!isExpired(_active_note))
|
|
|
|