mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-08 08:55:17 +00:00
Gamealloc, Graph, and Graphalloc retail OK (#1675)
* Gamealloc OK * Graph + Graphalloc OK * PR review * gfxalloc * new lines * Remove imposter
This commit is contained in:
parent
a0d31dba68
commit
06379c3109
19 changed files with 202 additions and 158 deletions
25
src/code/gfxalloc.c
Normal file
25
src/code/gfxalloc.c
Normal file
|
@ -0,0 +1,25 @@
|
|||
#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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue