#include "bootboot.h" #include "interrupts/Context.h" #include "render/Framebuffer.h" #include extern BOOTBOOT bootboot; void sys_paint(Context* context, uint64_t x, uint64_t y, uint64_t w, uint64_t h, uint64_t c) { if ((x + w) > bootboot.fb_width) { context->rax = -1; return; } if ((y + h) > bootboot.fb_height) { context->rax = -1; return; } uint32_t color = (uint32_t)c; uint32_t* colptr = &color; framebuffer0.paint_rect(x, y, w, h, *(Color*)colptr); context->rax = 0; }