and exposed all arrow effects functions. This can allow themed elements
to move with columns during gameplay, such as column specific judgments,
flashes, or whatever else.
This required using the new Steps::GetTimingData function and the allowEmpty
parameter to TimingData::TidyUpData when appropriate, as well as clearing the
TimingData to remove step timing rather than coping the song timing over it.
Fixes some odd editor behavior when changing song timing, and is overall a
slightly less hacky way of doing things.
Scroll segments seem to cause the lag when there's a lot of segment
in the steps, say, 165. On my Mac, it drops the frame-rate down by about
30 FPS in the end.
This is because the way the the game tries to determine the exact position
of the note, it has to go through all the scroll segments from the
beginning until it finds the currently active scroll segment and keep
track of the beat to display instead.
And each frame, the game needs to determine the position for each note,
and also when figuring out the first beat and last beat to display. This
makes the game slow even with just 165 scroll segments.
The approach is that at every game update, we create an optimized data
structure that can calculate the displayed beat from real song beat
in O(log n) time. So in this approach we iterate through EVERY scroll
segments each frame instead of iterating through the scroll segments
for each note for each frame. This eliminates the lag on this side.
The data structure is recomputed each update because I assume that the
timing segments can change at any time, but not during draws.
A similar problem is: when using Cmods, GetElapsedTimeFromBeat()
is also called very often (say, for each note and also in FindFirst/Last
DisplayedBeat), we may as well have to make these queries faster for songs
that has hundreds of BPM changes or stops or delays to prevent the game
from lagging.
which returns the dispalyed position and timing (based on the timing display
switch in the editor), so less copy n paste in ArrowEffects and NoteField.
ArrowEffects had a minor change, but the intent isn't up yet.
It needs to be so that when you go from the editor to the chart
for playing in Song Timing, it doesn't use the Step Timing.