From a6eb9a77787f63f08470c3ff12ac0517b482ea65 Mon Sep 17 00:00:00 2001 From: Amlal Date: Sun, 29 Sep 2024 12:29:21 +0200 Subject: IMP: Design changes and reworked WM to PDM. - Refactor other modules and drivers as well. - AMD64 HAL code improvements as well. The last thing left is the paging API and driver loading internal API. Signed-off-by: Amlal --- compile_flags.txt | 1 + dev/base/EncryptFS/disk_crypt.hxx | 23 +-- dev/base/EncryptFS/src/disk_crypt.cxx | 2 +- dev/base/FireWall/src/fwentry.cc | 2 +- dev/corecg/corecg.json | 23 --- dev/corecg/pdf.hxx | 47 ------ dev/corecg/src/corecg_main.cxx | 18 -- dev/corecg/src/corecg_pdf.cxx | 7 - dev/corecg/wm.hxx | 247 ---------------------------- dev/install/ReadMe.md | 8 +- dev/pdm/pdf_pdm.hxx | 45 +++++ dev/pdm/pdm.json | 23 +++ dev/pdm/src/pdm_pdf.cxx | 7 + dev/zba/src/HEL/AMD64/BootFileReader.cxx | 2 +- dev/zba/src/HEL/AMD64/BootMain.cxx | 4 +- dev/zba/src/Thread.cxx | 2 +- dev/zka/FirmwareKit/EFI/API.hxx | 2 +- dev/zka/HALKit/AMD64/HalBMPMgr.cxx | 2 +- dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx | 4 +- dev/zka/HALKit/AMD64/HalKernelMain.cxx | 10 +- dev/zka/HALKit/ARM64/HalKernelMain.cxx | 8 +- dev/zka/Modules/CoreCG/Accessibility.hxx | 47 ------ dev/zka/Modules/CoreCG/Desktop.hxx | 108 ------------ dev/zka/Modules/CoreCG/FB.hxx | 154 ----------------- dev/zka/Modules/CoreCG/Rsrc/Controls.rsrc | 60 ------- dev/zka/Modules/CoreCG/Rsrc/Cursor.rsrc | 64 ------- dev/zka/Modules/CoreCG/Text.hxx | 178 -------------------- dev/zka/Modules/FB/FB.hxx | 154 +++++++++++++++++ dev/zka/Modules/FB/Text.hxx | 178 ++++++++++++++++++++ dev/zka/Modules/ReadMe.md | 2 +- dev/zka/NewKit/KernelCheck.hxx | 71 -------- dev/zka/NewKit/NewKit.hxx | 2 +- dev/zka/NewKit/OwnPtr.hxx | 2 +- dev/zka/NewKit/Ref.hxx | 4 +- dev/zka/NewKit/Stop.hxx | 71 ++++++++ dev/zka/NewKit/String.hxx | 2 +- dev/zka/src/FS/NeFS.cxx | 2 +- dev/zka/src/IPEFDLLObject.cxx | 36 ++-- dev/zka/src/KernelCheck.cxx | 155 ----------------- dev/zka/src/LPC.cxx | 2 +- dev/zka/src/LockDelegate.cxx | 4 +- dev/zka/src/PEFCodeMgr.cxx | 2 +- dev/zka/src/Stop.cxx | 148 +++++++++++++++++ dev/zka/src/User.cxx | 4 +- 44 files changed, 687 insertions(+), 1250 deletions(-) delete mode 100644 dev/corecg/corecg.json delete mode 100644 dev/corecg/pdf.hxx delete mode 100644 dev/corecg/src/corecg_main.cxx delete mode 100644 dev/corecg/src/corecg_pdf.cxx delete mode 100644 dev/corecg/wm.hxx create mode 100644 dev/pdm/pdf_pdm.hxx create mode 100644 dev/pdm/pdm.json create mode 100644 dev/pdm/src/pdm_pdf.cxx delete mode 100644 dev/zka/Modules/CoreCG/Accessibility.hxx delete mode 100644 dev/zka/Modules/CoreCG/Desktop.hxx delete mode 100644 dev/zka/Modules/CoreCG/FB.hxx delete mode 100644 dev/zka/Modules/CoreCG/Rsrc/Controls.rsrc delete mode 100644 dev/zka/Modules/CoreCG/Rsrc/Cursor.rsrc delete mode 100644 dev/zka/Modules/CoreCG/Text.hxx create mode 100644 dev/zka/Modules/FB/FB.hxx create mode 100644 dev/zka/Modules/FB/Text.hxx delete mode 100644 dev/zka/NewKit/KernelCheck.hxx create mode 100644 dev/zka/NewKit/Stop.hxx delete mode 100644 dev/zka/src/KernelCheck.cxx create mode 100644 dev/zka/src/Stop.cxx diff --git a/compile_flags.txt b/compile_flags.txt index 8f82fdd5..1d8b2edf 100644 --- a/compile_flags.txt +++ b/compile_flags.txt @@ -2,6 +2,7 @@ -Idev/ -Idev/zba/ -Idev/zba/BootKit +-Idev/base/ -std=c++20 -D__ZKA_AMD64__ -D__NEWOSKRNL__ diff --git a/dev/base/EncryptFS/disk_crypt.hxx b/dev/base/EncryptFS/disk_crypt.hxx index 0b80a930..6fb19b29 100644 --- a/dev/base/EncryptFS/disk_crypt.hxx +++ b/dev/base/EncryptFS/disk_crypt.hxx @@ -2,8 +2,8 @@ Copyright ZKA Technologies. - File: Encrypt.hxx - Purpose: Encrypted File System + File: disk_encrypt.hxx + Purpose: Disk Encryption File System Revision History: @@ -15,14 +15,17 @@ #include -/**************************************** */ -/// @brief Locks an EFS partition. -/**************************************** */ +namespace Kernel +{ + /**************************************** */ + /// @brief Locks an EFS partition. + /**************************************** */ -Kernel::Int32 efs_lock_partition(Kernel::Char* partition_name, Kernel::Char* password, Kernel::Size length); + Int32 efs_lock_partition(const Char* partition_name, const Char* password, SizeT length); -/**************************************** */ -/// @brief Unlocks an EFS partition. -/**************************************** */ + /**************************************** */ + /// @brief Unlocks an EFS partition. + /**************************************** */ -Kernel::Int32 efs_unlock_partition(Kernel::Char* partition_name, Kernel::Char* password, Kernel::Size length); + Int32 efs_unlock_partition(const Char* partition_name, const Char* password, SizeT length); +} // namespace Kernel diff --git a/dev/base/EncryptFS/src/disk_crypt.cxx b/dev/base/EncryptFS/src/disk_crypt.cxx index d251efef..0c3cd8a2 100644 --- a/dev/base/EncryptFS/src/disk_crypt.cxx +++ b/dev/base/EncryptFS/src/disk_crypt.cxx @@ -4,7 +4,7 @@ ------------------------------------------- */ -#include +#include enum { diff --git a/dev/base/FireWall/src/fwentry.cc b/dev/base/FireWall/src/fwentry.cc index e7b929d3..582e7366 100644 --- a/dev/base/FireWall/src/fwentry.cc +++ b/dev/base/FireWall/src/fwentry.cc @@ -2,4 +2,4 @@ * Copyright (c) 2024 ZKA Technologies */ -#include \ No newline at end of file +#include diff --git a/dev/corecg/corecg.json b/dev/corecg/corecg.json deleted file mode 100644 index e7f5c216..00000000 --- a/dev/corecg/corecg.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++", - "compiler_std": "c++20", - "headers_path": ["../", "../zka"], - "sources_path": ["src/*.cxx"], - "output_name": "corecg.sys", - "compiler_flags": [ - "-fPIC", - "-ffreestanding", - "-shared", - "-fno-rtti", - "-fno-exceptions", - "-Wl,--subsystem=17" - ], - "cpp_macros": [ - "__CORECG_IMPL__", - "__NEWOSKRNL__", - "__ZKA_AMD64__", - "cCoreCGVersion=0x0100", - "cCoreCGVersionHighest=0x0100", - "cCoreCGVersionLowest=0x0100" - ] -} diff --git a/dev/corecg/pdf.hxx b/dev/corecg/pdf.hxx deleted file mode 100644 index eda69d0c..00000000 --- a/dev/corecg/pdf.hxx +++ /dev/null @@ -1,47 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include -#include - -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_main.cxx b/dev/corecg/src/corecg_main.cxx deleted file mode 100644 index c4039db2..00000000 --- a/dev/corecg/src/corecg_main.cxx +++ /dev/null @@ -1,18 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - - FILE: corecg.cxx - PURPOSE: CoreCG Window Manager entrypoint. - -------------------------------------------- */ - -#include - -/** @brief CoreCG main, ZWM acts a proxy to the Installed GPU Driver. */ -CG::Int32 ModuleMain(CG::Void) -{ - CG::CGFillBackground(); - - return 0; -} diff --git a/dev/corecg/src/corecg_pdf.cxx b/dev/corecg/src/corecg_pdf.cxx deleted file mode 100644 index ac785ff8..00000000 --- a/dev/corecg/src/corecg_pdf.cxx +++ /dev/null @@ -1,7 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#include diff --git a/dev/corecg/wm.hxx b/dev/corecg/wm.hxx deleted file mode 100644 index c33c3dde..00000000 --- a/dev/corecg/wm.hxx +++ /dev/null @@ -1,247 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include - -namespace CG::WM -{ - struct ICGWindowViewport; - struct ICGWindowManager; - - enum - { - cWndFlagNoShow = 0x02, - cWndFlagButton = 0x04, - cWndFlagWindow = 0x06, - cWndFlagButtonSelect = 0x08, - cWndFlagNoCloseButton = 0x010, - cWndFlagCloseButton = 0x012, - cWndFlagSelectBox = 0x014, - cWndFlagInputBox = 0x016, - cWndFlagCheckBoxFirstState = 0x018, - cWndFlagCheckBoxTwoState = 0x018, - cWndFlagCheckBoxThreeState = 0x018, - }; - - struct ICGWindowViewport final - { - private: - friend ICGWindowManager; - - STATIC constexpr auto cChildElementCount = 4096; - - Char w_window_name[255]{0}; - Char w_class_name[255]{0}; - Int32 w_type{0}; - Int32 w_sub_type{0}; - Int32 w_x{0}; - Int32 w_y{0}; - Int32 w_w{0}; - Int32 w_h{0}; - Size w_child_count{0}; - struct ICGWindowViewport* w_child_list[cChildElementCount]{0}; - struct ICGWindowViewport* w_parent_wnd{nullptr}; - UInt32* w_canvas{nullptr}; - Bool w_needs_repaint{false}; - }; - - class ICGWindowManager - { - public: - struct ICGWindowViewport* Create(Int32 kind, const Char* window_name, const Char* class_name, Int32 x, Int32 y, Int32 width, Int32 height, ICGWindowViewport* parent = nullptr) - { - ICGWindowViewport* wnd = new ICGWindowViewport(); - - if (!wnd) - { - ErrLocal() = kErrorHeapOutOfMemory; - return nullptr; - } - - rt_copy_memory((VoidPtr)window_name, wnd->w_window_name, rt_string_len(window_name)); - rt_copy_memory((VoidPtr)class_name, wnd->w_class_name, rt_string_len(class_name)); - - if (parent) - { - wnd->w_parent_wnd = parent; - - ++wnd->w_parent_wnd->w_child_count; - wnd->w_parent_wnd->w_child_list[wnd->w_parent_wnd->w_child_count - 1] = wnd; - } - - wnd->w_sub_type = 0; - wnd->w_type = kind; - wnd->w_x = x; - wnd->w_y = y; - - wnd->w_w = width; - wnd->w_h = height; - - wnd->w_canvas = new UInt32[width * height]; - rt_set_memory(wnd->w_canvas, CGColor(0xF5, 0xF5, 0xF5), width * height); - - return wnd; - } - - /// \brief Destroys a window and it's contents. - Bool Destroy(struct ICGWindowViewport* wnd) - { - if (wnd) - { - if (!mm_is_valid_heap(wnd)) - { - wnd = nullptr; - return true; - } - - wnd->w_needs_repaint = No; - - for (SizeT index = 0UL; index < wnd->w_child_count; ++index) - { - this->Destroy(wnd->w_child_list[index]); - } - - delete wnd; - wnd = nullptr; - - return true; - } - - return false; - } - - Kernel::Void DrawTextToWnd(ICGWindowViewport* wnd, const Kernel::Char* text, Kernel::Int32 y_dst, Kernel::Int32 x_dst, Kernel::Int32 color) - { - y_dst += wnd->w_y + cFlatCtrlsHeight; - x_dst += wnd->w_x; - - if (y_dst > (wnd->w_h + wnd->w_y)) - return; - - for (Kernel::SizeT i = 0; text[i] != 0; ++i) - { - if (x_dst > (wnd->w_w + wnd->w_x)) - break; - - CGRenderStringFromBitMap(&cFontBitmap[text[i]][0], FONT_SIZE_X, FONT_SIZE_Y, y_dst, x_dst, color); - x_dst += FONT_SIZE_Y; - } - } - - SizeT Draw(ICGWindowViewport** wnd, SizeT wnd_cnt) - { - if (wnd_cnt == 0 || - !wnd) - return 0; - - SizeT cnt = 0; - - for (SizeT index = 0; index < wnd_cnt; ++index) - { - if (!wnd[index] || - (wnd[index]->w_type == cWndFlagNoShow) || - !wnd[index]->w_needs_repaint) - continue; - - CGInit(); - - wnd[index]->w_needs_repaint = false; - - if (CGAccessibilty::The().Width() < wnd[index]->w_x) - { - if ((wnd[index]->w_x - CGAccessibilty::The().Width()) > 1) - { - wnd[index]->w_x -= wnd[index]->w_x - CGAccessibilty::The().Width(); - } - else - { - wnd[index]->w_x = 0; - } - } - - if (CGAccessibilty::The().Height() < wnd[index]->w_y) - { - if ((wnd[index]->w_y - CGAccessibilty::The().Height()) > 1) - { - wnd[index]->w_y -= wnd[index]->w_y - CGAccessibilty::The().Width(); - } - else - { - wnd[index]->w_y = 0; - } - } - - ++cnt; - - // Draw fake controls, just for the looks of it (WINDOW ONLY) - 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, 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, cFlatCtrlsHeight, cFlatCtrlsWidth, wnd[index]->w_y, wnd[index]->w_x + wnd[index]->w_w - cFlatCtrlsWidth); - } - else - { - CGDrawBitMapInRegion(FlatControls, cFlatCtrlsHeight, cFlatCtrlsWidth, wnd[index]->w_y, wnd[index]->w_x + wnd[index]->w_w - cFlatCtrlsWidth); - } - } - - CGDrawString(wnd[index]->w_window_name, wnd[index]->w_y + 8, wnd[index]->w_x + 8, CGColor(0x00, 0x00, 0x00)); - } - /// @note buttons in this library are dynamic, it's because we want to avoid as much as computations as possible. - /// (Such as getting the middle coordinates of a button, to center the text.) - else if (wnd[index]->w_type == cWndFlagButtonSelect) - { - auto x_center = wnd[index]->w_w / 2; - auto y_center = wnd[index]->w_h / 2; - - CGDrawInRegion(CGColor(0xD3, 0x74, 0x00), wnd[index]->w_w + 1, wnd[index]->w_h + 1, wnd[index]->w_y, wnd[index]->w_x); - CGDrawInRegion(CGColor(0xFF, 0xFF, 0xFF), wnd[index]->w_w - 1, wnd[index]->w_h - 1, wnd[index]->w_y + 1, wnd[index]->w_x + 1); - - this->DrawTextToWnd(wnd[index], wnd[index]->w_window_name, y_center, x_center, CGColor(0x00, 0x00, 0x00)); - } - else if (wnd[index]->w_type == cWndFlagButton) - { - auto x_center = wnd[index]->w_w / 2; - auto y_center = wnd[index]->w_h / 2; - - CGDrawInRegion(CGColor(0xDC, 0xDC, 0xDC), wnd[index]->w_w + 1, wnd[index]->w_h + 1, wnd[index]->w_y, wnd[index]->w_x); - CGDrawInRegion(CGColor(0xFF, 0xFF, 0xFF), wnd[index]->w_w - 1, wnd[index]->w_h - 1, wnd[index]->w_y + 1, wnd[index]->w_x + 1); - - this->DrawTextToWnd(wnd[index], wnd[index]->w_window_name, y_center, x_center, CGColor(0x00, 0x00, 0x00)); - } - - CGFini(); - - // draw child windows and controls. - // doesn't have to be a window, enabling then windows in windows. - - 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 + 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)) - continue; - - this->Draw(&wnd[index]->w_child_list[child], 1); - } - - CGFini(); - } - - return cnt; - } - }; -} // namespace CG::WM diff --git a/dev/install/ReadMe.md b/dev/install/ReadMe.md index a1e39edc..799912d6 100644 --- a/dev/install/ReadMe.md +++ b/dev/install/ReadMe.md @@ -1,5 +1,5 @@ -# ReadMe: INST +# ReadMe: install -This file installs ZKA OS into an HDD. -
-It can do both EPM and GPT partitions. +This is the ZKA installer, installs the OS into an Hard-Drive. + +###### Copyright ZKA Technologies, all rights reserved. diff --git a/dev/pdm/pdf_pdm.hxx b/dev/pdm/pdf_pdm.hxx new file mode 100644 index 00000000..044c7468 --- /dev/null +++ b/dev/pdm/pdf_pdm.hxx @@ -0,0 +1,45 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once + +#include +#include + +namespace Kernel::PDF +{ + 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/pdm/pdm.json b/dev/pdm/pdm.json new file mode 100644 index 00000000..790ab0f1 --- /dev/null +++ b/dev/pdm/pdm.json @@ -0,0 +1,23 @@ +{ + "compiler_path": "x86_64-w64-mingw32-g++", + "compiler_std": "c++20", + "headers_path": ["../", "../zka"], + "sources_path": ["src/*.cxx"], + "output_name": "pdm.sys", + "compiler_flags": [ + "-fPIC", + "-ffreestanding", + "-shared", + "-fno-rtti", + "-fno-exceptions", + "-Wl,--subsystem=17" + ], + "cpp_macros": [ + "__PDM_IMPL__", + "__NEWOSKRNL__", + "__ZKA_AMD64__", + "cPDMVersion=0x0100", + "cPDMVersionHighest=0x0100", + "cPDMVersionLowest=0x0100" + ] +} diff --git a/dev/pdm/src/pdm_pdf.cxx b/dev/pdm/src/pdm_pdf.cxx new file mode 100644 index 00000000..4932923e --- /dev/null +++ b/dev/pdm/src/pdm_pdf.cxx @@ -0,0 +1,7 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#include diff --git a/dev/zba/src/HEL/AMD64/BootFileReader.cxx b/dev/zba/src/HEL/AMD64/BootFileReader.cxx index ada5cb01..764b10d4 100644 --- a/dev/zba/src/HEL/AMD64/BootFileReader.cxx +++ b/dev/zba/src/HEL/AMD64/BootFileReader.cxx @@ -13,7 +13,7 @@ #include #include #include -#include +#include /// @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 6d34d822..40c65ae1 100644 --- a/dev/zba/src/HEL/AMD64/BootMain.cxx +++ b/dev/zba/src/HEL/AMD64/BootMain.cxx @@ -6,8 +6,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/dev/zba/src/Thread.cxx b/dev/zba/src/Thread.cxx index 518a1c5d..2c6fc4b2 100644 --- a/dev/zba/src/Thread.cxx +++ b/dev/zba/src/Thread.cxx @@ -13,7 +13,7 @@ #include #include #include -#include +#include EXTERN_C { diff --git a/dev/zka/FirmwareKit/EFI/API.hxx b/dev/zka/FirmwareKit/EFI/API.hxx index ba304c27..99cfce94 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 -#include +#include #endif // ifdef __NEWOSLDR__ inline EfiSystemTable* ST = nullptr; diff --git a/dev/zka/HALKit/AMD64/HalBMPMgr.cxx b/dev/zka/HALKit/AMD64/HalBMPMgr.cxx index 0c941977..b22e96ec 100644 --- a/dev/zka/HALKit/AMD64/HalBMPMgr.cxx +++ b/dev/zka/HALKit/AMD64/HalBMPMgr.cxx @@ -15,7 +15,7 @@ #endif #include -#include +#include #define cBitMapMagIdx 0 #define cBitMapSizeIdx 1 diff --git a/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx b/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx index 4c36c278..18ab835c 100644 --- a/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx +++ b/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx @@ -7,12 +7,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include // Needed for SMP. // #include diff --git a/dev/zka/HALKit/AMD64/HalKernelMain.cxx b/dev/zka/HALKit/AMD64/HalKernelMain.cxx index 6bce92c2..83c51734 100644 --- a/dev/zka/HALKit/AMD64/HalKernelMain.cxx +++ b/dev/zka/HALKit/AMD64/HalKernelMain.cxx @@ -5,20 +5,12 @@ ------------------------------------------- */ #include -#include -#include -#include -#include -#include #include -#include -#include #include #include #include #include -#include -#include +#include namespace Kernel::HAL { diff --git a/dev/zka/HALKit/ARM64/HalKernelMain.cxx b/dev/zka/HALKit/ARM64/HalKernelMain.cxx index d7252394..2a08bb57 100644 --- a/dev/zka/HALKit/ARM64/HalKernelMain.cxx +++ b/dev/zka/HALKit/ARM64/HalKernelMain.cxx @@ -5,19 +5,17 @@ ------------------------------------------- */ #include -#include +#include #include #include #include #include #include #include -#include #include #include #include #include -#include namespace Kernel::HAL { @@ -32,8 +30,6 @@ EXTERN_C Kernel::Void ke_dll_entrypoint(Kernel::Void); EXTERN_C void hal_init_platform( Kernel::HEL::HANDOVER_INFO_HEADER* HandoverHeader) { - /* Setup globals. */ - kHandoverHeader = HandoverHeader; if (kHandoverHeader->f_Magic != kHandoverMagic && @@ -42,8 +38,6 @@ EXTERN_C void hal_init_platform( return; } - CG::CGFillBackground(); - // get page size. kKernelBitMpSize = kHandoverHeader->f_BitMapSize; diff --git a/dev/zka/Modules/CoreCG/Accessibility.hxx b/dev/zka/Modules/CoreCG/Accessibility.hxx deleted file mode 100644 index 77e94b1a..00000000 --- a/dev/zka/Modules/CoreCG/Accessibility.hxx +++ /dev/null @@ -1,47 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#ifndef __CORECG_ACCESS_HXX__ -#define __CORECG_ACCESS_HXX__ - -#include -#include -#include -#include -#include - -namespace CG -{ - using namespace Kernel; - - /// @brief Accessibilty manager class. - class CGAccessibilty final - { - explicit CGAccessibilty() = default; - ~CGAccessibilty() = default; - - public: - ZKA_COPY_DELETE(CGAccessibilty); - - STATIC CGAccessibilty& The() - { - STATIC CGAccessibilty the; - return the; - } - - Int64 Width() noexcept - { - return kHandoverHeader->f_GOP.f_Width; - } - - Int64 Height() noexcept - { - return kHandoverHeader->f_GOP.f_Height; - } - }; -} // namespace CG - -#endif // !__CORECG_ACCESS_HXX__ diff --git a/dev/zka/Modules/CoreCG/Desktop.hxx b/dev/zka/Modules/CoreCG/Desktop.hxx deleted file mode 100644 index dfca3e79..00000000 --- a/dev/zka/Modules/CoreCG/Desktop.hxx +++ /dev/null @@ -1,108 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -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/FB.hxx b/dev/zka/Modules/CoreCG/FB.hxx deleted file mode 100644 index 9235e1f3..00000000 --- a/dev/zka/Modules/CoreCG/FB.hxx +++ /dev/null @@ -1,154 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include - -#define CGInit() Kernel::SizeT __CG_CURSOR = 0 - -#define CGColor(R, G, B) RGB(R, G, B) - -#define cCGClearClr CGColor(0x0, 0x0, 0x0) - -#define CGFini() __CG_CURSOR = 0 - -/// @brief Performs OR drawing on the framebuffer. -#define CGDrawBitMapInRegionA(_BitMp, _Height, _Width, _BaseX, _BaseY) \ - __CG_CURSOR = 0; \ - \ - for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \ - { \ - for (Kernel::SizeT u = _BaseY; u < (_Width + _BaseY); ++u) \ - { \ - *(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - i + \ - 4 * u))) |= (_BitMp)[__CG_CURSOR]; \ - \ - ++__CG_CURSOR; \ - } \ - } - -/// @brief Draws a resource. -#define CGDrawBitMapInRegion(_BitMp, _Height, _Width, _BaseX, _BaseY) \ - __CG_CURSOR = 0; \ - \ - for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \ - { \ - for (Kernel::SizeT u = _BaseY; u < (_Width + _BaseY); ++u) \ - { \ - *(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - i + \ - 4 * u))) = (_BitMp)[__CG_CURSOR]; \ - \ - ++__CG_CURSOR; \ - } \ - } - -#define CGDrawBitMapInRegionToRgn(_Rgn, _BitMp, _Height, _Width, _BaseX, _BaseY) \ - __CG_CURSOR = 0; \ - \ - for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \ - { \ - for (Kernel::SizeT u = _BaseY; u < (_Width + _BaseY); ++u) \ - { \ - *(((Kernel::UInt32*)(_Rgn + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - i + \ - 4 * u))) = (_BitMp)[__CG_CURSOR]; \ - \ - ++__CG_CURSOR; \ - } \ - } - -/// @brief Cleans a resource. -#define CGClearRegion(_Height, _Width, _BaseX, _BaseY) \ - \ - for (Kernel::SizeT i = _BaseX; i < _Height + _BaseX; ++i) \ - { \ - for (Kernel::SizeT u = _BaseY; u < _Width + _BaseY; ++u) \ - { \ - *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - i + \ - 4 * u))) = cCGClearClr; \ - } \ - } - -/// @brief Draws inside a zone. -#define CGDrawInRegion(_Clr, _Height, _Width, _BaseX, _BaseY) \ - \ - for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \ - { \ - for (Kernel::SizeT y_base = _BaseY; y_base < (_Height + _BaseY); ++y_base) \ - { \ - *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - x_base + \ - 4 * y_base))) = _Clr; \ - } \ - } - -/// @brief Draws inside a zone. -#define CGDrawInRegionToRgn(_Rgn, _Clr, _Height, _Width, _BaseX, _BaseY) \ - __CG_CURSOR = 0; \ - \ - for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \ - { \ - for (Kernel::SizeT y_base = _BaseY; y_base < (_Height + _BaseY); ++y_base) \ - { \ - *(((volatile Kernel::UInt32*)(_Rgn + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - x_base + \ - 4 * y_base))) = _Clr[__CG_CURSOR]; \ - ++__CG_CURSOR; \ - } \ - } - -#define CGDrawInRegionToVideoRgn(_VideoRgn, _Clr, _Height, _Width, _BaseX, _BaseY) \ - __CG_CURSOR = 0; \ - \ - for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \ - { \ - for (Kernel::SizeT y_base = _BaseY; y_base < (_Height + _BaseY); ++y_base) \ - { \ - *(((volatile Kernel::UInt32*)(_VideoRgn + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - x_base + \ - 4 * y_base))) = _Clr; \ - ++__CG_CURSOR; \ - } \ - } - -#define CGDrawInRegionToVideoRgnA(_VideoRgn, _Clr, _Height, _Width, _BaseX, _BaseY) \ - __CG_CURSOR = 0; \ - \ - for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \ - { \ - for (Kernel::SizeT y_base = _BaseY; y_base < (_Height + _BaseY); ++y_base) \ - { \ - *(((volatile Kernel::UInt32*)(_VideoRgn + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - x_base + \ - 4 * y_base))) |= _Clr; \ - ++__CG_CURSOR; \ - } \ - } - -#define CGDrawInRegionA(_Clr, _Height, _Width, _BaseX, _BaseY) \ - \ - for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \ - { \ - for (Kernel::SizeT y_base = _BaseY; y_base < (_Height + _BaseY); ++y_base) \ - { \ - *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ - x_base + \ - 4 * y_base))) |= _Clr; \ - } \ - } diff --git a/dev/zka/Modules/CoreCG/Rsrc/Controls.rsrc b/dev/zka/Modules/CoreCG/Rsrc/Controls.rsrc deleted file mode 100644 index de3945d2..00000000 --- a/dev/zka/Modules/CoreCG/Rsrc/Controls.rsrc +++ /dev/null @@ -1,60 +0,0 @@ -#define cFlatCtrlsHeight 24 -#define cFlatCtrlsWidth 44 - -#define cFlatControlsLength 3168 - -// array size is 3168 -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, - 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, - 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, 0x3e3e3e, 0xe0e0e0, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xe0e0e0, 0x3e3e3e, 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, 0xe0e0e0, 0x3e3e3e, 0xe0e0e0, 0xffffff, 0xffffff, 0xe0e0e0, 0x3e3e3e, 0xe0e0e0, 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, 0xe0e0e0, 0x3e3e3e, 0xe0e0e0, 0xe0e0e0, 0x3e3e3e, 0xe0e0e0, 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, 0xe0e0e0, 0x3e3e3e, 0x3e3e3e, 0xe0e0e0, 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, 0xe0e0e0, 0x3e3e3e, 0x3e3e3e, 0xe0e0e0, 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, 0xe0e0e0, 0x3e3e3e, 0xe0e0e0, 0xe0e0e0, 0x3e3e3e, 0xe0e0e0, 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, 0xe0e0e0, 0x3e3e3e, 0xe0e0e0, 0xffffff, 0xffffff, 0xe0e0e0, 0x3e3e3e, 0xe0e0e0, 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, 0x3e3e3e, 0xe0e0e0, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xe0e0e0, 0x3e3e3e, 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, 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, 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 -}; - -// array size is 3168 -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, - 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, - 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, 0xfac7c7, 0xee3636, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xee3535, 0xfac7c7, 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, 0xee3535, 0xfac7c7, 0xee3636, 0xeb1616, 0xeb1616, 0xee3535, 0xfac7c7, 0xee3636, 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, 0xee3535, 0xfac7c7, 0xee3636, 0xee3535, 0xfac7c7, 0xee3636, 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, 0xee3535, 0xfac7c7, 0xfac7c7, 0xee3636, 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, 0xee3535, 0xfac7c7, 0xfac7c7, 0xee3636, 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, 0xee3535, 0xfac7c7, 0xee3636, 0xee3535, 0xfac7c7, 0xee3636, 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, 0xee3535, 0xfac7c7, 0xee3636, 0xeb1616, 0xeb1616, 0xee3535, 0xfac7c7, 0xee3636, 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, 0xfac7c7, 0xee3636, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xee3535, 0xfac7c7, 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, 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, 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/Rsrc/Cursor.rsrc b/dev/zka/Modules/CoreCG/Rsrc/Cursor.rsrc deleted file mode 100644 index 2283cb32..00000000 --- a/dev/zka/Modules/CoreCG/Rsrc/Cursor.rsrc +++ /dev/null @@ -1,64 +0,0 @@ -#define cCurHeight (57) -#define cCurWidth (53) - -#define cCurLength (3021) - -static const unsigned int Cursor[cCurLength] = { - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x0e0e0e, 0x474747, 0x474747, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x0e0e0e, 0x969696, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xdedede, 0x363636, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x969696, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x0e0e0e, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x222222, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x878787, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x363636, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xa5a5a5, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x979797, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x686868, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xdedede, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x222222, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x686868, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x969696, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xa5a5a5, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x585858, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x0e0e0e, 0x585858, 0x222222, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x363636, 0x000000, 0x000000, 0x000000, 0x686868, 0xebebeb, 0xf9f9f9, 0x969696, 0x000000, 0x000000, 0x000000, 0x222222, 0xdedede, 0xf9f9f9, 0xdedede, 0x0e0e0e, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x787878, 0x000000, 0x000000, 0x000000, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x787878, 0x000000, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x575757, 0x000000, 0x000000, 0x000000, 0x000000, 0x222222, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x000000, 0x222222, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x979797, 0x000000, 0x000000, 0x000000, 0x969696, 0xf9f9f9, 0xdedede, 0x0e0e0e, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x000000, 0x000000, 0x000000, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x0e0e0e, 0x000000, 0x000000, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xdedede, 0x000000, 0x000000, 0x000000, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0x575757, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x000000, 0x969696, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x000000, 0x969696, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x222222, 0x000000, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0x979797, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x878787, 0x000000, 0x000000, 0x585858, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x979797, 0x000000, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x686868, 0x000000, 0x000000, 0x777777, 0xf9f9f9, 0xf9f9f9, 0xdedede, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x0e0e0e, 0x474747, 0x474747, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x777777, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xcfcfcf, 0x000000, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xa5a5a5, 0x000000, 0x000000, 0x363636, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x222222, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x0e0e0e, 0xb3b3b3, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xdedede, 0x686868, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x363636, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x222222, 0x222222, 0x363636, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x787878, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xdedede, 0x222222, 0x000000, 0x000000, 0x000000, 0x000000, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x979797, 0x686868, 0x686868, 0xcfcfcf, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xcfcfcf, 0xd0d0d0, 0xdedede, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xa5a5a5, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xa5a5a5, 0x222222, 0x000000, 0x000000, 0xa5a5a5, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x787878, 0x000000, 0x000000, 0x686868, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x787878, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x0e0e0e, 0x000000, 0x000000, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x222222, 0x222222, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x222222, 0x222222, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x000000, 0x969696, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x222222, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x979797, 0x000000, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x878787, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x787878, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xcfcfcf, 0x000000, 0x000000, 0x585858, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x000000, 0x000000, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x363636, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x222222, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x222222, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x686868, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x222222, 0x222222, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x969696, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xd0d0d0, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x686868, 0x000000, 0x969696, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x474747, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x878787, 0x000000, 0x585858, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xb3b3b3, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x222222, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x222222, 0xa5a5a5, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x000000, 0x0e0e0e, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0x878787, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x0e0e0e, 0x000000, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x686868, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x969696, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x000000, 0x000000, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x969696, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xcfcfcf, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x222222, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xb3b3b3, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0x979797, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xa5a5a5, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x0e0e0e, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x000000, 0x0e0e0e, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x686868, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x787878, 0x000000, 0x777777, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x0e0e0e, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0xb4b4b4, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x0e0e0e, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x0e0e0e, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x0e0e0e, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0x878787, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0x979797, 0x000000, 0x686868, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xa5a5a5, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0xb4b4b4, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x000000, 0x000000, 0xebebeb, 0xf9f9f9, 0xdedede, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x686868, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xcfcfcf, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x979797, 0x000000, 0x474747, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x474747, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0x363636, 0x000000, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x878787, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x222222, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xececec, 0x0e0e0e, 0x000000, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0x878787, 0x000000, 0x777777, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xa5a5a5, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x343434, 0xebebeb, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x575757, 0x000000, 0x878787, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x222222, 0x222222, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xb3b3b3, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x343434, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x0e0e0e, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x222222, 0x222222, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x222222, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x222222, 0x222222, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xc2c2c2, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x686868, 0xdedede, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x686868, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x777777, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xdedede, 0x222222, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xcfcfcf, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0x585858, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x222222, 0xc2c2c2, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xf9f9f9, 0xebebeb, 0x585858, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x474747, 0x878787, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0x979797, 0x686868, 0x0e0e0e, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, - 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000 -}; diff --git a/dev/zka/Modules/CoreCG/Text.hxx b/dev/zka/Modules/CoreCG/Text.hxx deleted file mode 100644 index ac21638a..00000000 --- a/dev/zka/Modules/CoreCG/Text.hxx +++ /dev/null @@ -1,178 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include -#include - -#define FONT_SIZE_X 8 -#define FONT_SIZE_Y 8 -#define FONT_NOF_CHARS 128 - -inline const Kernel::UInt8 cFontBitmap[FONT_NOF_CHARS][FONT_SIZE_X] = { - {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 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0003 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0004 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0005 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0006 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0007 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0008 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0009 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000A - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000B - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000C - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000D - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000E - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000F - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0010 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0011 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0012 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0013 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0014 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0015 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0016 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0017 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0018 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0019 - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001A - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001B - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001C - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001D - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001E - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001F - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0020 (space) - {0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x18, 0x00}, // U+0021 (!) - {0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0022 (") - {0x36, 0x36, 0x7F, 0x36, 0x7F, 0x36, 0x36, 0x00}, // U+0023 (#) - {0x0C, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x0C, 0x00}, // U+0024 ($) - {0x00, 0x63, 0x33, 0x18, 0x0C, 0x66, 0x63, 0x00}, // U+0025 (%) - {0x1C, 0x36, 0x1C, 0x6E, 0x3B, 0x33, 0x6E, 0x00}, // U+0026 (&) - {0x06, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0027 (') - {0x18, 0x0C, 0x06, 0x06, 0x06, 0x0C, 0x18, 0x00}, // U+0028 (() - {0x06, 0x0C, 0x18, 0x18, 0x18, 0x0C, 0x06, 0x00}, // U+0029 ()) - {0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00}, // U+002A (*) - {0x00, 0x0C, 0x0C, 0x3F, 0x0C, 0x0C, 0x00, 0x00}, // U+002B (+) - {0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+002C (,) - {0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00}, // U+002D (-) - {0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+002E (.) - {0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00}, // U+002F (/) - {0x3E, 0x63, 0x73, 0x7B, 0x6F, 0x67, 0x3E, 0x00}, // U+0030 (0) - {0x0C, 0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x3F, 0x00}, // U+0031 (1) - {0x1E, 0x33, 0x30, 0x1C, 0x06, 0x33, 0x3F, 0x00}, // U+0032 (2) - {0x1E, 0x33, 0x30, 0x1C, 0x30, 0x33, 0x1E, 0x00}, // U+0033 (3) - {0x38, 0x3C, 0x36, 0x33, 0x7F, 0x30, 0x78, 0x00}, // U+0034 (4) - {0x3F, 0x03, 0x1F, 0x30, 0x30, 0x33, 0x1E, 0x00}, // U+0035 (5) - {0x1C, 0x06, 0x03, 0x1F, 0x33, 0x33, 0x1E, 0x00}, // U+0036 (6) - {0x3F, 0x33, 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x00}, // U+0037 (7) - {0x1E, 0x33, 0x33, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+0038 (8) - {0x1E, 0x33, 0x33, 0x3E, 0x30, 0x18, 0x0E, 0x00}, // U+0039 (9) - {0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+003A (:) - {0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+003B (;) - {0x18, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x18, 0x00}, // U+003C (<) - {0x00, 0x00, 0x3F, 0x00, 0x00, 0x3F, 0x00, 0x00}, // U+003D (=) - {0x06, 0x0C, 0x18, 0x30, 0x18, 0x0C, 0x06, 0x00}, // U+003E (>) - {0x1E, 0x33, 0x30, 0x18, 0x0C, 0x00, 0x0C, 0x00}, // U+003F (?) - {0x3E, 0x63, 0x7B, 0x7B, 0x7B, 0x03, 0x1E, 0x00}, // U+0040 (@) - {0x0C, 0x1E, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x00}, // U+0041 (A) - {0x3F, 0x66, 0x66, 0x3E, 0x66, 0x66, 0x3F, 0x00}, // U+0042 (B) - {0x3C, 0x66, 0x03, 0x03, 0x03, 0x66, 0x3C, 0x00}, // U+0043 (C) - {0x1F, 0x36, 0x66, 0x66, 0x66, 0x36, 0x1F, 0x00}, // U+0044 (D) - {0x7F, 0x46, 0x16, 0x1E, 0x16, 0x46, 0x7F, 0x00}, // U+0045 (E) - {0x7F, 0x46, 0x16, 0x1E, 0x16, 0x06, 0x0F, 0x00}, // U+0046 (F) - {0x3C, 0x66, 0x03, 0x03, 0x73, 0x66, 0x7C, 0x00}, // U+0047 (G) - {0x33, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x33, 0x00}, // U+0048 (H) - {0x1E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0049 (I) - {0x78, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E, 0x00}, // U+004A (J) - {0x67, 0x66, 0x36, 0x1E, 0x36, 0x66, 0x67, 0x00}, // U+004B (K) - {0x0F, 0x06, 0x06, 0x06, 0x46, 0x66, 0x7F, 0x00}, // U+004C (L) - {0x63, 0x77, 0x7F, 0x7F, 0x6B, 0x63, 0x63, 0x00}, // U+004D (M) - {0x63, 0x67, 0x6F, 0x7B, 0x73, 0x63, 0x63, 0x00}, // U+004E (N) - {0x1C, 0x36, 0x63, 0x63, 0x63, 0x36, 0x1C, 0x00}, // U+004F (O) - {0x3F, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x0F, 0x00}, // U+0050 (P) - {0x1E, 0x33, 0x33, 0x33, 0x3B, 0x1E, 0x38, 0x00}, // U+0051 (Q) - {0x3F, 0x66, 0x66, 0x3E, 0x36, 0x66, 0x67, 0x00}, // U+0052 (R) - {0x1E, 0x33, 0x07, 0x0E, 0x38, 0x33, 0x1E, 0x00}, // U+0053 (S) - {0x3F, 0x2D, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0054 (T) - {0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x00}, // U+0055 (U) - {0x33, 0x33, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0056 (V) - {0x63, 0x63, 0x63, 0x6B, 0x7F, 0x77, 0x63, 0x00}, // U+0057 (W) - {0x63, 0x63, 0x36, 0x1C, 0x1C, 0x36, 0x63, 0x00}, // U+0058 (X) - {0x33, 0x33, 0x33, 0x1E, 0x0C, 0x0C, 0x1E, 0x00}, // U+0059 (Y) - {0x7F, 0x63, 0x31, 0x18, 0x4C, 0x66, 0x7F, 0x00}, // U+005A (Z) - {0x1E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x1E, 0x00}, // U+005B ([) - {0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40, 0x00}, // U+005C (\) - {0x1E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1E, 0x00}, // U+005D (]) - {0x08, 0x1C, 0x36, 0x63, 0x00, 0x00, 0x00, 0x00}, // U+005E (^) - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF}, // U+005F (_) - {0x0C, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0060 (`) - {0x00, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x6E, 0x00}, // U+0061 (a) - {0x07, 0x06, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00}, // U+0062 (b) - {0x00, 0x00, 0x1E, 0x33, 0x03, 0x33, 0x1E, 0x00}, // U+0063 (c) - {0x38, 0x30, 0x30, 0x3e, 0x33, 0x33, 0x6E, 0x00}, // U+0064 (d) - {0x00, 0x00, 0x1E, 0x33, 0x3f, 0x03, 0x1E, 0x00}, // U+0065 (e) - {0x1C, 0x36, 0x06, 0x0f, 0x06, 0x06, 0x0F, 0x00}, // U+0066 (f) - {0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0067 (g) - {0x07, 0x06, 0x36, 0x6E, 0x66, 0x66, 0x67, 0x00}, // U+0068 (h) - {0x0C, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0069 (i) - {0x30, 0x00, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E}, // U+006A (j) - {0x07, 0x06, 0x66, 0x36, 0x1E, 0x36, 0x67, 0x00}, // U+006B (k) - {0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+006C (l) - {0x00, 0x00, 0x33, 0x7F, 0x7F, 0x6B, 0x63, 0x00}, // U+006D (m) - {0x00, 0x00, 0x1F, 0x33, 0x33, 0x33, 0x33, 0x00}, // U+006E (n) - {0x00, 0x00, 0x1E, 0x33, 0x33, 0x33, 0x1E, 0x00}, // U+006F (o) - {0x00, 0x00, 0x3B, 0x66, 0x66, 0x3E, 0x06, 0x0F}, // U+0070 (p) - {0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x78}, // U+0071 (q) - {0x00, 0x00, 0x3B, 0x6E, 0x66, 0x06, 0x0F, 0x00}, // U+0072 (r) - {0x00, 0x00, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x00}, // U+0073 (s) - {0x08, 0x0C, 0x3E, 0x0C, 0x0C, 0x2C, 0x18, 0x00}, // U+0074 (t) - {0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x6E, 0x00}, // U+0075 (u) - {0x00, 0x00, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0076 (v) - {0x00, 0x00, 0x63, 0x6B, 0x7F, 0x7F, 0x36, 0x00}, // U+0077 (w) - {0x00, 0x00, 0x63, 0x36, 0x1C, 0x36, 0x63, 0x00}, // U+0078 (x) - {0x00, 0x00, 0x33, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0079 (y) - {0x00, 0x00, 0x3F, 0x19, 0x0C, 0x26, 0x3F, 0x00}, // U+007A (z) - {0x38, 0x0C, 0x0C, 0x07, 0x0C, 0x0C, 0x38, 0x00}, // U+007B ({) - {0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, // U+007C (|) - {0x07, 0x0C, 0x0C, 0x38, 0x0C, 0x0C, 0x07, 0x00}, // U+007D (}) - {0x6E, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+007E (~) - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // U+007F - -}; - -inline Kernel::Void CGRenderStringFromBitMap(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) -{ - Kernel::Int32 x, y; - Kernel::Int32 set; - - x = 0; - y = 0; - set = 0; - - for (; y < y_sz; ++y) - { - for (x = 0; x < x_sz; ++x) - { - set = bitmap[x] & (1 << y); - - if (set) - { - CGDrawInRegion(color, 1, 1, ((x_dst) + x), ((y_dst) + y)); - } - } - } -} - -inline Kernel::Void CGDrawString(const Kernel::Char* text, Kernel::Int32 x_dst, Kernel::Int32 y_dst, Kernel::Int32 color) -{ - for (Kernel::SizeT i = 0; text[i] != 0; ++i) - { - CGRenderStringFromBitMap(&cFontBitmap[text[i]][0], FONT_SIZE_X, FONT_SIZE_Y, x_dst, y_dst, color); - y_dst += FONT_SIZE_Y; - } -} diff --git a/dev/zka/Modules/FB/FB.hxx b/dev/zka/Modules/FB/FB.hxx new file mode 100644 index 00000000..a98eeafe --- /dev/null +++ b/dev/zka/Modules/FB/FB.hxx @@ -0,0 +1,154 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once + +#include + +#define CGInit() Kernel::SizeT __CG_CURSOR = 0 + +#define CGColor(R, G, B) RGB(R, G, B) + +#define cCGClearClr CGColor(0x0, 0x0, 0x0) + +#define CGFini() __CG_CURSOR = 0 + +/// @brief Performs OR drawing on the framebuffer. +#define CGDrawBitMapInRegionA(_BitMp, _Height, _Width, _BaseX, _BaseY) \ + __CG_CURSOR = 0; \ + \ + for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \ + { \ + for (Kernel::SizeT u = _BaseY; u < (_Width + _BaseY); ++u) \ + { \ + *(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + i + \ + 4 * u))) |= (_BitMp)[__CG_CURSOR]; \ + \ + ++__CG_CURSOR; \ + } \ + } + +/// @brief Draws a resource. +#define CGDrawBitMapInRegion(_BitMp, _Height, _Width, _BaseX, _BaseY) \ + __CG_CURSOR = 0; \ + \ + for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \ + { \ + for (Kernel::SizeT u = _BaseY; u < (_Width + _BaseY); ++u) \ + { \ + *(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + i + \ + 4 * u))) = (_BitMp)[__CG_CURSOR]; \ + \ + ++__CG_CURSOR; \ + } \ + } + +#define CGDrawBitMapInRegionToRgn(_Rgn, _BitMp, _Height, _Width, _BaseX, _BaseY) \ + __CG_CURSOR = 0; \ + \ + for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \ + { \ + for (Kernel::SizeT u = _BaseY; u < (_Width + _BaseY); ++u) \ + { \ + *(((Kernel::UInt32*)(_Rgn + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + i + \ + 4 * u))) = (_BitMp)[__CG_CURSOR]; \ + \ + ++__CG_CURSOR; \ + } \ + } + +/// @brief Cleans a resource. +#define CGClearRegion(_Height, _Width, _BaseX, _BaseY) \ + \ + for (Kernel::SizeT i = _BaseX; i < _Height + _BaseX; ++i) \ + { \ + for (Kernel::SizeT u = _BaseY; u < _Width + _BaseY; ++u) \ + { \ + *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + i + \ + 4 * u))) = cCGClearClr; \ + } \ + } + +/// @brief Draws inside a zone. +#define CGDrawInRegion(_Clr, _Height, _Width, _BaseX, _BaseY) \ + \ + for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \ + { \ + for (Kernel::SizeT y_base = _BaseY; y_base < (_Height + _BaseY); ++y_base) \ + { \ + *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + x_base + \ + 4 * y_base))) = _Clr; \ + } \ + } + +/// @brief Draws inside a zone. +#define CGDrawInRegionToRgn(_Rgn, _Clr, _Height, _Width, _BaseX, _BaseY) \ + __CG_CURSOR = 0; \ + \ + for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \ + { \ + for (Kernel::SizeT y_base = _BaseY; y_base < (_Height + _BaseY); ++y_base) \ + { \ + *(((volatile Kernel::UInt32*)(_Rgn + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + x_base + \ + 4 * y_base))) = _Clr[__CG_CURSOR]; \ + ++__CG_CURSOR; \ + } \ + } + +#define CGDrawInRegionToVideoRgn(_VideoRgn, _Clr, _Height, _Width, _BaseX, _BaseY) \ + __CG_CURSOR = 0; \ + \ + for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \ + { \ + for (Kernel::SizeT y_base = _BaseY; y_base < (_Height + _BaseY); ++y_base) \ + { \ + *(((volatile Kernel::UInt32*)(_VideoRgn + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + x_base + \ + 4 * y_base))) = _Clr; \ + ++__CG_CURSOR; \ + } \ + } + +#define CGDrawInRegionToVideoRgnA(_VideoRgn, _Clr, _Height, _Width, _BaseX, _BaseY) \ + __CG_CURSOR = 0; \ + \ + for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \ + { \ + for (Kernel::SizeT y_base = _BaseY; y_base < (_Height + _BaseY); ++y_base) \ + { \ + *(((volatile Kernel::UInt32*)(_VideoRgn + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + x_base + \ + 4 * y_base))) |= _Clr; \ + ++__CG_CURSOR; \ + } \ + } + +#define CGDrawInRegionA(_Clr, _Height, _Width, _BaseX, _BaseY) \ + \ + for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \ + { \ + for (Kernel::SizeT y_base = _BaseY; y_base < (_Height + _BaseY); ++y_base) \ + { \ + *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ + x_base + \ + 4 * y_base))) |= _Clr; \ + } \ + } diff --git a/dev/zka/Modules/FB/Text.hxx b/dev/zka/Modules/FB/Text.hxx new file mode 100644 index 00000000..c225d222 --- /dev/null +++ b/dev/zka/Modules/FB/Text.hxx @@ -0,0 +1,178 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once + +#include +#include + +#define FONT_SIZE_X 8 +#define FONT_SIZE_Y 8 +#define FONT_NOF_CHARS 128 + +inline const Kernel::UInt8 cFontBitmap[FONT_NOF_CHARS][FONT_SIZE_X] = { + {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 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0003 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0004 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0005 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0006 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0007 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0008 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0009 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000A + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000B + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000C + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000D + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000E + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000F + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0010 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0011 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0012 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0013 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0014 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0015 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0016 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0017 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0018 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0019 + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001A + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001B + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001C + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001D + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001E + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001F + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0020 (space) + {0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x18, 0x00}, // U+0021 (!) + {0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0022 (") + {0x36, 0x36, 0x7F, 0x36, 0x7F, 0x36, 0x36, 0x00}, // U+0023 (#) + {0x0C, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x0C, 0x00}, // U+0024 ($) + {0x00, 0x63, 0x33, 0x18, 0x0C, 0x66, 0x63, 0x00}, // U+0025 (%) + {0x1C, 0x36, 0x1C, 0x6E, 0x3B, 0x33, 0x6E, 0x00}, // U+0026 (&) + {0x06, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0027 (') + {0x18, 0x0C, 0x06, 0x06, 0x06, 0x0C, 0x18, 0x00}, // U+0028 (() + {0x06, 0x0C, 0x18, 0x18, 0x18, 0x0C, 0x06, 0x00}, // U+0029 ()) + {0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00}, // U+002A (*) + {0x00, 0x0C, 0x0C, 0x3F, 0x0C, 0x0C, 0x00, 0x00}, // U+002B (+) + {0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+002C (,) + {0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00}, // U+002D (-) + {0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+002E (.) + {0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00}, // U+002F (/) + {0x3E, 0x63, 0x73, 0x7B, 0x6F, 0x67, 0x3E, 0x00}, // U+0030 (0) + {0x0C, 0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x3F, 0x00}, // U+0031 (1) + {0x1E, 0x33, 0x30, 0x1C, 0x06, 0x33, 0x3F, 0x00}, // U+0032 (2) + {0x1E, 0x33, 0x30, 0x1C, 0x30, 0x33, 0x1E, 0x00}, // U+0033 (3) + {0x38, 0x3C, 0x36, 0x33, 0x7F, 0x30, 0x78, 0x00}, // U+0034 (4) + {0x3F, 0x03, 0x1F, 0x30, 0x30, 0x33, 0x1E, 0x00}, // U+0035 (5) + {0x1C, 0x06, 0x03, 0x1F, 0x33, 0x33, 0x1E, 0x00}, // U+0036 (6) + {0x3F, 0x33, 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x00}, // U+0037 (7) + {0x1E, 0x33, 0x33, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+0038 (8) + {0x1E, 0x33, 0x33, 0x3E, 0x30, 0x18, 0x0E, 0x00}, // U+0039 (9) + {0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+003A (:) + {0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+003B (;) + {0x18, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x18, 0x00}, // U+003C (<) + {0x00, 0x00, 0x3F, 0x00, 0x00, 0x3F, 0x00, 0x00}, // U+003D (=) + {0x06, 0x0C, 0x18, 0x30, 0x18, 0x0C, 0x06, 0x00}, // U+003E (>) + {0x1E, 0x33, 0x30, 0x18, 0x0C, 0x00, 0x0C, 0x00}, // U+003F (?) + {0x3E, 0x63, 0x7B, 0x7B, 0x7B, 0x03, 0x1E, 0x00}, // U+0040 (@) + {0x0C, 0x1E, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x00}, // U+0041 (A) + {0x3F, 0x66, 0x66, 0x3E, 0x66, 0x66, 0x3F, 0x00}, // U+0042 (B) + {0x3C, 0x66, 0x03, 0x03, 0x03, 0x66, 0x3C, 0x00}, // U+0043 (C) + {0x1F, 0x36, 0x66, 0x66, 0x66, 0x36, 0x1F, 0x00}, // U+0044 (D) + {0x7F, 0x46, 0x16, 0x1E, 0x16, 0x46, 0x7F, 0x00}, // U+0045 (E) + {0x7F, 0x46, 0x16, 0x1E, 0x16, 0x06, 0x0F, 0x00}, // U+0046 (F) + {0x3C, 0x66, 0x03, 0x03, 0x73, 0x66, 0x7C, 0x00}, // U+0047 (G) + {0x33, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x33, 0x00}, // U+0048 (H) + {0x1E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0049 (I) + {0x78, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E, 0x00}, // U+004A (J) + {0x67, 0x66, 0x36, 0x1E, 0x36, 0x66, 0x67, 0x00}, // U+004B (K) + {0x0F, 0x06, 0x06, 0x06, 0x46, 0x66, 0x7F, 0x00}, // U+004C (L) + {0x63, 0x77, 0x7F, 0x7F, 0x6B, 0x63, 0x63, 0x00}, // U+004D (M) + {0x63, 0x67, 0x6F, 0x7B, 0x73, 0x63, 0x63, 0x00}, // U+004E (N) + {0x1C, 0x36, 0x63, 0x63, 0x63, 0x36, 0x1C, 0x00}, // U+004F (O) + {0x3F, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x0F, 0x00}, // U+0050 (P) + {0x1E, 0x33, 0x33, 0x33, 0x3B, 0x1E, 0x38, 0x00}, // U+0051 (Q) + {0x3F, 0x66, 0x66, 0x3E, 0x36, 0x66, 0x67, 0x00}, // U+0052 (R) + {0x1E, 0x33, 0x07, 0x0E, 0x38, 0x33, 0x1E, 0x00}, // U+0053 (S) + {0x3F, 0x2D, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0054 (T) + {0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x00}, // U+0055 (U) + {0x33, 0x33, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0056 (V) + {0x63, 0x63, 0x63, 0x6B, 0x7F, 0x77, 0x63, 0x00}, // U+0057 (W) + {0x63, 0x63, 0x36, 0x1C, 0x1C, 0x36, 0x63, 0x00}, // U+0058 (X) + {0x33, 0x33, 0x33, 0x1E, 0x0C, 0x0C, 0x1E, 0x00}, // U+0059 (Y) + {0x7F, 0x63, 0x31, 0x18, 0x4C, 0x66, 0x7F, 0x00}, // U+005A (Z) + {0x1E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x1E, 0x00}, // U+005B ([) + {0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40, 0x00}, // U+005C (\) + {0x1E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1E, 0x00}, // U+005D (]) + {0x08, 0x1C, 0x36, 0x63, 0x00, 0x00, 0x00, 0x00}, // U+005E (^) + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF}, // U+005F (_) + {0x0C, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0060 (`) + {0x00, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x6E, 0x00}, // U+0061 (a) + {0x07, 0x06, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00}, // U+0062 (b) + {0x00, 0x00, 0x1E, 0x33, 0x03, 0x33, 0x1E, 0x00}, // U+0063 (c) + {0x38, 0x30, 0x30, 0x3e, 0x33, 0x33, 0x6E, 0x00}, // U+0064 (d) + {0x00, 0x00, 0x1E, 0x33, 0x3f, 0x03, 0x1E, 0x00}, // U+0065 (e) + {0x1C, 0x36, 0x06, 0x0f, 0x06, 0x06, 0x0F, 0x00}, // U+0066 (f) + {0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0067 (g) + {0x07, 0x06, 0x36, 0x6E, 0x66, 0x66, 0x67, 0x00}, // U+0068 (h) + {0x0C, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0069 (i) + {0x30, 0x00, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E}, // U+006A (j) + {0x07, 0x06, 0x66, 0x36, 0x1E, 0x36, 0x67, 0x00}, // U+006B (k) + {0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+006C (l) + {0x00, 0x00, 0x33, 0x7F, 0x7F, 0x6B, 0x63, 0x00}, // U+006D (m) + {0x00, 0x00, 0x1F, 0x33, 0x33, 0x33, 0x33, 0x00}, // U+006E (n) + {0x00, 0x00, 0x1E, 0x33, 0x33, 0x33, 0x1E, 0x00}, // U+006F (o) + {0x00, 0x00, 0x3B, 0x66, 0x66, 0x3E, 0x06, 0x0F}, // U+0070 (p) + {0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x78}, // U+0071 (q) + {0x00, 0x00, 0x3B, 0x6E, 0x66, 0x06, 0x0F, 0x00}, // U+0072 (r) + {0x00, 0x00, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x00}, // U+0073 (s) + {0x08, 0x0C, 0x3E, 0x0C, 0x0C, 0x2C, 0x18, 0x00}, // U+0074 (t) + {0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x6E, 0x00}, // U+0075 (u) + {0x00, 0x00, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0076 (v) + {0x00, 0x00, 0x63, 0x6B, 0x7F, 0x7F, 0x36, 0x00}, // U+0077 (w) + {0x00, 0x00, 0x63, 0x36, 0x1C, 0x36, 0x63, 0x00}, // U+0078 (x) + {0x00, 0x00, 0x33, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0079 (y) + {0x00, 0x00, 0x3F, 0x19, 0x0C, 0x26, 0x3F, 0x00}, // U+007A (z) + {0x38, 0x0C, 0x0C, 0x07, 0x0C, 0x0C, 0x38, 0x00}, // U+007B ({) + {0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, // U+007C (|) + {0x07, 0x0C, 0x0C, 0x38, 0x0C, 0x0C, 0x07, 0x00}, // U+007D (}) + {0x6E, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+007E (~) + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // U+007F + +}; + +inline Kernel::Void CGRenderStringFromBitMap(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) +{ + Kernel::Int32 x, y; + Kernel::Int32 set; + + x = 0; + y = 0; + set = 0; + + for (; y < y_sz; ++y) + { + for (x = 0; x < x_sz; ++x) + { + set = bitmap[x] & (1 << y); + + if (set) + { + CGDrawInRegion(color, 1, 1, ((x_dst) + x), ((y_dst) + y)); + } + } + } +} + +inline Kernel::Void CGDrawString(const Kernel::Char* text, Kernel::Int32 x_dst, Kernel::Int32 y_dst, Kernel::Int32 color) +{ + for (Kernel::SizeT i = 0; text[i] != 0; ++i) + { + CGRenderStringFromBitMap(&cFontBitmap[text[i]][0], FONT_SIZE_X, FONT_SIZE_Y, x_dst, y_dst, color); + y_dst += FONT_SIZE_Y; + } +} diff --git a/dev/zka/Modules/ReadMe.md b/dev/zka/Modules/ReadMe.md index 329f67ce..4dd0489f 100644 --- a/dev/zka/Modules/ReadMe.md +++ b/dev/zka/Modules/ReadMe.md @@ -6,7 +6,7 @@ Pluggable modules for builtin hardware support within the Kernel. ACPI: Amlal EL Mahrouss. AHCI: Amlal EL Mahrouss. -CoreCG: Amlal EL Mahrouss. +FB: Amlal EL Mahrouss. PS2: Amlal EL Mahrouss. ATA: Amlal EL Mahrouss. MBCI: Amlal El Mahrouss. diff --git a/dev/zka/NewKit/KernelCheck.hxx b/dev/zka/NewKit/KernelCheck.hxx deleted file mode 100644 index a9d1a452..00000000 --- a/dev/zka/NewKit/KernelCheck.hxx +++ /dev/null @@ -1,71 +0,0 @@ - -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include - -namespace Kernel -{ - void ke_runtime_check(bool bExpression, const Char* file, const Char* line); -} - -#define MUST_PASS_COMPILER(EXPR, MSG) static_assert(EXPR, MSG) - -#define __MUST_PASS(EXPR, FILE, LINE) \ - Kernel::ke_runtime_check(EXPR, FILE, STRINGIFY(LINE)) - -#ifdef __DEBUG__ -#define MUST_PASS(EXPR) __MUST_PASS((EXPR), __FILE__, __LINE__) -#define assert(EXPR) MUST_PASS(EXPR, RUNTIME_CHECK_EXPRESSION) -#else -#define MUST_PASS(EXPR) (Kernel::Void)(EXPR) -#define assert(EXPR) (Kernel::Void)(EXPR) -#endif - -enum RUNTIME_CHECK -{ - RUNTIME_CHECK_FAILED = -1, - RUNTIME_CHECK_POINTER = 0, - RUNTIME_CHECK_EXPRESSION, - RUNTIME_CHECK_FILE, - RUNTIME_CHECK_IPC, - RUNTIME_CHECK_TLS, - RUNTIME_CHECK_HANDSHAKE, - RUNTIME_CHECK_ACPI, - RUNTIME_CHECK_INVALID_PRIVILEGE, - RUNTIME_CHECK_PROCESS, - RUNTIME_CHECK_BAD_BEHAVIOR, - RUNTIME_CHECK_BOOTSTRAP, - RUNTIME_CHECK_UNEXCPECTED, - RUNTIME_CHECK_FILESYSTEM, - RUNTIME_CHECK_VIRTUAL_OUT_OF_MEM, - RUNTIME_CHECK_PAGE, - RUNTIME_CHECK_COUNT, -}; - -namespace Kernel -{ - /// @brief Dumping factory class. - class RecoveryFactory final - { - public: - STATIC Void Recover() noexcept; - }; - - void ke_stop(const Int& id); -} // namespace Kernel - -#ifdef TRY -#undef TRY -#endif - -#define TRY(FN) \ - if (!FN()) \ - { \ - MUST_PASS(false); \ - } diff --git a/dev/zka/NewKit/NewKit.hxx b/dev/zka/NewKit/NewKit.hxx index 1daa6af2..0d0ca8d2 100644 --- a/dev/zka/NewKit/NewKit.hxx +++ b/dev/zka/NewKit/NewKit.hxx @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/dev/zka/NewKit/OwnPtr.hxx b/dev/zka/NewKit/OwnPtr.hxx index 6e42b33f..756fae97 100644 --- a/dev/zka/NewKit/OwnPtr.hxx +++ b/dev/zka/NewKit/OwnPtr.hxx @@ -8,7 +8,7 @@ #pragma once #include -#include +#include #include namespace Kernel diff --git a/dev/zka/NewKit/Ref.hxx b/dev/zka/NewKit/Ref.hxx index 5a2bf091..31941d50 100644 --- a/dev/zka/NewKit/Ref.hxx +++ b/dev/zka/NewKit/Ref.hxx @@ -9,7 +9,7 @@ #define _NEWKIT_REF_HPP_ #include -#include +#include #include namespace Kernel @@ -22,7 +22,7 @@ namespace Kernel ~Ref() = default; public: - Ref(T cls, const bool& strong = false) + Ref(T cls, const Bool& strong = false) : fClass(&cls), fStrong(strong) { } diff --git a/dev/zka/NewKit/Stop.hxx b/dev/zka/NewKit/Stop.hxx new file mode 100644 index 00000000..a9d1a452 --- /dev/null +++ b/dev/zka/NewKit/Stop.hxx @@ -0,0 +1,71 @@ + +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once + +#include + +namespace Kernel +{ + void ke_runtime_check(bool bExpression, const Char* file, const Char* line); +} + +#define MUST_PASS_COMPILER(EXPR, MSG) static_assert(EXPR, MSG) + +#define __MUST_PASS(EXPR, FILE, LINE) \ + Kernel::ke_runtime_check(EXPR, FILE, STRINGIFY(LINE)) + +#ifdef __DEBUG__ +#define MUST_PASS(EXPR) __MUST_PASS((EXPR), __FILE__, __LINE__) +#define assert(EXPR) MUST_PASS(EXPR, RUNTIME_CHECK_EXPRESSION) +#else +#define MUST_PASS(EXPR) (Kernel::Void)(EXPR) +#define assert(EXPR) (Kernel::Void)(EXPR) +#endif + +enum RUNTIME_CHECK +{ + RUNTIME_CHECK_FAILED = -1, + RUNTIME_CHECK_POINTER = 0, + RUNTIME_CHECK_EXPRESSION, + RUNTIME_CHECK_FILE, + RUNTIME_CHECK_IPC, + RUNTIME_CHECK_TLS, + RUNTIME_CHECK_HANDSHAKE, + RUNTIME_CHECK_ACPI, + RUNTIME_CHECK_INVALID_PRIVILEGE, + RUNTIME_CHECK_PROCESS, + RUNTIME_CHECK_BAD_BEHAVIOR, + RUNTIME_CHECK_BOOTSTRAP, + RUNTIME_CHECK_UNEXCPECTED, + RUNTIME_CHECK_FILESYSTEM, + RUNTIME_CHECK_VIRTUAL_OUT_OF_MEM, + RUNTIME_CHECK_PAGE, + RUNTIME_CHECK_COUNT, +}; + +namespace Kernel +{ + /// @brief Dumping factory class. + class RecoveryFactory final + { + public: + STATIC Void Recover() noexcept; + }; + + void ke_stop(const Int& id); +} // namespace Kernel + +#ifdef TRY +#undef TRY +#endif + +#define TRY(FN) \ + if (!FN()) \ + { \ + MUST_PASS(false); \ + } diff --git a/dev/zka/NewKit/String.hxx b/dev/zka/NewKit/String.hxx index 1849bc77..762efc44 100644 --- a/dev/zka/NewKit/String.hxx +++ b/dev/zka/NewKit/String.hxx @@ -9,7 +9,7 @@ #include #include #include -#include +#include namespace Kernel { diff --git a/dev/zka/src/FS/NeFS.cxx b/dev/zka/src/FS/NeFS.cxx index 69b0c401..61a18ae2 100644 --- a/dev/zka/src/FS/NeFS.cxx +++ b/dev/zka/src/FS/NeFS.cxx @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/dev/zka/src/IPEFDLLObject.cxx b/dev/zka/src/IPEFDLLObject.cxx index a8505eb3..22645dde 100644 --- a/dev/zka/src/IPEFDLLObject.cxx +++ b/dev/zka/src/IPEFDLLObject.cxx @@ -18,7 +18,7 @@ Revision History: - 01/02/24: Rework shared sharedObj ABI, except a rtl_init_dll and + 01/02/24: Rework shared dll_obj ABI, except a rtl_init_dll and rtl_fini_dll (amlel) 15/02/24: Breaking changes, changed the name of the routines. (amlel) @@ -39,62 +39,62 @@ using namespace Kernel; EXTERN_C IDLL rtl_init_dll(UserProcess* header) { - IDLL sharedObj = tls_new_class(); + IDLL dll_obj = tls_new_class(); - if (!sharedObj) + if (!dll_obj) { header->Crash(); return nullptr; } - sharedObj->Mount(tls_new_class()); + dll_obj->Mount(tls_new_class()); - if (!sharedObj->Get()) + if (!dll_obj->Get()) { header->Crash(); return nullptr; } - sharedObj->Get()->fImageObject = + dll_obj->Get()->fImageObject = header->Image; - if (!sharedObj->Get()->fImageObject) + if (!dll_obj->Get()->fImageObject) { header->Crash(); return nullptr; } - sharedObj->Get()->fImageEntrypointOffset = - sharedObj->Load(kPefStart, rt_string_len(kPefStart, 0), kPefCode); + dll_obj->Get()->fImageEntrypointOffset = + dll_obj->Load(kPefStart, rt_string_len(kPefStart, 0), kPefCode); - return sharedObj; + return dll_obj; } /***********************************************************************************/ -/** @brief Frees the sharedObj. */ -/** @note Please check if the lib got freed! */ -/** @param lib The sharedObj to free. */ +/** @brief Frees the dll_obj. */ +/** @note Please check if the dll_obj got freed! */ +/** @param dll_obj The dll_obj to free. */ /** @param successful Reports if successful or not. */ /***********************************************************************************/ -EXTERN_C Void rtl_fini_dll(UserProcess* header, IDLL lib, Bool* successful) +EXTERN_C Void rtl_fini_dll(UserProcess* header, IDLL dll_obj, Bool* successful) { MUST_PASS(successful); // sanity check (will also trigger a bug check if this fails) - if (lib == nullptr) + if (dll_obj == nullptr) { *successful = false; header->Crash(); } - delete lib->Get(); - delete lib; + delete dll_obj->Get(); + delete dll_obj; - lib = nullptr; + dll_obj = nullptr; *successful = true; } diff --git a/dev/zka/src/KernelCheck.cxx b/dev/zka/src/KernelCheck.cxx deleted file mode 100644 index 49ca5edf..00000000 --- a/dev/zka/src/KernelCheck.cxx +++ /dev/null @@ -1,155 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#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) -#define MoveMem(dst, src, sz) Kernel::rt_copy_memory((Kernel::VoidPtr)src, (Kernel::VoidPtr)dst, sz) - -#define cWebsiteMacro "https://help.el-mahrouss-logic.com/" - -/* Each error code is attributed with an ID, which will prompt a string onto the - * screen. Wait for debugger... */ - -namespace Kernel -{ - void ke_stop(const Kernel::Int& id) - { - CGInit(); - - auto panicTxt = RGB(0xff, 0xff, 0xff); - - CG::CGFillBackground(); - - auto start_y = 10; - auto x = 10; - - CGDrawString("newoskrnl.exe Stopped working properly so it had to stop.", start_y, x, panicTxt); - start_y += 10; - - // simply offset from previous string and then write the website. - CGDrawString("Please visit: ", start_y, x, panicTxt); - CGDrawString(cWebsiteMacro, start_y, x + (FONT_SIZE_X * rt_string_len("Please visit: ")), panicTxt); - - CGFini(); - - start_y += 10; - - // show text according to error id. - - switch (id) - { - case RUNTIME_CHECK_PROCESS: { - CGDrawString("0x00000008 No more processes to run, this is because that ZKA ran out of processes.", start_y, x, panicTxt); - RecoveryFactory::Recover(); - break; - } - case RUNTIME_CHECK_ACPI: { - CGDrawString("0x00000006 ACPI configuration error.", start_y, x, panicTxt); - RecoveryFactory::Recover(); - break; - } - case RUNTIME_CHECK_PAGE: { - CGDrawString("0x0000000B Write/Read in non paged area.", start_y, x, panicTxt); - RecoveryFactory::Recover(); - } - case RUNTIME_CHECK_FILESYSTEM: { - CGDrawString("0x0000000A Filesystem error.", start_y, x, panicTxt); - - PowerFactoryInterface power(nullptr); - power.Shutdown(); - break; - } - case RUNTIME_CHECK_POINTER: { - CGDrawString("0x00000000 Heap error, the heap is corrupted.", start_y, x, panicTxt); - - PowerFactoryInterface power(nullptr); - power.Shutdown(); - break; - } - case RUNTIME_CHECK_BAD_BEHAVIOR: { - CGDrawString("0x00000009 CPU access error.", start_y, x, panicTxt); - - PowerFactoryInterface power(nullptr); - power.Shutdown(); - break; - } - case RUNTIME_CHECK_BOOTSTRAP: { - CGDrawString("0x0000000A Boot Processor finished executing.", start_y, x, panicTxt); - - PowerFactoryInterface power(nullptr); - power.Shutdown(); - break; - } - case RUNTIME_CHECK_HANDSHAKE: { - CGDrawString("0x00000005 Handshake fault.", start_y, x, panicTxt); - RecoveryFactory::Recover(); - break; - } - case RUNTIME_CHECK_IPC: { - CGDrawString("0x00000003 Bad IPC/XPCOM message.", start_y, x, panicTxt); - RecoveryFactory::Recover(); - break; - } - case RUNTIME_CHECK_INVALID_PRIVILEGE: { - CGDrawString("0x00000007 Privilege access violation.", start_y, x, panicTxt); - RecoveryFactory::Recover(); - break; - case RUNTIME_CHECK_UNEXCPECTED: { - CGDrawString("0x0000000B Kernel access violation.", start_y, x, panicTxt); - break; - } - case RUNTIME_CHECK_VIRTUAL_OUT_OF_MEM: { - CGDrawString("0x10000001 Out of virtual memory.", start_y, x, panicTxt); - RecoveryFactory::Recover(); - break; - } - case RUNTIME_CHECK_FAILED: { - CGDrawString("0x10000001 Kernel Bug check failed.", start_y, x, panicTxt); - RecoveryFactory::Recover(); - break; - } - default: { - RecoveryFactory::Recover(); - CGDrawString("0xFFFFFFFC Unknown Kernel error.", start_y, x, panicTxt); - break; - } - } - }; - - PowerFactoryInterface power(nullptr); - power.Reboot(); - } - - Void RecoveryFactory::Recover() noexcept - { - PowerFactoryInterface power(nullptr); - power.Reboot(); - } - - void ke_runtime_check(bool expr, const Char* file, const Char* line) - { - if (!expr) - { - kcout << "FAILED: FILE: " << file << endl; - kcout << "FAILED: LINE: " << line << endl; - - ke_stop(RUNTIME_CHECK_FAILED); // Runtime Check failed - } - } -} // namespace Kernel diff --git a/dev/zka/src/LPC.cxx b/dev/zka/src/LPC.cxx index 46f621bb..46814bbd 100644 --- a/dev/zka/src/LPC.cxx +++ b/dev/zka/src/LPC.cxx @@ -5,7 +5,7 @@ ------------------------------------------- */ #include -#include +#include namespace Kernel { diff --git a/dev/zka/src/LockDelegate.cxx b/dev/zka/src/LockDelegate.cxx index f23c46d3..74b819b0 100644 --- a/dev/zka/src/LockDelegate.cxx +++ b/dev/zka/src/LockDelegate.cxx @@ -8,5 +8,5 @@ namespace Kernel { - /// Leave it empty for now. -} // namespace Kernel \ No newline at end of file + /// @note Leave it empty for now. +} // namespace Kernel diff --git a/dev/zka/src/PEFCodeMgr.cxx b/dev/zka/src/PEFCodeMgr.cxx index 80bd9206..b1690abf 100644 --- a/dev/zka/src/PEFCodeMgr.cxx +++ b/dev/zka/src/PEFCodeMgr.cxx @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/dev/zka/src/Stop.cxx b/dev/zka/src/Stop.cxx new file mode 100644 index 00000000..9fdc982a --- /dev/null +++ b/dev/zka/src/Stop.cxx @@ -0,0 +1,148 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define cWebsiteMacro "https://help.el-mahrouss-logic.com/" + +/* Each error code is attributed with an ID, which will prompt a string onto the + * screen. Wait for debugger... */ + +namespace Kernel +{ + void ke_stop(const Kernel::Int& id) + { + CGInit(); + + auto panicTxt = RGB(0xff, 0xff, 0xff); + + auto start_y = 10; + auto x = 10; + + CGDrawString("newoskrnl.exe Stopped working properly so it had to stop.", start_y, x, panicTxt); + start_y += 10; + + // simply offset from previous string and then write the website. + CGDrawString("Please visit: ", start_y, x, panicTxt); + CGDrawString(cWebsiteMacro, start_y, x + (FONT_SIZE_X * rt_string_len("Please visit: ")), panicTxt); + + CGFini(); + + start_y += 10; + + // show text according to error id. + + switch (id) + { + case RUNTIME_CHECK_PROCESS: { + CGDrawString("0x00000008 No more processes to run, this is because that ZKA ran out of processes.", start_y, x, panicTxt); + RecoveryFactory::Recover(); + break; + } + case RUNTIME_CHECK_ACPI: { + CGDrawString("0x00000006 ACPI configuration error.", start_y, x, panicTxt); + RecoveryFactory::Recover(); + break; + } + case RUNTIME_CHECK_PAGE: { + CGDrawString("0x0000000B Write/Read in non paged area.", start_y, x, panicTxt); + RecoveryFactory::Recover(); + } + case RUNTIME_CHECK_FILESYSTEM: { + CGDrawString("0x0000000A Filesystem error.", start_y, x, panicTxt); + + PowerFactoryInterface power(nullptr); + power.Shutdown(); + break; + } + case RUNTIME_CHECK_POINTER: { + CGDrawString("0x00000000 Heap error, the heap is corrupted.", start_y, x, panicTxt); + + PowerFactoryInterface power(nullptr); + power.Shutdown(); + break; + } + case RUNTIME_CHECK_BAD_BEHAVIOR: { + CGDrawString("0x00000009 CPU access error.", start_y, x, panicTxt); + + PowerFactoryInterface power(nullptr); + power.Shutdown(); + break; + } + case RUNTIME_CHECK_BOOTSTRAP: { + CGDrawString("0x0000000A Boot Processor finished executing.", start_y, x, panicTxt); + + PowerFactoryInterface power(nullptr); + power.Shutdown(); + break; + } + case RUNTIME_CHECK_HANDSHAKE: { + CGDrawString("0x00000005 Handshake fault.", start_y, x, panicTxt); + RecoveryFactory::Recover(); + break; + } + case RUNTIME_CHECK_IPC: { + CGDrawString("0x00000003 Bad IPC/XPCOM message.", start_y, x, panicTxt); + RecoveryFactory::Recover(); + break; + } + case RUNTIME_CHECK_INVALID_PRIVILEGE: { + CGDrawString("0x00000007 Privilege access violation.", start_y, x, panicTxt); + RecoveryFactory::Recover(); + break; + case RUNTIME_CHECK_UNEXCPECTED: { + CGDrawString("0x0000000B Kernel access violation.", start_y, x, panicTxt); + break; + } + case RUNTIME_CHECK_VIRTUAL_OUT_OF_MEM: { + CGDrawString("0x10000001 Out of virtual memory.", start_y, x, panicTxt); + RecoveryFactory::Recover(); + break; + } + case RUNTIME_CHECK_FAILED: { + CGDrawString("0x10000001 Kernel Bug check failed.", start_y, x, panicTxt); + RecoveryFactory::Recover(); + break; + } + default: { + RecoveryFactory::Recover(); + CGDrawString("0xFFFFFFFC Unknown Kernel error.", start_y, x, panicTxt); + break; + } + } + }; + + PowerFactoryInterface power(nullptr); + power.Reboot(); + } + + Void RecoveryFactory::Recover() noexcept + { + PowerFactoryInterface power(nullptr); + power.Reboot(); + } + + void ke_runtime_check(bool expr, const Char* file, const Char* line) + { + if (!expr) + { + kcout << "FAILED: FILE: " << file << endl; + kcout << "FAILED: LINE: " << line << endl; + + ke_stop(RUNTIME_CHECK_FAILED); // Runtime Check failed + } + } +} // namespace Kernel diff --git a/dev/zka/src/User.cxx b/dev/zka/src/User.cxx index 066a3e06..1e4f9df9 100644 --- a/dev/zka/src/User.cxx +++ b/dev/zka/src/User.cxx @@ -10,9 +10,9 @@ * ======================================================== */ -#include #include -#include +#include +#include #include #include -- cgit v1.2.3