From 01161f861d9a40bfb25d9715f79e991eff33bcc8 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 13 Jun 2023 22:27:34 +0100 Subject: Testing the bitmap font --- src/main.c | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 672a478..be248d3 100644 --- a/src/main.c +++ b/src/main.c @@ -6,6 +6,7 @@ #include "keyb.h" #include "vga.h" +#include "text.h" #include "data.h" /* disable paging because our int handlers are written in C */ @@ -34,42 +35,13 @@ int main(int argc, char *argv[]) blit_erase(0); wait_vsync(); - blit_update(); - - uint8_t bg[24 * 24] = { 0 }; - Rect dst = { 10, 10, 24, 24 }; - int8_t ix = 1, iy = 1; - uint8_t c = 0; - - while (!keys[KEY_ESC]) - { - // erase - blit(bg, &dst); - dst.x += ix; - dst.y += iy; + put_text(10, 10, "TESTING! 1234567890* ()^_"); - if (dst.x >= 320 - 24 || dst.x == 0) - { - ix *= -1; - c = (c + 1) % 15; - blit_erase(c); - memset(bg, c, 24 * 24); - } - if (dst.y >= 200 - 24 || dst.y == 0) - { - iy *= -1; - c = (c + 1) % 15; - blit_erase(c); - memset(bg, c, 24 * 24); - } - - // draw - blit(binary_sprites_start, &dst); + blit_update(); + while (!keys[KEY_ESC]) wait_vsync(); - blit_update(); - } set_mode(3); close_framebuffer(); -- cgit v1.2.3