diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-18 12:35:19 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-18 12:39:24 +0100 |
| commit | 4c714f2c24c5df78bae2f35c42c73107de4c8c71 (patch) | |
| tree | b36d2498b8387909dac45c98097b8169636ad25a /Private/Source/Framebuffer.cxx | |
| parent | a4bfc396a78ddd553de519ab927d8479d0c3c45d (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/Framebuffer.cxx')
| -rw-r--r-- | Private/Source/Framebuffer.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
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; } |
