summaryrefslogtreecommitdiffhomepage
path: root/Private/Source
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-18 12:35:19 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-18 12:39:24 +0100
commit4c714f2c24c5df78bae2f35c42c73107de4c8c71 (patch)
treeb36d2498b8387909dac45c98097b8169636ad25a /Private/Source
parenta4bfc396a78ddd553de519ab927d8479d0c3c45d (diff)
unstable, unrelated: See below.
- :boom: Breaking changes in System.Core.dll - Framebuffer, moved operator bool into c++ source file. - Remove zlib in favor of our own Zip API. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/Source')
-rw-r--r--Private/Source/DriveManager.cxx2
-rw-r--r--Private/Source/FileManager.cxx6
-rw-r--r--Private/Source/Framebuffer.cxx11
-rw-r--r--Private/Source/NewFS+IO.cxx26
-rw-r--r--Private/Source/PEFSharedObjectRT.cxx4
5 files changed, 30 insertions, 19 deletions
diff --git a/Private/Source/DriveManager.cxx b/Private/Source/DriveManager.cxx
index 2a5ea394..00e1d94d 100644
--- a/Private/Source/DriveManager.cxx
+++ b/Private/Source/DriveManager.cxx
@@ -5,6 +5,6 @@
------------------------------------------- */
#include <KernelKit/DebugOutput.hpp>
-#include <KernelKit/DriveManager.hpp>
+#include <KernelKit/DriveManager.hxx>
namespace HCore {} // namespace HCore
diff --git a/Private/Source/FileManager.cxx b/Private/Source/FileManager.cxx
index 7a09e5cf..4d3c9417 100644
--- a/Private/Source/FileManager.cxx
+++ b/Private/Source/FileManager.cxx
@@ -32,11 +32,11 @@ FilesystemManagerInterface* FilesystemManagerInterface::Unmount() {
}
/// @brief Mount filesystem.
-/// @param pMount the filesystem to mount.
+/// @param mountPtr the filesystem to mount.
/// @return if it succeeded true, otherwise false.
-bool FilesystemManagerInterface::Mount(FilesystemManagerInterface* pMount) {
+bool FilesystemManagerInterface::Mount(FilesystemManagerInterface* mountPtr) {
if (kMounted == nullptr) {
- kMounted = pMount;
+ kMounted = mountPtr;
return true;
}
diff --git a/Private/Source/Framebuffer.cxx b/Private/Source/Framebuffer.cxx
index f31bd6dc..6ea2fa5b 100644
--- a/Private/Source/Framebuffer.cxx
+++ b/Private/Source/Framebuffer.cxx
@@ -31,6 +31,15 @@ volatile UIntPtr *Framebuffer::operator[](const UIntPtr &pos) {
return (UIntPtr *)(m_FrameBufferAddr->m_Base * pos);
}
+/// @brief Boolean operator.
+Framebuffer::operator bool() {
+ return m_FrameBufferAddr.Leak()->m_Base != 0 && m_Colour != FramebufferColorKind::INVALID &&
+ m_FrameBufferAddr.Leak()->m_Base != kBadPtr;
+}
+
+/// @brief Set color kind of framebuffer.
+/// @param colour
+/// @return
const FramebufferColorKind &Framebuffer::Color(
const FramebufferColorKind &colour) {
if (m_Colour != FramebufferColorKind::INVALID &&
@@ -41,6 +50,8 @@ const FramebufferColorKind &Framebuffer::Color(
return m_Colour;
}
+/// @brief Leak fraembuffer context.
+/// @return The reference of the framebuffer context.
Ref<FramebufferContext *> &Framebuffer::Leak() {
return this->m_FrameBufferAddr;
}
diff --git a/Private/Source/NewFS+IO.cxx b/Private/Source/NewFS+IO.cxx
index 7e5d4f50..9d03e3ae 100644
--- a/Private/Source/NewFS+IO.cxx
+++ b/Private/Source/NewFS+IO.cxx
@@ -4,7 +4,7 @@
------------------------------------------- */
-#include <KernelKit/DriveManager.hpp>
+#include <KernelKit/DriveManager.hxx>
#include <KernelKit/FileManager.hpp>
/** ---------------------------------------------------
@@ -33,54 +33,54 @@ enum {
kHCFSSubDriveCount,
};
-Int32 KeHCFSRead(Mountpoint* Mnt, DriveTraits& DrvTraits, Int32 DrvIndex) {
+Int32 ke_newfs_read(Mountpoint* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex) {
if (!Mnt) return -1;
switch (DrvIndex) {
case 0: {
- NEWFS_READ(A, DrvTraits, Mnt);
+ NEWFS_READ(A, DrvTrait, Mnt);
break;
}
case 1: {
- NEWFS_READ(B, DrvTraits, Mnt);
+ NEWFS_READ(B, DrvTrait, Mnt);
break;
}
case 2: {
- NEWFS_READ(C, DrvTraits, Mnt);
+ NEWFS_READ(C, DrvTrait, Mnt);
break;
}
case 3: {
- NEWFS_READ(D, DrvTraits, Mnt);
+ NEWFS_READ(D, DrvTrait, Mnt);
break;
}
}
- return DrvTraits.fPacket.fPacketGood;
+ return DrvTrait.fPacket.fPacketGood;
}
-Int32 KeHCFSWrite(Mountpoint* Mnt, DriveTraits& DrvTraits, Int32 DrvIndex) {
+Int32 ke_newfs_write(Mountpoint* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex) {
if (!Mnt) return -1;
switch (DrvIndex) {
case 0: {
- NEWFS_WRITE(A, DrvTraits, Mnt);
+ NEWFS_WRITE(A, DrvTrait, Mnt);
break;
}
case 1: {
- NEWFS_WRITE(B, DrvTraits, Mnt);
+ NEWFS_WRITE(B, DrvTrait, Mnt);
break;
}
case 2: {
- NEWFS_WRITE(C, DrvTraits, Mnt);
+ NEWFS_WRITE(C, DrvTrait, Mnt);
break;
}
case 3: {
- NEWFS_WRITE(D, DrvTraits, Mnt);
+ NEWFS_WRITE(D, DrvTrait, Mnt);
break;
}
}
- return DrvTraits.fPacket.fPacketGood;
+ return DrvTrait.fPacket.fPacketGood;
}
#endif // ifdef __FSKIT_NEWFS__
diff --git a/Private/Source/PEFSharedObjectRT.cxx b/Private/Source/PEFSharedObjectRT.cxx
index d404819f..06c5813c 100644
--- a/Private/Source/PEFSharedObjectRT.cxx
+++ b/Private/Source/PEFSharedObjectRT.cxx
@@ -18,7 +18,7 @@
Revision History:
- 01/02/24: Rework shared library ABI, except a __LibInit and __LibFini
+ 01/02/24: Rework shared library ABI, except a rt_library_init and rt_library_free
(amlel)
15/02/24: Breaking changes, changed the name of the routines. (amlel)
@@ -44,7 +44,7 @@ EXTERN_C SharedObjectPtr rt_library_init(void) {
return nullptr;
}
- library->Mount(tls_new_class<SharedObject::SharedObjectTraits>());
+ library->Mount(tls_new_class<SharedObject::SharedObjectTrait>());
if (!library->Get()) {
ProcessManager::Shared().Leak().GetCurrent().Leak().Crash();