summaryrefslogtreecommitdiffhomepage
path: root/dev/modules/FB
diff options
context:
space:
mode:
authorAmlal El Mahrouss <zka-holder@mahrouss-logic.com>2024-10-14 05:58:38 +0000
committerAmlal El Mahrouss <zka-holder@mahrouss-logic.com>2024-10-14 05:58:38 +0000
commit7ad3739afdfaa2466723467f5ef2526f171c87c3 (patch)
tree37775f4299281598b0f5121df4c188392daebd04 /dev/modules/FB
parent7477a0f942c374b652da4f80cdb36d4661aac3c8 (diff)
parentd9d82713326069478e6dd212763d1fac15e65370 (diff)
Merge branch 'port-stage1-hello-world' into 'unstable'
IMP: Basic ARM64 port. See merge request mahrouss/zka-dev!20
Diffstat (limited to 'dev/modules/FB')
-rw-r--r--dev/modules/FB/FB.hxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/dev/modules/FB/FB.hxx b/dev/modules/FB/FB.hxx
index a98eeafe..7f5b93bb 100644
--- a/dev/modules/FB/FB.hxx
+++ b/dev/modules/FB/FB.hxx
@@ -8,17 +8,17 @@
#include <NewKit/Defines.hxx>
-#define CGInit() Kernel::SizeT __CG_CURSOR = 0
+#define CGInit() Kernel::SizeT kCGCursor = 0
#define CGColor(R, G, B) RGB(R, G, B)
#define cCGClearClr CGColor(0x0, 0x0, 0x0)
-#define CGFini() __CG_CURSOR = 0
+#define CGFini() kCGCursor = 0
/// @brief Performs OR drawing on the framebuffer.
#define CGDrawBitMapInRegionA(_BitMp, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \
{ \
@@ -27,15 +27,15 @@
*(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
i + \
- 4 * u))) |= (_BitMp)[__CG_CURSOR]; \
+ 4 * u))) |= (_BitMp)[kCGCursor]; \
\
- ++__CG_CURSOR; \
+ ++kCGCursor; \
} \
}
/// @brief Draws a resource.
#define CGDrawBitMapInRegion(_BitMp, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \
{ \
@@ -44,14 +44,14 @@
*(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
i + \
- 4 * u))) = (_BitMp)[__CG_CURSOR]; \
+ 4 * u))) = (_BitMp)[kCGCursor]; \
\
- ++__CG_CURSOR; \
+ ++kCGCursor; \
} \
}
#define CGDrawBitMapInRegionToRgn(_Rgn, _BitMp, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT i = _BaseX; i < (_Height + _BaseX); ++i) \
{ \
@@ -60,9 +60,9 @@
*(((Kernel::UInt32*)(_Rgn + \
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
i + \
- 4 * u))) = (_BitMp)[__CG_CURSOR]; \
+ 4 * u))) = (_BitMp)[kCGCursor]; \
\
- ++__CG_CURSOR; \
+ ++kCGCursor; \
} \
}
@@ -96,7 +96,7 @@
/// @brief Draws inside a zone.
#define CGDrawInRegionToRgn(_Rgn, _Clr, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \
{ \
@@ -105,13 +105,13 @@
*(((volatile Kernel::UInt32*)(_Rgn + \
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
x_base + \
- 4 * y_base))) = _Clr[__CG_CURSOR]; \
- ++__CG_CURSOR; \
+ 4 * y_base))) = _Clr[kCGCursor]; \
+ ++kCGCursor; \
} \
}
#define CGDrawInRegionToVideoRgn(_VideoRgn, _Clr, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \
{ \
@@ -121,12 +121,12 @@
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
x_base + \
4 * y_base))) = _Clr; \
- ++__CG_CURSOR; \
+ ++kCGCursor; \
} \
}
#define CGDrawInRegionToVideoRgnA(_VideoRgn, _Clr, _Height, _Width, _BaseX, _BaseY) \
- __CG_CURSOR = 0; \
+ kCGCursor = 0; \
\
for (Kernel::SizeT x_base = _BaseX; x_base < (_Width + _BaseX); ++x_base) \
{ \
@@ -136,7 +136,7 @@
4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
x_base + \
4 * y_base))) |= _Clr; \
- ++__CG_CURSOR; \
+ ++kCGCursor; \
} \
}