diff options
author | Bad Diode <bd@badd10de.dev> | 2021-06-04 10:30:53 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-06-04 10:30:53 +0200 |
commit | 76343003abd8bc686e6bb5ca4bcb77cb33b76e10 (patch) | |
tree | e3fbcd37b5697396ffea25f2fe4eac3b1f5f5433 /src/main.c | |
parent | 5ca4491aa46b7090189685fecf422ee7316de724 (diff) | |
download | stepper-76343003abd8bc686e6bb5ca4bcb77cb33b76e10.tar.gz stepper-76343003abd8bc686e6bb5ca4bcb77cb33b76e10.zip |
Add text drawing support for framebuffer
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -31,7 +31,7 @@ WITH REGARD TO THIS SOFTWARE. | |||
31 | #define PROF_SHOW_Y 0 | 31 | #define PROF_SHOW_Y 0 |
32 | #endif | 32 | #endif |
33 | #define PROF_SHOW() \ | 33 | #define PROF_SHOW() \ |
34 | do { \ | 34 | do {\ |
35 | txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ | 35 | txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ |
36 | txt_printf("EVAL: %lu ", eval_cycles);\ | 36 | txt_printf("EVAL: %lu ", eval_cycles);\ |
37 | txt_position((PROF_SHOW_X), (PROF_SHOW_Y)+1);\ | 37 | txt_position((PROF_SHOW_X), (PROF_SHOW_Y)+1);\ |
@@ -64,15 +64,11 @@ int main(void) { | |||
64 | irq_init(); | 64 | irq_init(); |
65 | irs_set(IRQ_VBLANK, irs_stub); | 65 | irs_set(IRQ_VBLANK, irs_stub); |
66 | 66 | ||
67 | Tile *tile = FONT_DATA; | 67 | txt_drawf("Hello world: %d", 4, 4, 6, 10); |
68 | tile += 'A'; | ||
69 | draw_tile(0, 0, tile, true); | ||
70 | draw_tile(0, 4, tile, true); | ||
71 | draw_tile(4, 0, tile, true); | ||
72 | 68 | ||
73 | // Main loop. | 69 | // Main loop. |
74 | PROF_INIT(); | 70 | PROF_INIT(); |
75 | while(true) { | 71 | while (true) { |
76 | bios_vblank_wait(); | 72 | bios_vblank_wait(); |
77 | PROF_SHOW(); | 73 | PROF_SHOW(); |
78 | PROF(flip_buffer(), flip_cycles); | 74 | PROF(flip_buffer(), flip_cycles); |