diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/fonts/Makefile | 5 | ||||
-rw-r--r-- | res/fonts/default.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/res/fonts/Makefile b/res/fonts/Makefile index e1daf03..c4de63d 100644 --- a/res/fonts/Makefile +++ b/res/fonts/Makefile @@ -1,5 +1,8 @@ +CC=gcc +CFLAGS=-I../../src/lib/include -std=c11 + %.bf: %.c - gcc -o $<.bin $< + $(CC) $(CFLAGS) -o $<.bin $< ./$<.bin > $@ rm $<.bin diff --git a/res/fonts/default.c b/res/fonts/default.c index 374c191..43fddce 100644 --- a/res/fonts/default.c +++ b/res/fonts/default.c @@ -1,6 +1,8 @@ #include <stdlib.h> #include <stdio.h> +#include <proto/font_file.h> + char font_data[256][16] = { /* 0x00 */ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x01 */ {0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, @@ -260,6 +262,13 @@ char font_data[256][16] = { /* 0xff */ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, }; +ascii_bitmap_font_header h = { + .magic = ASCII_BITMAP_FONT_MAGIC, + .cw = 8, + .ch = 16, + .nchars = 256, +}; + int main() { FILE *f = fopen("default.bf", "wb"); if (f == 0) { @@ -267,6 +276,7 @@ int main() { exit(1); } + fwrite(&h, 1, sizeof(h), f); fwrite(font_data, 256, 16, f); return 0; |