If you missed a vblank, then the next call to wait_for_vblank would
pointlessly wait rather than returning immediately. Meaning if you
missed a vblank by a few cycles, you'd be waiting for the entire next
one :(.
- [x] Changelog updated / no changelog update needed
Fixes#371.
If the volume was zero, the calculation for leading zeros was incorrect.
So both reduce the amount of work done for 0 volume and also count the
leading zeros correctly in the fast path.
- [x] Changelog updated / no changelog update needed
Fixes#367
Had missed implementations to actually get the backgrounds if you were
using tiled1 mode.
- [x] Changelog updated / no changelog update needed
This reworks the text rendering system so the tiles in some rendered
text can be persisted across frames. This is important for performance
in situations where you want to incrementally write to a text box for
example in a Pokemon/Phoenix Wright style dialogue system. Previously
the only way to do this was to render all the chars in the text every
frame, which is currently prohibitively slow (though this could be
potentially sped up).
In addition with this implementation it is easy to individually colour
each character, so I added the ability to do that to.
I expanded the tests to test keeping the renderer instance (which
contains the tiles) over multiple frames, and also added in some
coloured text.
If you are happy with this implementation then I will change the
examples which use text, and also add some more documentation. Thanks
for taking a look.