14struct limine_framebuffer* hal_get_fb(
void);
17static inline void hal_putpixel(
struct limine_framebuffer *fb, uint32_t x, uint32_t y, uint32_t color) {
18 uint32_t *pixel = (uint32_t *)
19 ((uint8_t *)fb->address + y * fb->pitch + x * 4);
24static inline void hal_fillrect(
25 struct limine_framebuffer *fb, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t color) {
27 uint8_t* where = fb->address + (y * fb->pitch) + (x * 4);
29 for (uint32_t j = 0; j < h; j++) {
30 for (uint32_t i = 0; i < w; i++) {
31 *(uint32_t*)(where + i*4 + j*fb->pitch) = color;
36static inline uint64_t hal_fb_width() {
37 return hal_get_fb()->width;
40static inline uint64_t hal_fb_height() {
41 return hal_get_fb()->height;