diff options
Diffstat (limited to 'dev/zka/src')
| -rw-r--r-- | dev/zka/src/DriveMgr.cxx | 2 | ||||
| -rw-r--r-- | dev/zka/src/Framebuffer.cxx | 113 | ||||
| -rw-r--r-- | dev/zka/src/Heap.cxx | 6 | ||||
| -rw-r--r-- | dev/zka/src/KernelCheck.cxx | 4 | ||||
| -rw-r--r-- | dev/zka/src/Variant.cxx | 2 |
5 files changed, 8 insertions, 119 deletions
diff --git a/dev/zka/src/DriveMgr.cxx b/dev/zka/src/DriveMgr.cxx index f6436f75..f237458a 100644 --- a/dev/zka/src/DriveMgr.cxx +++ b/dev/zka/src/DriveMgr.cxx @@ -10,7 +10,7 @@ #include <Modules/ATA/ATA.hxx> #include <Modules/AHCI/AHCI.hxx> -#include <Modules/NVME/Defines.hxx> +#include <Modules/NVME/NVME.hxx> /// @file DriveMgr.cxx /// @brief Kernel drive manager. diff --git a/dev/zka/src/Framebuffer.cxx b/dev/zka/src/Framebuffer.cxx deleted file mode 100644 index 3794e458..00000000 --- a/dev/zka/src/Framebuffer.cxx +++ /dev/null @@ -1,113 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - - File: Framebuffer.cxx - Purpose: Framebuffer object - - Revision History: - - 01/02/24: Added file (amlel) - 02/02/24: Add documentation (amlel) - 07/07/07: Moved Framebuffer methods into Kernel:: - -------------------------------------------- */ - -#include <KernelKit/Framebuffer.hxx> -#include <HintKit/CompilerHint.hxx> - -/** - * @brief Framebuffer object implementation. - * - */ - -namespace Kernel -{ - Framebuffer::Framebuffer(_Input Ref<FramebufferContext*>& addr) - : fFrameBufferAddr(addr) - { - } - - /** - * @brief Get Pixel at **pos** - * - * @param pos position of pixel. - * @return volatile* - */ - _Output volatile UIntPtr* Framebuffer::operator[](_Input const UIntPtr& pos) - { - return (UIntPtr*)(fFrameBufferAddr->fBase * pos); - } - - /// @brief Boolean operator. - Framebuffer::operator bool() - { - return fFrameBufferAddr.Leak()->fBase != 0 && - fColour != FramebufferColorKind::INVALID && - fFrameBufferAddr.Leak()->fBase != kInvalidAddress; - } - - /// @brief Set color kind of framebuffer. - /// @param colour - /// @return - _Output const FramebufferColorKind& Framebuffer::Color( - const FramebufferColorKind& colour) - { - if (fColour != FramebufferColorKind::INVALID && - colour != FramebufferColorKind::INVALID) - { - fColour = colour; - } - - return fColour; - } - - /// @brief Leak framebuffer context. - /// @return The reference of the framebuffer context. - _Output Ref<FramebufferContext*>& Framebuffer::Leak() - { - return this->fFrameBufferAddr; - } - - /// @brief Draws a rectangle. - /// @param width - /// @param height - /// @param x - /// @param y - /// @param color - /// @return - _Output Framebuffer& Framebuffer::DrawRect(SizeT width, SizeT height, SizeT x, SizeT y, UInt32 color) - { - for (Kernel::SizeT i = x; i < width + x; ++i) - { - for (Kernel::SizeT u = y; u < height + y; ++u) - { - *(((volatile Kernel::UInt32*)(fFrameBufferAddr.Leak()->fBase + - 4 * fFrameBufferAddr.Leak()->fBpp * i + - 4 * u))) = color; - } - } - - return *this; - } - - /// @brief Put a pixel on the screen. - /// @param x - /// @param y - /// @param color - /// @return - _Output Framebuffer& Framebuffer::PutPixel(SizeT x, SizeT y, UInt32 color) - { - *(((volatile Kernel::UInt32*)(fFrameBufferAddr.Leak()->fBase + - 4 * fFrameBufferAddr.Leak()->fBpp * x + - 4 * y))) = color; - - return *this; - } - - const UInt32 kRgbRed = 0x000000FF; - const UInt32 kRgbGreen = 0x0000FF00; - const UInt32 kRgbBlue = 0x00FF0000; - const UInt32 kRgbBlack = 0x00000000; - const UInt32 kRgbWhite = 0xFFFFFFFF; -} // namespace Kernel diff --git a/dev/zka/src/Heap.cxx b/dev/zka/src/Heap.cxx index a75eaeb1..71398ca2 100644 --- a/dev/zka/src/Heap.cxx +++ b/dev/zka/src/Heap.cxx @@ -102,10 +102,10 @@ namespace Kernel /// @brief Allocate chunk of memory. /// @param sz Size of pointer - /// @param rw Read Write bit. + /// @param wr Read Write bit. /// @param user User enable bit. /// @return The newly allocated pointer. - VoidPtr mm_new_heap(const SizeT sz, const bool rw, const bool user) + VoidPtr mm_new_heap(const SizeT sz, const bool wr, const bool user) { Detail::mm_alloc_init_timeout(); @@ -117,7 +117,7 @@ namespace Kernel sz_fix += sizeof(Detail::HEAP_INFORMATION_BLOCK); PageMgr heap_mgr; - auto wrapper = heap_mgr.Request(rw, user, No, sz_fix); + auto wrapper = heap_mgr.Request(wr, user, No, sz_fix); Detail::HEAP_INFORMATION_BLOCK_PTR heap_info_ptr = reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>( diff --git a/dev/zka/src/KernelCheck.cxx b/dev/zka/src/KernelCheck.cxx index 4c316c0b..73809ba8 100644 --- a/dev/zka/src/KernelCheck.cxx +++ b/dev/zka/src/KernelCheck.cxx @@ -15,7 +15,7 @@ #include <Modules/CoreCG/Accessibility.hxx> #include <Modules/CoreCG/FbRenderer.hxx> #include <Modules/CoreCG/TextRenderer.hxx> -#include <Modules/CoreCG/WindowRenderer.hxx> +#include <Modules/CoreCG/DesktopRenderer.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::CGDrawBackground(); + CG::CGDrawDesktopBackground(); auto start_y = 10; auto x = 10; diff --git a/dev/zka/src/Variant.cxx b/dev/zka/src/Variant.cxx index e988d783..652fe158 100644 --- a/dev/zka/src/Variant.cxx +++ b/dev/zka/src/Variant.cxx @@ -12,6 +12,8 @@ namespace Kernel { switch (fKind) { + case VariantKind::kXML: + return ("Class:{XML}"); case VariantKind::kJson: return ("Class:{Json}"); case VariantKind::kString: |
