diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-06-13 22:27:34 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-06-13 22:27:34 +0100 |
commit | 01161f861d9a40bfb25d9715f79e991eff33bcc8 (patch) | |
tree | 3a55817915c2ce2a620efa72f4c2b6426db0d51b /src/main.c | |
parent | fbb8daad65a1ce95e6f591f1a22e0b8c645e8318 (diff) | |
download | gold-mine-run-01161f861d9a40bfb25d9715f79e991eff33bcc8.tar.gz gold-mine-run-01161f861d9a40bfb25d9715f79e991eff33bcc8.zip |
Testing the bitmap font
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 36 |
1 files changed, 4 insertions, 32 deletions
@@ -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(); |