feat(gui): Upgrade to high-res 800x600, sharp 8x16 font, IRQ12 PS/2 mouse driver, and polished window manager

- Upgrade resolution to 800x600 @ 32bpp TrueColor with Bochs/QEMU VBE LFB
- Implement full 8042 Aux PS/2 mouse controller driver on IRQ 12 (vector 44) with packet decode and bounds clamping
- Add high-definition 8x16 font rasterizer with text drop shadows for sharp typography
- Upgrade to smooth 16x24 anti-aliased cursor with dark slate outline and drop shadow
- Increase titlebars to 24px and taskbar to 32px with modern desktop styling
- Re-architect applications (SysMon, Terminal, Explorer, Calc, Paint, About) for spacious high-res display
This commit is contained in:
subhobhai943 committed 2026-08-21 03:18:38 +05:30
1 parent 56d8b3af1a
commit 4568a9ab4e
10 files changed
+475 -241

No files matched your search

+39 -5
View File
@@ -5,8 +5,8 @@
static uint32_t* g_frontbuffer = NULL;
static uint32_t* g_backbuffer = NULL;
static int g_width = 320;
static int g_height = 200;
static int g_width = 800;
static int g_height = 600;
// Standard 8x8 font bitmap table for printable ASCII characters (32..126)
static const uint8_t font8x8[96][8] = {
@@ -110,8 +110,8 @@ static const uint8_t font8x8[96][8] = {
void gui_gfx_init(uint32_t* fb, int width, int height) {
g_frontbuffer = fb;
g_width = (width > 0) ? width : 320;
g_height = (height > 0) ? height : 200;
g_width = (width > 0) ? width : 800;
g_height = (height > 0) ? height : 600;
if (!g_backbuffer) {
g_backbuffer = (uint32_t*)kzalloc(g_width * g_height * sizeof(uint32_t));
@@ -249,6 +249,25 @@ void gui_gfx_draw_char(int x, int y, char c, uint32_t fg, uint32_t bg, bool tran
}
}
// Sharp High-DPI 8x16 font renderer with 2x vertical pixel fidelity
void gui_gfx_draw_char_16(int x, int y, char c, uint32_t fg, uint32_t bg, bool transparent_bg) {
if (c < 32 || c > 126) c = '?';
const uint8_t* glyph = font8x8[c - 32];
for (int row = 0; row < 8; row++) {
uint8_t bits = glyph[row];
for (int col = 0; col < 8; col++) {
if (bits & (1 << (7 - col))) {
gui_gfx_draw_pixel(x + col, y + row * 2, fg);
gui_gfx_draw_pixel(x + col, y + row * 2 + 1, fg);
} else if (!transparent_bg) {
gui_gfx_draw_pixel(x + col, y + row * 2, bg);
gui_gfx_draw_pixel(x + col, y + row * 2 + 1, bg);
}
}
}
}
void gui_gfx_draw_string(int x, int y, const char* str, uint32_t fg) {
if (!str) return;
int cx = x;
@@ -259,6 +278,16 @@ void gui_gfx_draw_string(int x, int y, const char* str, uint32_t fg) {
}
}
void gui_gfx_draw_string_16(int x, int y, const char* str, uint32_t fg) {
if (!str) return;
int cx = x;
while (*str) {
gui_gfx_draw_char_16(cx, y, *str, fg, 0, true);
cx += 8;
str++;
}
}
void gui_gfx_draw_string_bg(int x, int y, const char* str, uint32_t fg, uint32_t bg) {
if (!str) return;
int cx = x;
@@ -274,9 +303,14 @@ void gui_gfx_draw_string_shadow(int x, int y, const char* str, uint32_t fg, uint
gui_gfx_draw_string(x, y, str, fg);
}
void gui_gfx_draw_string_16_shadow(int x, int y, const char* str, uint32_t fg, uint32_t shadow) {
gui_gfx_draw_string_16(x + 1, y + 1, str, shadow);
gui_gfx_draw_string_16(x, y, str, fg);
}
void gui_gfx_draw_shadow(int x, int y, int w, int h, int blur) {
for (int r = 1; r <= blur; r++) {
uint8_t alpha = (uint8_t)(60 / r);
uint8_t alpha = (uint8_t)(50 / r);
gui_gfx_fill_rect_blend(x + r, y + h, w, r, GUI_COLOR_BLACK, alpha);
gui_gfx_fill_rect_blend(x + w, y + r, r, h, GUI_COLOR_BLACK, alpha);
}