From 7d2a7e7cab23b8217498866615a3719e5d3980ee Mon Sep 17 00:00:00 2001 From: Amlal Date: Thu, 20 Feb 2025 12:32:38 +0100 Subject: NeOS: Namespace change from 'Kernel' to 'NeOS' ADD: Start defining the Workstation's HPFS (High-Performance File System) Signed-off-by: Amlal --- dev/Mod/CoreGfx/AccessibilityMgr.h | 2 +- dev/Mod/CoreGfx/FBMgr.h | 144 ++++++++++++++++++------------------- dev/Mod/CoreGfx/TextMgr.h | 12 ++-- 3 files changed, 79 insertions(+), 79 deletions(-) (limited to 'dev/Mod/CoreGfx') diff --git a/dev/Mod/CoreGfx/AccessibilityMgr.h b/dev/Mod/CoreGfx/AccessibilityMgr.h index 6916984b..58054a89 100644 --- a/dev/Mod/CoreGfx/AccessibilityMgr.h +++ b/dev/Mod/CoreGfx/AccessibilityMgr.h @@ -15,7 +15,7 @@ namespace FB { - using namespace Kernel; + using namespace NeOS; /// @brief common User interface class. class UIAccessibilty final diff --git a/dev/Mod/CoreGfx/FBMgr.h b/dev/Mod/CoreGfx/FBMgr.h index cd4d0c30..57a781ad 100644 --- a/dev/Mod/CoreGfx/FBMgr.h +++ b/dev/Mod/CoreGfx/FBMgr.h @@ -8,7 +8,7 @@ #include -#define fb_init() Kernel::SizeT kCGCursor = 0 +#define fb_init() NeOS::SizeT kCGCursor = 0 #define fb_color(R, G, B) RGB(R, G, B) @@ -18,99 +18,99 @@ #ifdef __NE_AMD64__ /// @brief Performs Alpha drawing on the framebuffer. -#define FBDrawBitMapInRegionA(reg_ptr, height, width, base_x, base_y) \ - for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \ - { \ - for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \ - { \ - *(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - i + \ - 4 * u))) |= (reg_ptr)[kCGCursor]; \ - \ - ++kCGCursor; \ - } \ +#define FBDrawBitMapInRegionA(reg_ptr, height, width, base_x, base_y) \ + for (NeOS::SizeT i = base_x; i < (width + base_x); ++i) \ + { \ + for (NeOS::SizeT u = base_y; u < (height + base_y); ++u) \ + { \ + *(((NeOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + i + \ + 4 * u))) |= (reg_ptr)[kCGCursor]; \ + \ + ++kCGCursor; \ + } \ } /// @brief Performs drawing on the framebuffer. -#define FBDrawBitMapInRegion(reg_ptr, height, width, base_x, base_y) \ - for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \ - { \ - for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \ - { \ - *(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - i + \ - 4 * u))) = (reg_ptr)[kCGCursor]; \ - \ - ++kCGCursor; \ - } \ +#define FBDrawBitMapInRegion(reg_ptr, height, width, base_x, base_y) \ + for (NeOS::SizeT i = base_x; i < (width + base_x); ++i) \ + { \ + for (NeOS::SizeT u = base_y; u < (height + base_y); ++u) \ + { \ + *(((NeOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + i + \ + 4 * u))) = (reg_ptr)[kCGCursor]; \ + \ + ++kCGCursor; \ + } \ } #define FBDrawBitMapInRegionToRgn(_Rgn, reg_ptr, height, width, base_x, base_y) \ - for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \ + for (NeOS::SizeT i = base_x; i < (width + base_x); ++i) \ { \ - for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \ + for (NeOS::SizeT u = base_y; u < (height + base_y); ++u) \ { \ - *(((Kernel::UInt32*)(_Rgn + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - i + \ - 4 * u))) = (reg_ptr)[kCGCursor]; \ + *(((NeOS::UInt32*)(_Rgn + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + i + \ + 4 * u))) = (reg_ptr)[kCGCursor]; \ \ ++kCGCursor; \ } \ } /// @brief Cleans a resource. -#define CGClearRegion(height, width, base_x, base_y) \ - for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \ - { \ - for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \ - { \ - *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - i + \ - 4 * u))) = fb_get_clear_clr(); \ - } \ +#define CGClearRegion(height, width, base_x, base_y) \ + for (NeOS::SizeT i = base_x; i < (width + base_x); ++i) \ + { \ + for (NeOS::SizeT u = base_y; u < (height + base_y); ++u) \ + { \ + *(((volatile NeOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + i + \ + 4 * u))) = fb_get_clear_clr(); \ + } \ } /// @brief Draws inside a zone. -#define FBDrawInRegion(_Clr, height, width, base_x, base_y) \ - for (Kernel::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ - { \ - for (Kernel::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ - { \ - *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - x_base + \ - 4 * y_base))) = _Clr; \ - } \ +#define FBDrawInRegion(_Clr, height, width, base_x, base_y) \ + for (NeOS::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ + { \ + for (NeOS::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ + { \ + *(((volatile NeOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + x_base + \ + 4 * y_base))) = _Clr; \ + } \ } /// @brief Draws inside a zone. -#define FBDrawInRegionToRgn(_Rgn, _Clr, height, width, base_x, base_y) \ - for (Kernel::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ - { \ - for (Kernel::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ - { \ - *(((volatile Kernel::UInt32*)(_Rgn + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - x_base + \ - 4 * y_base))) = _Clr[kCGCursor]; \ - ++kCGCursor; \ - } \ +#define FBDrawInRegionToRgn(_Rgn, _Clr, height, width, base_x, base_y) \ + for (NeOS::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ + { \ + for (NeOS::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ + { \ + *(((volatile NeOS::UInt32*)(_Rgn + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + x_base + \ + 4 * y_base))) = _Clr[kCGCursor]; \ + ++kCGCursor; \ + } \ } -#define FBDrawInRegionA(_Clr, height, width, base_x, base_y) \ - for (Kernel::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ - { \ - for (Kernel::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ - { \ - *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - x_base + \ - 4 * y_base))) |= _Clr; \ - } \ +#define FBDrawInRegionA(_Clr, height, width, base_x, base_y) \ + for (NeOS::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ + { \ + for (NeOS::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ + { \ + *(((volatile NeOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + x_base + \ + 4 * y_base))) |= _Clr; \ + } \ } #else #define FBDrawBitMapInRegionA(reg_ptr, height, width, base_x, base_y) diff --git a/dev/Mod/CoreGfx/TextMgr.h b/dev/Mod/CoreGfx/TextMgr.h index 27b182ee..a3c1af24 100644 --- a/dev/Mod/CoreGfx/TextMgr.h +++ b/dev/Mod/CoreGfx/TextMgr.h @@ -13,7 +13,7 @@ #define kFontSizeY 8 #define kFontNOFChars 128 -inline const Kernel::UInt8 kFontBitmap[kFontNOFChars][kFontSizeX] = { +inline const NeOS::UInt8 kFontBitmap[kFontNOFChars][kFontSizeX] = { {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0000 (nul) {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0001 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0002 @@ -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 NeOS::Void fb_render_string_for_bitmap(const NeOS::UInt8* bitmap, const NeOS::SizeT& x_sz, const NeOS::SizeT& y_sz, NeOS::Int32& x_dst, NeOS::Int32& y_dst, NeOS::Int32& color) { - Kernel::Int32 x, y; - Kernel::Int32 set; + NeOS::Int32 x, y; + NeOS::Int32 set; x = 0; y = 0; @@ -168,9 +168,9 @@ 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) +inline NeOS::Void fb_render_string(const NeOS::Char* text, NeOS::Int32 x_dst, NeOS::Int32 y_dst, NeOS::Int32 color) { - for (Kernel::SizeT i = 0; text[i] != 0; ++i) + for (NeOS::SizeT i = 0; text[i] != 0; ++i) { fb_render_string_for_bitmap(&kFontBitmap[text[i]][0], kFontSizeX, kFontSizeY, x_dst, y_dst, color); y_dst += kFontSizeY; -- cgit v1.2.3