From d9d82713326069478e6dd212763d1fac15e65370 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 14 Oct 2024 05:58:38 +0000 Subject: IMP: Basic ARM64 port. --- dev/modules/FB/FB.hxx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'dev/modules/FB') 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 -#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; \ } \ } -- cgit v1.2.3