From 4c714f2c24c5df78bae2f35c42c73107de4c8c71 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 18 Mar 2024 12:35:19 +0100 Subject: 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 --- Private/Source/Framebuffer.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Private/Source/Framebuffer.cxx') 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 &Framebuffer::Leak() { return this->m_FrameBufferAddr; } -- cgit v1.2.3