diff options
| author | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-11-29 11:55:47 +0100 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-11-29 11:57:20 +0100 |
| commit | d36487d9fd2c19b54a3b97bdf3562a17184711fe (patch) | |
| tree | 63c6d641925e7a78a9cb9ff89562c26b77b2bf3b /kernel/include/graphics.h | |
| parent | 450b9160fdcdb0b770b316caf1d72ab893bc7aa5 (diff) | |
kernel panic
Diffstat (limited to 'kernel/include/graphics.h')
| -rw-r--r-- | kernel/include/graphics.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/include/graphics.h b/kernel/include/graphics.h index 16805a6..6f6f432 100644 --- a/kernel/include/graphics.h +++ b/kernel/include/graphics.h @@ -10,7 +10,11 @@ struct fb_t { uint32_t height; uint8_t bpp; uint8_t type; -} __attribute__((packed, aligned(8))); + uint32_t x; + uint32_t y; + uint32_t char_col; + uint32_t bg_col; +}; typedef struct fb_t fb_t; extern volatile fb_t main_fb; @@ -23,11 +27,12 @@ extern volatile fb_t main_fb; #define WHITE 0x00ffffff #define BLACK 0x00000000 +void set_color(volatile fb_t* fb, uint32_t char_col, uint32_t bg_col); +void clear_screen(volatile fb_t fb); void fb_draw_pixel(volatile fb_t fb, int32_t x, int32_t y, uint32_t col); void fb_draw_line_low(volatile fb_t fb, int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t col); void fb_draw_line_high(volatile fb_t fb, int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t col); void fb_draw_line(volatile fb_t fb, int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t col); -void fb_draw_character(volatile fb_t fb, char c, int32_t x, int32_t y, uint32_t char_col, uint32_t bg_col); -void fb_draw_string(volatile fb_t fb, const char* str, int32_t x, int32_t y, uint32_t char_col, uint32_t bg_col); +void fb_draw_character(volatile fb_t fb, char c, int32_t x, int32_t y); #endif |
