diff options
| author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2023-12-21 02:36:06 +0100 |
|---|---|---|
| committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2023-12-21 02:42:10 +0100 |
| commit | 5129e9f9f732f7d2829f02597cdb4ad2c0f3d856 (patch) | |
| tree | e1bafa66c3baa0c07b6a5addc6bdc93ff64539fa /stage3 | |
| parent | 80513bc18ca32f5cc6a5b72e3ad812de3db9a6da (diff) | |
| download | cuddles-5129e9f9f732f7d2829f02597cdb4ad2c0f3d856.tar.xz | |
compile terminus font into the kernel
Diffstat (limited to 'stage3')
| -rw-r--r-- | stage3/font.c | 6 | ||||
| -rw-r--r-- | stage3/font.h | 1 | ||||
| -rw-r--r-- | stage3/main.c | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/stage3/font.c b/stage3/font.c index 31b771e..f47c9c9 100644 --- a/stage3/font.c +++ b/stage3/font.c @@ -3,6 +3,7 @@ #include "gfx.h" #include "heap.h" #include "memory.h" +#include "font_builtin.c" // important: must be a multiple of 2, else code won't work #define TAB_SIZE 4 @@ -40,6 +41,11 @@ void font_load_blob(const void *blob) memcpy(font, blob, 256*16); } +void font_load_builtin() +{ + memcpy(font, fs_fonts_ter_u16n_cuddlefont, 256*16); +} + void font_load_classic() { memset(font, 0, 256 * 16); diff --git a/stage3/font.h b/stage3/font.h index 49b2817..154b58e 100644 --- a/stage3/font.h +++ b/stage3/font.h @@ -7,6 +7,7 @@ void font_init(); void font_set_size(u16 size); void font_load_blob(const void *blob); void font_load_classic(); +void font_load_builtin(); void font_clear_screen(); void print(str line); diff --git a/stage3/main.c b/stage3/main.c index 9f738d5..ac915ff 100644 --- a/stage3/main.c +++ b/stage3/main.c @@ -88,9 +88,11 @@ void kmain() // font init font_init(); font_set_size(1); - font_load_classic(); + font_load_builtin(); font_clear_screen(); + print(S("welcome to cuddles\n")); + // memory map print(S("memory map:\n")); for (usize i = 0; i < n_mreg; i++) { |
