diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-23 19:13:48 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-23 19:15:17 +0100 |
| commit | a13e1c0911c0627184bc38f18c7fdda64447b3ad (patch) | |
| tree | 073a62c09bf216e85a3f310376640fa1805147f9 /dev/Mod/CoreGfx/FBMgr.h | |
| parent | 149fa096eb306d03686b3b67e813cf1a78e08cd0 (diff) | |
meta(kernel): Reworked repository's filesystem structure.
Removing useless parts of the project too.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Mod/CoreGfx/FBMgr.h')
| -rw-r--r-- | dev/Mod/CoreGfx/FBMgr.h | 150 |
1 files changed, 0 insertions, 150 deletions
diff --git a/dev/Mod/CoreGfx/FBMgr.h b/dev/Mod/CoreGfx/FBMgr.h deleted file mode 100644 index 57a781ad..00000000 --- a/dev/Mod/CoreGfx/FBMgr.h +++ /dev/null @@ -1,150 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. - -------------------------------------------- */ - -#pragma once - -#include <NewKit/Defines.h> - -#define fb_init() NeOS::SizeT kCGCursor = 0 - -#define fb_color(R, G, B) RGB(R, G, B) - -#define fb_get_clear_clr() fb_color(0x20, 0x20, 0x20) - -#define fb_clear() kCGCursor = 0 - -#ifdef __NE_AMD64__ -/// @brief Performs Alpha drawing on the framebuffer. -#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 (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 (NeOS::SizeT i = base_x; i < (width + base_x); ++i) \ - { \ - for (NeOS::SizeT u = base_y; u < (height + base_y); ++u) \ - { \ - *(((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 (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 (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 (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 (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) -#define FBDrawBitMapInRegion(reg_ptr, height, width, base_x, base_y) -#define FBDrawBitMapInRegionToRgn(_Rgn, reg_ptr, height, width, base_x, base_y) -#define CGClearRegion(height, width, base_x, base_y) -#define FBDrawInRegion(_Clr, height, width, base_x, base_y) -#define FBDrawInRegionToRgn(_Rgn, _Clr, height, width, base_x, base_y) -#define FBDrawInRegionA(_Clr, height, width, base_x, base_y) -#define FBDrawBitMapInRegionA(reg_ptr, height, width, base_x, base_y) -#define FBDrawBitMapInRegion(reg_ptr, height, width, base_x, base_y) -#define FBDrawBitMapInRegionToRgn(_Rgn, reg_ptr, height, width, base_x, base_y) -#define CGClearRegion(height, width, base_x, base_y) -#define FBDrawInRegion(_Clr, height, width, base_x, base_y) -#define FBDrawInRegionToRgn(_Rgn, _Clr, height, width, base_x, base_y) -#define FBDrawInRegionA(_Clr, height, width, base_x, base_y) -#endif // __NE_AMD64__ - -#ifndef GFX_MGR_ACCESSIBILITY_H -#include <Mod/CoreGfx/AccessibilityMgr.h> -#endif // ifndef GFX_MGR_ACCESSIBILITY_H - -namespace FB -{ - struct FB_CONTROL_BLOCK; - - inline void fb_clear_video() noexcept - { - fb_init(); - - FBDrawInRegion(fb_get_clear_clr(), FB::UIAccessibilty::Height(), FB::UIAccessibilty::Width(), - 0, 0); - - fb_clear(); - } - -} // namespace FB
\ No newline at end of file |
