vga, again

This commit is contained in:
2026-07-15 23:02:24 -05:00
parent 0c6aaa1aed
commit 37aa46c847
4 changed files with 31 additions and 4 deletions

View File

@@ -127,4 +127,22 @@ void vga_clear_scrn(uint32_t color) {
uint32_t vga_write(vfs_node_t* node, uint32_t offset, uint32_t size, uint8_t* buf) {
return size;
}
void test_draw_vertical_line(uint32_t x, uint32_t y_start, uint32_t y_end, uint32_t color) {
if (framebuffer_address == 0) return;
uint8_t* fb_bytes = (uint8_t*)framebuffer_address;
for (uint32_t y = y_start; y < y_end; y++) {
if (y >= framebuffer_height) break;
uint8_t* row = fb_bytes + (y * framebuffer_pitch);
uint32_t* pixel_row = (uint32_t*)row;
if (x < framebuffer_width) {
pixel_row[x] = color;
}
}
}