Support %s and %p

This commit is contained in:
2023-12-05 22:28:35 -05:00
parent c4892d51ab
commit c448d3a720
2 changed files with 46 additions and 15 deletions

View File

@@ -21,9 +21,11 @@ void font_writer_setup() {
}
void font_writer_update() {
static const char*const Text[2] = {"Planschi", "Becken"};
auto state = JabyEngine::State::create(JabyEngine::Make::PositionI16(8, 8), wiggle_count);
new_font_writer.write(state, "012345 ABCDEFGHIJKL\nabcedfghijkl\n", JabyEngine::GPU::Color24::Blue(), &wiggle);
new_font_writer.write(state, "Wiggle Count: %i", JabyEngine::GPU::Color24::Green(), &wiggle, wiggle_count);
new_font_writer.write(state, "%i (0x%p)\nWiggle (%s)", JabyEngine::GPU::Color24::Green(), &wiggle, wiggle_count, 0xAABBCCDD, Text[wiggle_count&0x1]);
if(timer.is_expired_for(50_ms)) {
timer.reset();