#include "vbe.h" #include "icon.h" struct vbe_interface display; void put_pixel(u32 color, u32 x, u32 y) { // divide by 4 because display.buff is in 32bit instead of 8bit const u32 coords = x + y * display.pitch / 4; display.buff[coords] = color; } void draw_icon(u32 pos_x, u32 pos_y, struct icon *img) { for (u32 y = 0; y < img->height; y++) { for (u32 x = 0; x < img->width; x++) { put_pixel(img->pixels[y * img->width + x], pos_x + x, pos_y + y); } } }