From 4956918086a85031bb47b28e868c0ff8e6cc8f95 Mon Sep 17 00:00:00 2001 From: EmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com> Date: Sat, 11 May 2024 23:50:41 -0400 Subject: changed width and height to be uint32_t instead of uint64_t --- kernel/framebuffer.cpp | 10 +++++----- kernel/include/framebuffer.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'kernel') diff --git a/kernel/framebuffer.cpp b/kernel/framebuffer.cpp index ca6ddb6..62ffee7 100644 --- a/kernel/framebuffer.cpp +++ b/kernel/framebuffer.cpp @@ -3,10 +3,10 @@ #include uint32_t* fb_addr; -uint64_t fb_width; -uint64_t fb_height; +uint32_t fb_width; +uint32_t fb_height; -void fb_init(uint32_t* addr, uint64_t width, uint64_t height) { +void fb_init(uint32_t* addr, uint32_t width, uint32_t height) { fb_addr = addr; fb_width = width; fb_height = height; @@ -22,12 +22,12 @@ void fb_clear() { } } -void draw_pixel(const uint64_t x, const uint64_t y, const uint32_t color) { +void draw_pixel(const uint32_t x, const uint32_t y, const uint32_t color) { const size_t pos = y * fb_width + x; fb_addr[pos] = color; } -void draw_bitmap(const uint32_t* bitmap, const uint64_t x_pos, const uint64_t y_pos, const uint64_t width, const uint64_t height) { +void draw_bitmap(const uint32_t* bitmap, const uint32_t x_pos, const uint32_t y_pos, const uint32_t width, const uint32_t height) { for (size_t y = 0; y < height; y++) { for (size_t x = 0; x < width; x++) { const size_t i = y * width + x; diff --git a/kernel/include/framebuffer.h b/kernel/include/framebuffer.h index b7f8ba2..7379d90 100644 --- a/kernel/include/framebuffer.h +++ b/kernel/include/framebuffer.h @@ -3,9 +3,9 @@ #include -void fb_init(uint32_t* addr, uint64_t width, uint64_t height); +void fb_init(uint32_t* addr, uint32_t width, uint32_t height); void fb_clear(); -void draw_pixel(const uint64_t x, const uint64_t y, const uint32_t color); -void draw_bitmap(const uint32_t* bitmap, const uint64_t x_pos, const uint64_t y_pos, const uint64_t width, const uint64_t height); +void draw_pixel(const uint32_t x, const uint32_t y, const uint32_t color); +void draw_bitmap(const uint32_t* bitmap, const uint32_t x_pos, const uint32_t y_pos, const uint32_t width, const uint32_t height); #endif \ No newline at end of file -- cgit v1.2.3-70-g09d2