Add ALIGN16 to GRAPH_ALLOC (#1137)

* Add ALIGN16 to GRAPH_ALLOC

* format

* DebugDisplay_PathDisplayList

* 1 more

* PR

* Format

* Reverse gfxHead and gfx

* PR
This commit is contained in:
Derek Hensley
2022-10-28 14:09:16 -03:00
committed by GitHub
parent f191044a05
commit fde3a29b17
30 changed files with 213 additions and 252 deletions
+6 -5
View File
@@ -69,6 +69,11 @@
#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))
#define ALIGN8(val) (((val) + 7) & ~7)
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)
#define ALIGN256(val) (((val) + 0xFF) & ~0xFF)
extern GraphicsContext* __gfxCtx;
#define WORK_DISP __gfxCtx->work.p
@@ -106,7 +111,7 @@ extern GraphicsContext* __gfxCtx;
#define VTX_T(x, y, z, s, t, cr, cg, cb, a) \
{ { x, y, z }, 0, { s, t }, { cr, cg, cb, a }, }
#define GRAPH_ALLOC(gfxCtx, size) ((void*)((gfxCtx)->polyOpa.d = (Gfx*)((u8*)(gfxCtx)->polyOpa.d - (size))))
#define GRAPH_ALLOC(gfxCtx, size) ((void*)((gfxCtx)->polyOpa.d = (Gfx*)((u8*)(gfxCtx)->polyOpa.d - ALIGN16(size))))
// Custom gbi macro
#define gDPSetTileCustom(pkt, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) \
@@ -123,10 +128,6 @@ extern GraphicsContext* __gfxCtx;
} \
(void)0
#define ALIGN8(val) (((val) + 7) & ~7)
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)
#define ALIGN256(val) (((val) + 0xFF) & ~0xFF)
#define SQ(x) ((x) * (x))
#define ABS(x) ((x) >= 0 ? (x) : -(x))