diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-11 17:51:19 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-11 17:51:19 +0200 |
| commit | c3856eddb5a8146751dac82ad1ba4433f5ca6d6d (patch) | |
| tree | a74bdf6f87d07a24496effbc157f74d379d25007 /dev/modules/CoreGfx | |
| parent | 9da6a352ecf70a1f5be99058a880b20db1b57940 (diff) | |
tweak kernel, boot: use -Wall, -Werror, -Wpedantic now.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/modules/CoreGfx')
| -rw-r--r-- | dev/modules/CoreGfx/CoreAccess.h | 4 | ||||
| -rw-r--r-- | dev/modules/CoreGfx/CoreGfx.h | 6 | ||||
| -rw-r--r-- | dev/modules/CoreGfx/TextGfx.h | 12 |
3 files changed, 10 insertions, 12 deletions
diff --git a/dev/modules/CoreGfx/CoreAccess.h b/dev/modules/CoreGfx/CoreAccess.h index b3d17a59..39ff6da3 100644 --- a/dev/modules/CoreGfx/CoreAccess.h +++ b/dev/modules/CoreGfx/CoreAccess.h @@ -26,12 +26,12 @@ namespace FB public: NE_COPY_DELETE(FBAccessibilty); - static Int64 Width() noexcept + static UInt64 Width() noexcept { return kHandoverHeader->f_GOP.f_Width; } - static Int64 Height() noexcept + static UInt64 Height() noexcept { return kHandoverHeader->f_GOP.f_Height; } diff --git a/dev/modules/CoreGfx/CoreGfx.h b/dev/modules/CoreGfx/CoreGfx.h index eda52520..74326f16 100644 --- a/dev/modules/CoreGfx/CoreGfx.h +++ b/dev/modules/CoreGfx/CoreGfx.h @@ -14,7 +14,7 @@ #define fb_get_clear_clr() fb_color(0x20, 0x20, 0x20) -#define fb_clear() kCGCursor = 0 +#define fb_clear() kCGCursor = 0UL #ifdef __NE_AMD64__ /// @brief Performs Alpha drawing on the framebuffer. @@ -137,11 +137,7 @@ namespace FB { inline Void fb_clear_video() noexcept { - fb_init(); - FBDrawInRegion(fb_get_clear_clr(), FB::FBAccessibilty::Height(), FB::FBAccessibilty::Width(), 0, 0); - - fb_clear(); } } // namespace FB
\ No newline at end of file diff --git a/dev/modules/CoreGfx/TextGfx.h b/dev/modules/CoreGfx/TextGfx.h index 13811d37..cbe62022 100644 --- a/dev/modules/CoreGfx/TextGfx.h +++ b/dev/modules/CoreGfx/TextGfx.h @@ -145,10 +145,10 @@ inline const Kernel::UInt8 kFontBitmap[kFontNOFChars][kFontSizeX] = { };
-inline Kernel::Void fb_render_string_for_bitmap(const Kernel::UInt8* bitmap, const Kernel::SizeT& x_sz, const Kernel::SizeT& y_sz, Kernel::Int32& x_dst, Kernel::Int32& y_dst, Kernel::Int32& color)
+inline Kernel::Void fb_render_string_for_bitmap(const Kernel::UInt8* bitmap, const Kernel::SizeT x_sz, const Kernel::SizeT y_sz, Kernel::Int32& x_dst, Kernel::Int32& y_dst, Kernel::Int32& color)
{
- Kernel::Int32 x, y;
- Kernel::Int32 set;
+ Kernel::SizeT x, y;
+ Kernel::SizeT set;
x = 0;
y = 0;
@@ -170,9 +170,11 @@ inline Kernel::Void fb_render_string_for_bitmap(const Kernel::UInt8* bitmap, con inline Kernel::Void fb_render_string(const Kernel::Char* text, Kernel::Int32 x_dst, Kernel::Int32 y_dst, Kernel::Int32 color)
{
- for (Kernel::SizeT i = 0; text[i] != 0; ++i)
+ auto len = Kernel::rt_string_len(text);
+
+ for (Kernel::SizeT i = 0; i < len; ++i)
{
- fb_render_string_for_bitmap(&kFontBitmap[text[i]][0], kFontSizeX, kFontSizeY, x_dst, y_dst, color);
+ fb_render_string_for_bitmap(&kFontBitmap[(Kernel::UInt8)text[i]][0], kFontSizeX, kFontSizeY, x_dst, y_dst, color);
y_dst += kFontSizeY;
}
}
|
