mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-09-02 00:38:49 -04:00
Implement gfxalloc
This commit is contained in:
@@ -9,9 +9,6 @@
|
||||
#include "JSystem/JKernel/JKRThread.h"
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
|
||||
#define ALIGN_PREV(u, align) (u & (~(align-1)))
|
||||
#define ALIGN_NEXT(u, align) ((u + (align-1)) & (~(align-1)))
|
||||
|
||||
#define ARAM_GROUP_ID_ALL 0
|
||||
#define ARAM_GROUP_ID_DEFAULT 0xFF
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef GFXALLOC_H
|
||||
#define GFXALLOC_H
|
||||
|
||||
#include "types.h"
|
||||
#include "PR/mbi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern Gfx* gfxopen(Gfx* gfxp);
|
||||
extern Gfx* gfxclose(Gfx* gfxp, Gfx* gfxp_new);
|
||||
extern Gfx* gfxalloc(Gfx** gfxpp, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -40,6 +40,9 @@ typedef u32 unknown;
|
||||
|
||||
#define AT_ADDRESS(x) : (x)
|
||||
|
||||
#define ALIGN_PREV(u, align) (u & (~(align-1)))
|
||||
#define ALIGN_NEXT(u, align) ((u + (align-1)) & (~(align-1)))
|
||||
|
||||
#ifndef ATTRIBUTE_ALIGN
|
||||
#if defined(__MWERKS__) || defined(__GNUC__)
|
||||
#define ATTRIBUTE_ALIGN(num) __attribute__((aligned(num)))
|
||||
|
||||
Reference in New Issue
Block a user