[feat] Simple graphic

This commit is contained in:
2026-05-10 16:25:15 +08:00
Unverified
parent 386708c54b
commit 4356f88dfb
6 changed files with 77 additions and 25 deletions
+11
View File
@@ -0,0 +1,11 @@
#include <efi.h>
void draw_pixel(unsigned int x, unsigned int y, EFI_GRAPHICS_OUTPUT_BLT_PIXEL color,
EFI_GRAPHICS_OUTPUT_PROTOCOL *GOP, unsigned int hr, EFI_GRAPHICS_OUTPUT_BLT_PIXEL *base) {
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *p = base + (hr * y) + x;
p->Blue = color.Blue;
p->Green = color.Green;
p->Red = color.Red;
p->Reserved = color.Reserved;
}