diff options
| author | Amlal <amlal@el-mahrouss-logic.com> | 2024-09-28 08:26:13 +0200 |
|---|---|---|
| committer | Amlal <amlal@el-mahrouss-logic.com> | 2024-09-28 08:26:13 +0200 |
| commit | 81c819e4c509c79987ac5050a776e3e3f4447ec6 (patch) | |
| tree | edc8c7678cfc77f9be33ab5391e5ca8f501051b8 /dev | |
| parent | 28dcc76e2e93817a5e4a4ceef0479fd8ac7399c9 (diff) | |
feat: math.hxx, pdf.hxx and CoreCG had breaking changes or were just introduced.
- math.hxx: Got a new fixed API.
- pdf.hxx: New PDF API.
- Processor.hxx: Add BP and SP on AMD64 targets.
Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev')
23 files changed, 218 insertions, 104 deletions
diff --git a/dev/corecg/corecg.hxx b/dev/corecg/corecg.hxx index 7549dbe9..9a315b1d 100644 --- a/dev/corecg/corecg.hxx +++ b/dev/corecg/corecg.hxx @@ -6,7 +6,7 @@ #pragma once -#include <Modules/CoreCG/DesktopRenderer.hxx> +#include <Modules/CoreCG/Desktop.hxx> namespace CG::WM { @@ -112,7 +112,7 @@ namespace CG::WM inline Kernel::Void CGDrawStringToWnd(CG_WINDOW_STRUCT* wnd, const Kernel::Char* text, Kernel::Int32 y_dst, Kernel::Int32 x_dst, Kernel::Int32 color) { - y_dst += wnd->w_y + FLATCONTROLS_HEIGHT; + y_dst += wnd->w_y + cFlatCtrlsHeight; x_dst += wnd->w_x; if (y_dst > (wnd->w_h + wnd->w_y)) @@ -177,17 +177,17 @@ namespace CG::WM if (wnd[index]->w_type == cWndFlagWindow) { CGDrawBitMapInRegion(wnd[index]->w_canvas, wnd[index]->w_h, wnd[index]->w_w, wnd[index]->w_y, wnd[index]->w_x); - CGDrawInRegion(CGColor(0xFF, 0xFF, 0xFF), wnd[index]->w_w, FLATCONTROLS_HEIGHT, wnd[index]->w_y, wnd[index]->w_x); + CGDrawInRegion(CGColor(0xFF, 0xFF, 0xFF), wnd[index]->w_w, cFlatCtrlsHeight, wnd[index]->w_y, wnd[index]->w_x); if (wnd[index]->w_sub_type != cWndFlagNoCloseButton) { if (wnd[index]->w_sub_type == cWndFlagCloseButton) { - CGDrawBitMapInRegion(FlatControlsClose, FLATCONTROLS_CLOSE_HEIGHT, FLATCONTROLS_CLOSE_WIDTH, wnd[index]->w_y, wnd[index]->w_x + wnd[index]->w_w - FLATCONTROLS_WIDTH); + CGDrawBitMapInRegion(FlatControlsClose, cFlatCtrlsHeight, cFlatCtrlsWidth, wnd[index]->w_y, wnd[index]->w_x + wnd[index]->w_w - cFlatCtrlsWidth); } else { - CGDrawBitMapInRegion(FlatControls, FLATCONTROLS_HEIGHT, FLATCONTROLS_WIDTH, wnd[index]->w_y, wnd[index]->w_x + wnd[index]->w_w - FLATCONTROLS_WIDTH); + CGDrawBitMapInRegion(FlatControls, cFlatCtrlsHeight, cFlatCtrlsWidth, wnd[index]->w_y, wnd[index]->w_x + wnd[index]->w_w - cFlatCtrlsWidth); } } @@ -222,7 +222,7 @@ namespace CG::WM for (SizeT child = 0; child < wnd[index]->w_child_count; ++child) { wnd[index]->w_child_list[child]->w_x += wnd[index]->w_x; - wnd[index]->w_child_list[child]->w_y += wnd[index]->w_y + FLATCONTROLS_HEIGHT; + wnd[index]->w_child_list[child]->w_y += wnd[index]->w_y + cFlatCtrlsHeight; if ((wnd[index]->w_child_list[child]->w_w + wnd[index]->w_child_list[child]->w_x) > (wnd[index]->w_x + wnd[index]->w_w) || (wnd[index]->w_child_list[child]->w_h + wnd[index]->w_child_list[child]->w_y) > (wnd[index]->w_y + wnd[index]->w_h)) diff --git a/dev/corecg/pdf.hxx b/dev/corecg/pdf.hxx new file mode 100644 index 00000000..eda69d0c --- /dev/null +++ b/dev/corecg/pdf.hxx @@ -0,0 +1,47 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once + +#include <CompilerKit/Detail.hxx> +#include <NewKit/Defines.hxx> + +namespace CG::PDF +{ + using namespace Kernel; + + class IPDFRenderViewport; + class IPDFDocument; + class IPDFTimestamp; + class IPDFTag; + + /// \brief PDF rendering class. + class IPDFRenderViewport + { + public: + explicit IPDFRenderViewport() = default; + virtual ~IPDFRenderViewport() = default; + + ZKA_COPY_DELETE(IPDFRenderViewport); + + virtual IPDFDocument* GetFirstPage() = 0; + virtual IPDFDocument* GetLastPage() = 0; + + virtual IPDFDocument* GetPage(const UInt32& page_number); + + virtual const Char* GetProducer() = 0; + virtual const Char* GetTitle() = 0; + virtual const Char* GetAuthor() = 0; + virtual const Char* GetSubject() = 0; + + virtual Bool IsFastView() = 0; + + virtual SizeT GetWidth() = 0; + virtual SizeT GetHeight() = 0; + + virtual SizeT GetPageCount() = 0; + }; +} // namespace CG::PDF diff --git a/dev/corecg/src/corecg.cxx b/dev/corecg/src/corecg.cxx index 7158ea62..d964888b 100644 --- a/dev/corecg/src/corecg.cxx +++ b/dev/corecg/src/corecg.cxx @@ -12,7 +12,7 @@ /** @brief CoreCG main, ZWM acts a proxy to the Installed GPU Driver. */ CG::Int32 ModuleMain(CG::Void) { - CG::CGDrawDesktopBackground(); + CG::CGFillBackground(); return 0; } diff --git a/dev/zka/Modules/CoreCG/Math.hxx b/dev/crt/math.hxx index 07da020d..5f55b430 100644 --- a/dev/zka/Modules/CoreCG/Math.hxx +++ b/dev/crt/math.hxx @@ -11,27 +11,19 @@ /// @file Math.hxx /// @brief Math functions. -namespace CG +namespace CRT { using namespace Kernel; #ifdef __ZKA_USE_DOUBLE__ - typedef double CGReal; + typedef double Real; #else - typedef float CGReal; + typedef float Real; #endif - /// @brief Square of function, with Base template argument. - /// @param of Base argument to find sqquare of - template <CGReal Base> - inline CGReal SqrOf(CGReal of) - { - return (of / (1.0 / Base)); - } - /// @brief Power function, with Repeat argument. - template <CGReal Exponent> - inline CGReal Pow(CGReal in) + template <SizeT Exponent> + inline Real Pow(Real in) { if (Exponent == 0) return 1; // Any number to the power of 0 is 1. @@ -39,9 +31,9 @@ namespace CG if (Exponent == 1) return in; // Any number to the power of 1 is itself. - Int32 cnt = Exponent; + UInt64 cnt = Exponent; - CGReal result = 1; + Real result = 1; for (auto i = 0; i < (cnt); ++i) result *= in; @@ -49,13 +41,24 @@ namespace CG return result; } + /// @brief Square of function, with Base template argument. + /// @param of Base argument to find sqquare of + template <SizeT Base> + inline Real SqrOf(Real in) + { + if (in == 0) + return 0; + + return Pow<1 / Base>(in); + } + /// @brief Linear interpolation equation solver. /// @param from where? /// @param to to? - /// @param at which state we're at **to**. - inline CGReal CGLerp(CGReal to, CGReal from, CGReal stat) + /// @param Updated diff value according to difference. + inline Real CGLerp(Real to, Real from, Real stat) { - CGReal diff = (to - from); + Real diff = (to - from); return from + (diff * stat); } -} // namespace CG +} // namespace CRT diff --git a/dev/install/X64/InstallerRoutines.asm b/dev/install/hal/install_api.asm index 61c712d0..482cfc0c 100644 --- a/dev/install/X64/InstallerRoutines.asm +++ b/dev/install/hal/install_api.asm @@ -16,7 +16,7 @@ section .data -kInstallTitle: db "ZKA Installer", 0 +kInstallTitle: db "Formatting...", 0 section .text @@ -29,6 +29,3 @@ InstInstallToDir: mov r9, rdx ; FILE_INFO_STRUCT (DST) syscall ;; 0 = GOOD, 1 = BAD FIS (SRC), 2 = BAD FIS (DST) ret - - - diff --git a/dev/zba/src/HEL/AMD64/BootFileReader.cxx b/dev/zba/src/HEL/AMD64/BootFileReader.cxx index ffbcf413..ada5cb01 100644 --- a/dev/zba/src/HEL/AMD64/BootFileReader.cxx +++ b/dev/zba/src/HEL/AMD64/BootFileReader.cxx @@ -13,7 +13,7 @@ #include <BootKit/BootKit.hxx> #include <FirmwareKit/Handover.hxx> #include <FirmwareKit/EFI/API.hxx> -#include <Modules/CoreCG/TextRenderer.hxx> +#include <Modules/CoreCG/Text.hxx> /// @file BootFileReader /// @brief Bootloader File reader. diff --git a/dev/zba/src/HEL/AMD64/BootMain.cxx b/dev/zba/src/HEL/AMD64/BootMain.cxx index 809dc099..6d34d822 100644 --- a/dev/zba/src/HEL/AMD64/BootMain.cxx +++ b/dev/zba/src/HEL/AMD64/BootMain.cxx @@ -6,8 +6,8 @@ #include <BootKit/BootKit.hxx> #include <BootKit/Rsrc/NewBoot.rsrc> -#include <Modules/CoreCG/FbRenderer.hxx> -#include <Modules/CoreCG/TextRenderer.hxx> +#include <Modules/CoreCG/FB.hxx> +#include <Modules/CoreCG/Text.hxx> #include <FirmwareKit/EFI.hxx> #include <FirmwareKit/EFI/API.hxx> #include <FirmwareKit/Handover.hxx> @@ -305,6 +305,9 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, EFI::ExitBootServices(MapKey, ImageHandle); + CGDrawInRegion(CGColor(0xFF, 0x3A, 0x3A), handover_hdr->f_GOP.f_Height, handover_hdr->f_GOP.f_Width, 0, 0); + CGFini(); + // ---------------------------------------------------- // // Finally load Kernel, and the cr3 to it. // ---------------------------------------------------- // diff --git a/dev/zba/src/Thread.cxx b/dev/zba/src/Thread.cxx index 3a4fc98e..518a1c5d 100644 --- a/dev/zba/src/Thread.cxx +++ b/dev/zba/src/Thread.cxx @@ -13,7 +13,7 @@ #include <KernelKit/PE.hxx> #include <KernelKit/MSDOS.hxx> #include <CFKit/LoaderUtils.hxx> -#include <Modules/CoreCG/TextRenderer.hxx> +#include <Modules/CoreCG/Text.hxx> EXTERN_C { diff --git a/dev/zka/CompressKit/RLE.hxx b/dev/zka/CompressKit/RLE.hxx index 647cf00b..e79eede6 100644 --- a/dev/zka/CompressKit/RLE.hxx +++ b/dev/zka/CompressKit/RLE.hxx @@ -11,8 +11,8 @@ namespace Kernel { - EXTERN_C Void rle_compress(VoidPtr data, Size sz, VoidPtr out, Size out_sz); - EXTERN_C Void rle_decompress(VoidPtr data, Size sz, VoidPtr out, Size out_sz); + Void rle_compress(VoidPtr data, Size sz, VoidPtr out, Size out_sz); + Void rle_decompress(VoidPtr data, Size sz, VoidPtr out, Size out_sz); } // namespace Kernel #endif // !ifndef __KERNELKIT_RLE_HXX__ diff --git a/dev/zka/FirmwareKit/EFI/API.hxx b/dev/zka/FirmwareKit/EFI/API.hxx index 6245e0e4..ba304c27 100644 --- a/dev/zka/FirmwareKit/EFI/API.hxx +++ b/dev/zka/FirmwareKit/EFI/API.hxx @@ -21,7 +21,7 @@ class BTextWriter; #define __BOOTKIT_NO_INCLUDE__ 1 #include <BootKit/BootKit.hxx> -#include <Modules/CoreCG/FbRenderer.hxx> +#include <Modules/CoreCG/FB.hxx> #endif // ifdef __NEWOSLDR__ inline EfiSystemTable* ST = nullptr; diff --git a/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx b/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx index 18302f34..4c36c278 100644 --- a/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx +++ b/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx @@ -12,7 +12,7 @@ #include <KernelKit/Semaphore.hxx> #include <KernelKit/UserProcessScheduler.hxx> #include <KernelKit/Timer.hxx> -#include <Modules/CoreCG/TextRenderer.hxx> +#include <Modules/CoreCG/Text.hxx> // Needed for SMP. // #include <FirmwareKit/EFI.hxx> diff --git a/dev/zka/HALKit/AMD64/HalKernelMain.cxx b/dev/zka/HALKit/AMD64/HalKernelMain.cxx index ad978a08..6bce92c2 100644 --- a/dev/zka/HALKit/AMD64/HalKernelMain.cxx +++ b/dev/zka/HALKit/AMD64/HalKernelMain.cxx @@ -5,7 +5,7 @@ ------------------------------------------- */ #include <ArchKit/ArchKit.hxx> -#include <Modules/CoreCG/FbRenderer.hxx> +#include <Modules/CoreCG/FB.hxx> #include <FirmwareKit/Handover.hxx> #include <KernelKit/FileMgr.hxx> #include <KernelKit/Heap.hxx> @@ -17,8 +17,8 @@ #include <Modules/ACPI/ACPIFactoryInterface.hxx> #include <NetworkKit/IPC.hxx> #include <CFKit/Property.hxx> -#include <Modules/CoreCG/TextRenderer.hxx> -#include <Modules/CoreCG/DesktopRenderer.hxx> +#include <Modules/CoreCG/Text.hxx> +#include <Modules/CoreCG/Desktop.hxx> namespace Kernel::HAL { diff --git a/dev/zka/HALKit/AMD64/Processor.hxx b/dev/zka/HALKit/AMD64/Processor.hxx index fab5c372..7aaeab31 100644 --- a/dev/zka/HALKit/AMD64/Processor.hxx +++ b/dev/zka/HALKit/AMD64/Processor.hxx @@ -111,6 +111,8 @@ namespace Kernel::HAL RawRegister R14{0}; RawRegister R15{0}; RawRegister GS{0}; + RawRegister SP{0}; + RawRegister BP{0}; }; typedef StackFrame* StackFramePtr; diff --git a/dev/zka/HALKit/ARM64/HalKernelMain.cxx b/dev/zka/HALKit/ARM64/HalKernelMain.cxx index 67b98765..d7252394 100644 --- a/dev/zka/HALKit/ARM64/HalKernelMain.cxx +++ b/dev/zka/HALKit/ARM64/HalKernelMain.cxx @@ -5,7 +5,7 @@ ------------------------------------------- */ #include <ArchKit/ArchKit.hxx> -#include <Modules/CoreCG/FbRenderer.hxx> +#include <Modules/CoreCG/FB.hxx> #include <FirmwareKit/Handover.hxx> #include <KernelKit/FileMgr.hxx> #include <KernelKit/Heap.hxx> @@ -17,7 +17,7 @@ #include <Modules/ACPI/ACPIFactoryInterface.hxx> #include <NetworkKit/IPC.hxx> #include <CFKit/Property.hxx> -#include <Modules/CoreCG/DesktopRenderer.hxx> +#include <Modules/CoreCG/Desktop.hxx> namespace Kernel::HAL { @@ -42,7 +42,7 @@ EXTERN_C void hal_init_platform( return; } - CG::CGDrawDesktopBackground(); + CG::CGFillBackground(); // get page size. kKernelBitMpSize = kHandoverHeader->f_BitMapSize; diff --git a/dev/zka/Modules/.gitkeep b/dev/zka/Modules/.gitkeep deleted file mode 100644 index e69de29b..00000000 --- a/dev/zka/Modules/.gitkeep +++ /dev/null diff --git a/dev/zka/Modules/CoreCG/Accessibility.hxx b/dev/zka/Modules/CoreCG/Accessibility.hxx index 1f26dec4..77e94b1a 100644 --- a/dev/zka/Modules/CoreCG/Accessibility.hxx +++ b/dev/zka/Modules/CoreCG/Accessibility.hxx @@ -9,9 +9,9 @@ #include <NewKit/NewKit.hxx> #include <KernelKit/LPC.hxx> -#include <Modules/CoreCG/FbRenderer.hxx> -#include <Modules/CoreCG/Math.hxx> +#include <Modules/CoreCG/FB.hxx> #include <ArchKit/ArchKit.hxx> +#include <crt/math.hxx> namespace CG { diff --git a/dev/zka/Modules/CoreCG/Desktop.hxx b/dev/zka/Modules/CoreCG/Desktop.hxx new file mode 100644 index 00000000..dfca3e79 --- /dev/null +++ b/dev/zka/Modules/CoreCG/Desktop.hxx @@ -0,0 +1,108 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once + +#include <Modules/CoreCG/Accessibility.hxx> +#include <KernelKit/Heap.hxx> +#include <KernelKit/UserProcessScheduler.hxx> +#include <KernelKit/LPC.hxx> +#include <NewKit/Defines.hxx> +#include <NewKit/Utils.hxx> +#include <Modules/CoreCG/FB.hxx> +#include <Modules/CoreCG/Rsrc/Controls.rsrc> +#include <Modules/CoreCG/Text.hxx> + +namespace CG +{ + using namespace Kernel; + + class ICGDesktopBackground; + + /// \brief Desktop background class. + class ICGDesktopBackground final + { + UInt32* fTheFB{nullptr}; + UInt32 fPPL{0}; + UInt32 fWidth{0}; + UInt32 fHeight{0}; + + public: + explicit ICGDesktopBackground(UInt32* fb, UInt32 ppl, UInt32 width, UInt32 height) + : fTheFB(fb), fPPL(ppl), fWidth(width), fHeight(height) + { + } + + ~ICGDesktopBackground() = default; + + ZKA_COPY_DEFAULT(ICGDesktopBackground); + + Void Refresh(UInt32* raw_bmp = nullptr, SizeT width = 0, SizeT height = 0) noexcept + { + if (this->fWidth < width || + this->fHeight < height) + return; + + CGInit(); + + if (!raw_bmp) + { + const auto cColorBackground = CGColor(0x45, 0x00, 0x06); + + for (Kernel::SizeT x_base = 0; x_base < width; ++x_base) + { + for (Kernel::SizeT y_base = 0; y_base < height; ++y_base) + { + *(((volatile Kernel::UInt32*)(fTheFB + + 4 * fPPL * + x_base + + 4 * y_base))) = cColorBackground; + } + } + } + else + { + Kernel::SizeT cur = 0; + + for (Kernel::SizeT y = 0; y < height; ++y) + { + for (Kernel::SizeT x = 0; x < width; ++x) + { + *(((Kernel::UInt32*)(fTheFB + + 4 * fPPL * + y + + 4 * x))) = raw_bmp[cur]; + + ++cur; + } + } + } + + CGFini(); + } + }; + + /// \brief Draw background (either image or solid color) + inline Void CGFillBackground(UInt32* raw_bmp = nullptr, SizeT width = 0, SizeT height = 0) noexcept + { + CGInit(); + + if (!raw_bmp) + { + const auto cColorBackground = CGColor(0x45, 0x00, 0x06); + + CGDrawInRegion(cColorBackground, CG::CGAccessibilty::The().Height(), CG::CGAccessibilty::The().Width(), + 0, 0); + } + else + { + CGDrawBitMapInRegion(raw_bmp, height, width, + 0, 0); + } + + CGFini(); + } +} // namespace CG diff --git a/dev/zka/Modules/CoreCG/DesktopRenderer.hxx b/dev/zka/Modules/CoreCG/DesktopRenderer.hxx deleted file mode 100644 index e83ec8ef..00000000 --- a/dev/zka/Modules/CoreCG/DesktopRenderer.hxx +++ /dev/null @@ -1,45 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include <Modules/CoreCG/Accessibility.hxx> -#include <KernelKit/Heap.hxx> -#include <KernelKit/UserProcessScheduler.hxx> -#include <KernelKit/LPC.hxx> -#include <NewKit/Defines.hxx> -#include <NewKit/Utils.hxx> -#include <Modules/CoreCG/FbRenderer.hxx> -#include <Modules/CoreCG/Rsrc/WndControls.rsrc> -#include <Modules/CoreCG/TextRenderer.hxx> - -namespace CG -{ - using namespace Kernel; - - class ICGBackground; - - /// \brief Draw background (either image or solid color) - inline Void CGDrawDesktopBackground(UInt32* raw_bmp = nullptr, SizeT width = 0, SizeT height = 0) noexcept - { - CGInit(); - - if (!raw_bmp) - { - const auto cColorBackground = CGColor(0x45, 0x00, 0x06); - - CGDrawInRegion(cColorBackground, CG::CGAccessibilty::The().Height(), CG::CGAccessibilty::The().Width(), - 0, 0); - } - else - { - CGDrawBitMapInRegion(raw_bmp, height, width, - 0, 0); - } - - CGFini(); - } -} // namespace CG diff --git a/dev/zka/Modules/CoreCG/FbRenderer.hxx b/dev/zka/Modules/CoreCG/FB.hxx index 9235e1f3..9235e1f3 100644 --- a/dev/zka/Modules/CoreCG/FbRenderer.hxx +++ b/dev/zka/Modules/CoreCG/FB.hxx diff --git a/dev/zka/Modules/CoreCG/Rsrc/WndControls.rsrc b/dev/zka/Modules/CoreCG/Rsrc/Controls.rsrc index a7024fde..de3945d2 100644 --- a/dev/zka/Modules/CoreCG/Rsrc/WndControls.rsrc +++ b/dev/zka/Modules/CoreCG/Rsrc/Controls.rsrc @@ -1,8 +1,10 @@ -#define FLATCONTROLS_HEIGHT 24 -#define FLATCONTROLS_WIDTH 44 +#define cFlatCtrlsHeight 24 +#define cFlatCtrlsWidth 44 + +#define cFlatControlsLength 3168 // array size is 3168 -static inline const unsigned int FlatControls[] = { +static inline const unsigned int FlatControls[cFlatControlsLength] = { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, @@ -29,11 +31,8 @@ static inline const unsigned int FlatControls[] = { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff }; -#define FLATCONTROLS_CLOSE_HEIGHT 24 -#define FLATCONTROLS_CLOSE_WIDTH 44 - // array size is 3168 -static inline const unsigned int FlatControlsClose[] = { +static inline const unsigned int FlatControlsClose[cFlatControlsLength] = { 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, diff --git a/dev/zka/Modules/CoreCG/TextRenderer.hxx b/dev/zka/Modules/CoreCG/Text.hxx index b3a6b88c..ac21638a 100644 --- a/dev/zka/Modules/CoreCG/TextRenderer.hxx +++ b/dev/zka/Modules/CoreCG/Text.hxx @@ -7,7 +7,7 @@ #pragma once
#include <NewKit/Defines.hxx>
-#include <Modules/CoreCG/FbRenderer.hxx>
+#include <Modules/CoreCG/FB.hxx>
#define FONT_SIZE_X 8
#define FONT_SIZE_Y 8
diff --git a/dev/zka/Modules/ReadMe.md b/dev/zka/Modules/ReadMe.md index de72cb1a..329f67ce 100644 --- a/dev/zka/Modules/ReadMe.md +++ b/dev/zka/Modules/ReadMe.md @@ -1,4 +1,4 @@ -# Kernel modules +# Kernel Modules. Pluggable modules for builtin hardware support within the Kernel. diff --git a/dev/zka/src/KernelCheck.cxx b/dev/zka/src/KernelCheck.cxx index 73809ba8..49ca5edf 100644 --- a/dev/zka/src/KernelCheck.cxx +++ b/dev/zka/src/KernelCheck.cxx @@ -13,9 +13,9 @@ #include <Modules/ACPI/ACPIFactoryInterface.hxx> #include <KernelKit/FileMgr.hxx> #include <Modules/CoreCG/Accessibility.hxx> -#include <Modules/CoreCG/FbRenderer.hxx> -#include <Modules/CoreCG/TextRenderer.hxx> -#include <Modules/CoreCG/DesktopRenderer.hxx> +#include <Modules/CoreCG/FB.hxx> +#include <Modules/CoreCG/Text.hxx> +#include <Modules/CoreCG/Desktop.hxx> #define SetMem(dst, byte, sz) Kernel::rt_set_memory((Kernel::VoidPtr)dst, byte, sz) #define CopyMem(dst, src, sz) Kernel::rt_copy_memory((Kernel::VoidPtr)src, (Kernel::VoidPtr)dst, sz) @@ -34,7 +34,7 @@ namespace Kernel auto panicTxt = RGB(0xff, 0xff, 0xff); - CG::CGDrawDesktopBackground(); + CG::CGFillBackground(); auto start_y = 10; auto x = 10; |
