mirror of
https://github.com/zeldaret/oot
synced 2026-05-23 23:05:31 -04:00
06379c3109
* Gamealloc OK * Graph + Graphalloc OK * PR review * gfxalloc * new lines * Remove imposter
26 lines
375 B
C
26 lines
375 B
C
#include "global.h"
|
|
|
|
Gfx* Gfx_Open(Gfx* gfx) {
|
|
return gfx + 1;
|
|
}
|
|
|
|
Gfx* Gfx_Close(Gfx* gfx, Gfx* dst) {
|
|
gSPBranchList(gfx, dst);
|
|
return dst;
|
|
}
|
|
|
|
void* Gfx_Alloc(Gfx** gfxP, u32 size) {
|
|
u8* ptr;
|
|
Gfx* dst;
|
|
|
|
size = ALIGN8(size);
|
|
|
|
ptr = (u8*)(*gfxP + 1);
|
|
|
|
dst = (Gfx*)(ptr + size);
|
|
gSPBranchList(*gfxP, dst);
|
|
|
|
*gfxP = dst;
|
|
return ptr;
|
|
}
|