diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-17 10:05:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-17 10:05:07 +0100 |
| commit | 062c4bb508bf6ec7334d374fef2e0e10623b2df9 (patch) | |
| tree | 137a91eb22d1a9207fd4322ced08c3b6388c5eb5 /dev/modules/CoreGfx | |
| parent | 36269e57831e560df6a0da9c9d02c00671b0163d (diff) | |
| parent | 791fcd646503f05617f22e6006c115095746da26 (diff) | |
Merge pull request #69 from nekernel-org/dev
release: NeKernel v0.0.7
Diffstat (limited to 'dev/modules/CoreGfx')
| -rw-r--r-- | dev/modules/CoreGfx/CoreAccess.h | 8 | ||||
| -rw-r--r-- | dev/modules/CoreGfx/CoreGfx.h | 16 | ||||
| -rw-r--r-- | dev/modules/CoreGfx/MathGfx.h | 6 | ||||
| -rw-r--r-- | dev/modules/CoreGfx/TextGfx.h | 8 |
4 files changed, 19 insertions, 19 deletions
diff --git a/dev/modules/CoreGfx/CoreAccess.h b/dev/modules/CoreGfx/CoreAccess.h index f092b5a6..246b386a 100644 --- a/dev/modules/CoreGfx/CoreAccess.h +++ b/dev/modules/CoreGfx/CoreAccess.h @@ -17,12 +17,12 @@ namespace FB { using namespace Kernel; /// @brief common User interface class. -class FBAccessibilty final { - explicit FBAccessibilty() = default; - ~FBAccessibilty() = default; +class CGAccessibilty final { + explicit CGAccessibilty() = default; + ~CGAccessibilty() = default; public: - NE_COPY_DELETE(FBAccessibilty) + NE_COPY_DELETE(CGAccessibilty) static UInt64 Width() noexcept { return kHandoverHeader->f_GOP.f_Width; } diff --git a/dev/modules/CoreGfx/CoreGfx.h b/dev/modules/CoreGfx/CoreGfx.h index 7d23c17e..b4f513ef 100644 --- a/dev/modules/CoreGfx/CoreGfx.h +++ b/dev/modules/CoreGfx/CoreGfx.h @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. ------------------------------------------- */ @@ -8,13 +8,13 @@ #include <NeKit/Defines.h> -#define fb_init() Kernel::UInt32 kCGCursor = 0 +#define cg_init() Kernel::UInt32 kCGCursor = 0 -#define fb_color(R, G, B) RGB(R, G, B) +#define cg_color(R, G, B) RGB(R, G, B) -#define fb_get_clear_clr() RGB(0x20, 0x20, 0x20) +#define cg_get_clear_clr() RGB(0, 0, 0x80) -#define fb_clear() kCGCursor = 0UL +#define cg_clear() kCGCursor = 0UL #ifdef __NE_AMD64__ /// @brief Performs Alpha drawing on the framebuffer. @@ -57,7 +57,7 @@ for (Kernel::UInt32 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(); \ + cg_get_clear_clr(); \ } \ } @@ -111,8 +111,8 @@ #endif // ifndef CORE_GFX_ACCESSIBILITY_H namespace FB { -inline Void fb_clear_video() noexcept { - FBDrawInRegion(fb_get_clear_clr(), FB::FBAccessibilty::Height(), FB::FBAccessibilty::Width(), 0, +inline Void cg_clear_video() noexcept { + FBDrawInRegion(cg_get_clear_clr(), FB::CGAccessibilty::Height(), FB::CGAccessibilty::Width(), 0, 0); } } // namespace FB
\ No newline at end of file diff --git a/dev/modules/CoreGfx/MathGfx.h b/dev/modules/CoreGfx/MathGfx.h index 0b483fad..523f4b31 100644 --- a/dev/modules/CoreGfx/MathGfx.h +++ b/dev/modules/CoreGfx/MathGfx.h @@ -11,9 +11,9 @@ namespace UI { #ifdef NE_CORE_GFX_USE_DOUBLE -typedef double fb_real_t; +typedef double cg_real_t; #else -typedef float fb_real_t; +typedef float cg_real_t; #endif /// @brief Linear interpolation equation solver. @@ -21,7 +21,7 @@ typedef float fb_real_t; /// @param to to which value. /// @param stat /// @return Linear interop value. -inline fb_real_t fb_math_lerp(fb_real_t to, fb_real_t from, fb_real_t stat) { +inline cg_real_t cg_math_lerp(cg_real_t to, cg_real_t from, cg_real_t stat) { return (from) + (to - from) * stat; } } // namespace UI
\ No newline at end of file diff --git a/dev/modules/CoreGfx/TextGfx.h b/dev/modules/CoreGfx/TextGfx.h index 1bcc1397..b0545fcc 100644 --- a/dev/modules/CoreGfx/TextGfx.h +++ b/dev/modules/CoreGfx/TextGfx.h @@ -1,6 +1,6 @@ /* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -145,7 +145,7 @@ inline const Kernel::UInt8 kFontBitmap[kFontNOFChars][kFontSizeX] = { };
-inline Kernel::Void fb_render_string_for_bitmap(const Kernel::UInt8* bitmap,
+inline Kernel::Void cg_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) {
@@ -167,7 +167,7 @@ inline Kernel::Void fb_render_string_for_bitmap(const Kernel::UInt8* bitmap, }
}
-inline Kernel::Void fb_render_string(const Kernel::Char* text, Kernel::Int32 x_dst,
+inline Kernel::Void cg_render_string(const Kernel::Char* text, Kernel::Int32 x_dst,
Kernel::Int32 y_dst, Kernel::Int32 color) {
#ifndef __BOOTZ__
auto len = Kernel::rt_string_len(text);
@@ -176,7 +176,7 @@ inline Kernel::Void fb_render_string(const Kernel::Char* text, Kernel::Int32 x_d #endif
for (Kernel::SizeT i = 0; i < len; ++i) {
- fb_render_string_for_bitmap(&kFontBitmap[(Kernel::UInt8) text[i]][0], kFontSizeX, kFontSizeY,
+ cg_render_string_for_bitmap(&kFontBitmap[(Kernel::UInt8) text[i]][0], kFontSizeX, kFontSizeY,
x_dst, y_dst, color);
y_dst += kFontSizeY;
}
|
