summaryrefslogtreecommitdiff
path: root/src/code/TwoHeadGfxArena.c
diff options
context:
space:
mode:
authorkyleburnette <kyle@kyleburnette.com>2021-03-27 10:13:56 -0700
committerGitHub <noreply@github.com>2021-03-27 12:13:56 -0500
commita0b8a7c718f32df1c30f5548fee494b8be6dffe4 (patch)
tree77f245c819b7e976f4f886ae0450ba3f736d05fa /src/code/TwoHeadGfxArena.c
parent6e4d156ad788f4add678481d38f6cfa5f35e33e2 (diff)
TwoHeadArena and TwoHeadGfxArena OK (#83)
* TwoHeadArena and TwoHeadGfxArena OK * Changed negatives to ~ in TwoHeadArena.c * Renamed functions to match OoT * Formatted code files * Removed dispbuf
Diffstat (limited to 'src/code/TwoHeadGfxArena.c')
-rw-r--r--src/code/TwoHeadGfxArena.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/code/TwoHeadGfxArena.c b/src/code/TwoHeadGfxArena.c
new file mode 100644
index 000000000..2cf73aa88
--- /dev/null
+++ b/src/code/TwoHeadGfxArena.c
@@ -0,0 +1,66 @@
+#include <ultra64.h>
+#include <global.h>
+
+void THGA_Ct(TwoHeadGfxArena* thga, Gfx* start, u32 size) {
+ THA_Ct((TwoHeadArena*)thga, start, size);
+}
+
+void THGA_Dt(TwoHeadGfxArena* thga) {
+ THA_Dt((TwoHeadArena*)thga);
+}
+
+u32 THGA_IsCrash(TwoHeadGfxArena* thga) {
+ return THA_IsCrash((TwoHeadArena*)thga);
+}
+
+void THGA_Init(TwoHeadGfxArena* thga) {
+ THA_Init((TwoHeadArena*)thga);
+}
+
+s32 THGA_GetSize(TwoHeadGfxArena* thga) {
+ return THA_GetSize((TwoHeadArena*)thga);
+}
+
+Gfx* THGA_GetHead(TwoHeadGfxArena* thga) {
+ return THA_GetHead((TwoHeadArena*)thga);
+}
+
+void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* start) {
+ THA_SetHead((TwoHeadArena*)thga, start);
+}
+
+Gfx* THGA_GetTail(TwoHeadGfxArena* thga) {
+ return THA_GetTail((TwoHeadArena*)thga);
+}
+
+Gfx* THGA_AllocStartArray8(TwoHeadGfxArena* thga, u32 count) {
+ return THA_AllocStart((TwoHeadArena*)thga, count * 8);
+}
+
+Gfx* THGA_AllocStart8(TwoHeadGfxArena* thga) {
+ return THGA_AllocStartArray8(thga, 1);
+}
+
+Gfx* THGA_AllocStart8Wrapper(TwoHeadGfxArena* thga) {
+ return THGA_AllocStart8(thga);
+}
+
+Gfx* THGA_AllocEnd(TwoHeadGfxArena* thga, u32 size) {
+ return THA_AllocEnd((TwoHeadArena*)thga, size);
+}
+
+Gfx* THGA_AllocEndArray64(TwoHeadGfxArena* thga, u32 count) {
+ return THGA_AllocEnd(thga, count * 0x40);
+}
+
+Gfx* THGA_AllocEnd64(TwoHeadGfxArena* thga) {
+ return THGA_AllocEnd(thga, 0x40);
+}
+
+Gfx* THGA_AllocEndArray16(TwoHeadGfxArena* thga, u32 count) {
+ return THGA_AllocEnd(thga, count * 0x10);
+}
+
+Gfx* THGA_AllocEnd16(TwoHeadGfxArena* thga) {
+ return THGA_AllocEnd(thga, 0x10);
+}