From 76343003abd8bc686e6bb5ca4bcb77cb33b76e10 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Fri, 4 Jun 2021 10:30:53 +0200 Subject: Add text drawing support for framebuffer --- src/main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 913043a..61547c8 100644 --- a/src/main.c +++ b/src/main.c @@ -31,7 +31,7 @@ WITH REGARD TO THIS SOFTWARE. #define PROF_SHOW_Y 0 #endif #define PROF_SHOW() \ - do { \ + do {\ txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ txt_printf("EVAL: %lu ", eval_cycles);\ txt_position((PROF_SHOW_X), (PROF_SHOW_Y)+1);\ @@ -64,15 +64,11 @@ int main(void) { irq_init(); irs_set(IRQ_VBLANK, irs_stub); - Tile *tile = FONT_DATA; - tile += 'A'; - draw_tile(0, 0, tile, true); - draw_tile(0, 4, tile, true); - draw_tile(4, 0, tile, true); + txt_drawf("Hello world: %d", 4, 4, 6, 10); // Main loop. PROF_INIT(); - while(true) { + while (true) { bios_vblank_wait(); PROF_SHOW(); PROF(flip_buffer(), flip_cycles); -- cgit v1.2.1