diff options
author | Marvin Borner | 2019-10-28 19:44:31 +0100 |
---|---|---|
committer | Marvin Borner | 2019-10-28 19:44:31 +0100 |
commit | a114615c50975e1aa2875d78eeb852f294fe41c7 (patch) | |
tree | cce5348ae8e89a3daa06d0d7591dfe662879a3a0 /src/kernel/graphics/vesa.c | |
parent | 644d9da7c883e7bef4598254fa0679a3cea5f001 (diff) |
Started implementing 16x32 Spleen font
Diffstat (limited to 'src/kernel/graphics/vesa.c')
-rw-r--r-- | src/kernel/graphics/vesa.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c index d9318e2..f586181 100644 --- a/src/kernel/graphics/vesa.c +++ b/src/kernel/graphics/vesa.c @@ -252,13 +252,12 @@ void vesa_clear() { void vesa_draw_char(char ch) { if (ch >= ' ') { int pos = terminal_x * vbe_bpl + terminal_y * vbe_pitch; - int mask[8] = {128, 64, 32, 16, 8, 4, 2, 1}; - unsigned char *glyph = font[ch - 32]; + const unsigned char *glyph = &font.bitmap[ch - 32]; char *draw = (char *) &fb[pos]; - for (int cy = 12; cy >= 0; cy--) { - for (int cx = 0; cx < 8; cx++) { - if (glyph[cy] & mask[cx]) { + for (int cy = 64; cy >= 0; cy--) { + for (int cx = 0; cx < 16; cx++) { + if (glyph[cy] & (1 << cx)) { draw[vbe_bpl * cx] = terminal_color[2]; draw[vbe_bpl * cx + 1] = terminal_color[1]; draw[vbe_bpl * cx + 2] = terminal_color[0]; |