* THA docs

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* format

* namefixer

* yada

* remove zero pad comment

* Update include/z64.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/thga.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* namefixer

* bss

* namefixer

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
Anghelo Carvajal 2023-03-24 14:38:04 -03:00 committed by GitHub
parent f3d2c56d1d
commit 147e4fcedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 321 additions and 187 deletions

View File

@ -2363,35 +2363,7 @@ void PreRender_ApplyFiltersSlowlyDestroy(PreRender* this);
void func_801720C4(PreRender* this);
void func_801720FC(PreRenderParams* params, Gfx** gfxp);
void Prerender_DrawBackground2D(Gfx** gfxp, void* timg, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tt, u16 arg8, f32 x, f32 y, f32 xScale, f32 yScale, u32 flags);
void THGA_Ct(TwoHeadGfxArena* thga, Gfx* start, size_t size);
void THGA_Dt(TwoHeadGfxArena* thga);
u32 THGA_IsCrash(TwoHeadGfxArena* thga);
void THGA_Init(TwoHeadGfxArena* thga);
s32 THGA_GetSize(TwoHeadGfxArena* thga);
Gfx* THGA_GetHead(TwoHeadGfxArena* thga);
void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* start);
Gfx* THGA_GetTail(TwoHeadGfxArena* thga);
Gfx* THGA_AllocStartArray8(TwoHeadGfxArena* thga, u32 count);
Gfx* THGA_AllocStart8(TwoHeadGfxArena* thga);
Gfx* THGA_AllocStart8Wrapper(TwoHeadGfxArena* thga);
Gfx* THGA_AllocEnd(TwoHeadGfxArena* thga, size_t size);
Gfx* THGA_AllocEndArray64(TwoHeadGfxArena* thga, u32 count);
Gfx* THGA_AllocEnd64(TwoHeadGfxArena* thga);
Gfx* THGA_AllocEndArray16(TwoHeadGfxArena* thga, u32 count);
Gfx* THGA_AllocEnd16(TwoHeadGfxArena* thga);
void* THA_GetHead(TwoHeadArena* tha);
void THA_SetHead(TwoHeadArena* tha, void* start);
void* THA_GetTail(TwoHeadArena* tha);
void* THA_AllocStart(TwoHeadArena* tha, size_t size);
void* THA_AllocStart1(TwoHeadArena* tha);
void* THA_AllocEnd(TwoHeadArena* tha, size_t size);
void* THA_AllocEndAlign16(TwoHeadArena* tha, size_t size);
void* THA_AllocEndAlign(TwoHeadArena* tha, size_t size, u32 mask);
s32 THA_GetSize(TwoHeadArena* tha);
u32 THA_IsCrash(TwoHeadArena* tha);
void THA_Init(TwoHeadArena* tha);
void THA_Ct(TwoHeadArena* tha, void* ptr, size_t size);
void THA_Dt(TwoHeadArena* tha);
void AudioMgr_StopAllSfxExceptSystem(void);
void func_80172C30(AudioMgr* audioMgr);
void AudioMgr_HandleRetrace(AudioMgr* audioMgr);

28
include/tha.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef THA_H
#define THA_H
#include "ultra64.h"
#include "libc/stdint.h"
typedef struct TwoHeadArena {
/* 0x0 */ size_t size;
/* 0x4 */ void* start;
/* 0x8 */ void* head;
/* 0xC */ void* tail;
} TwoHeadArena; // size = 0x10
void* THA_GetHead(TwoHeadArena* tha);
void THA_SetHead(TwoHeadArena* tha, void* newHead);
void* THA_GetTail(TwoHeadArena* tha);
void* THA_AllocHead(TwoHeadArena* tha, size_t size);
void* THA_AllocHeadByte(TwoHeadArena* tha);
void* THA_AllocTail(TwoHeadArena* tha, size_t size);
void* THA_AllocTailAlign16(TwoHeadArena* tha, size_t size);
void* THA_AllocTailAlign(TwoHeadArena* tha, size_t size, uintptr_t mask);
s32 THA_GetRemaining(TwoHeadArena* tha);
u32 THA_IsCrash(TwoHeadArena* tha);
void THA_Reset(TwoHeadArena* tha);
void THA_Init(TwoHeadArena* tha, void* start, size_t size);
void THA_Destroy(TwoHeadArena* tha);
#endif

33
include/thga.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef THGA_H
#define THGA_H
#include "tha.h"
typedef union TwoHeadGfxArena {
struct { // Same as TwoHeadArena, with different types and field names for the head and tail pointers
/* 0x0 */ size_t size;
/* 0x4 */ void* start;
/* 0x8 */ Gfx* p;
/* 0xC */ void* d;
};
/* 0x0 */ TwoHeadArena tha;
} TwoHeadGfxArena; // size = 0x10
void THGA_Init(TwoHeadGfxArena* thga, void* start, size_t size);
void THGA_Destroy(TwoHeadGfxArena* thga);
u32 THGA_IsCrash(TwoHeadGfxArena* thga);
void THGA_Reset(TwoHeadGfxArena* thga);
s32 THGA_GetRemaining(TwoHeadGfxArena* thga);
Gfx* THGA_GetHead(TwoHeadGfxArena* thga);
void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* newHead);
void* THGA_GetTail(TwoHeadGfxArena* thga);
Gfx* THGA_AllocDisplayList(TwoHeadGfxArena* thga, size_t num);
Gfx* THGA_AllocGfx(TwoHeadGfxArena* thga);
Gfx* THGA_AllocGfx2(TwoHeadGfxArena* thga);
void* THGA_AllocTail(TwoHeadGfxArena* thga, size_t size);
Mtx* THGA_AllocMtxArray(TwoHeadGfxArena* thga, size_t num);
Mtx* THGA_AllocMtx(TwoHeadGfxArena* thga);
Vtx* THGA_AllocVtxArray(TwoHeadGfxArena* thga, size_t num);
Vtx* THGA_AllocVtx(TwoHeadGfxArena* thga);
#endif

View File

@ -25,6 +25,8 @@
#include "gfxprint.h"
#include "sys_matrix.h"
#include "tha.h"
#include "thga.h"
#include "z64actor.h"
#include "z64animation.h"
#include "z64audio.h"
@ -115,20 +117,6 @@ typedef struct {
/* 0x8 */ void* end;
} PolygonType2; // size = 0xC
typedef struct {
/* 0x0 */ u32 size;
/* 0x4 */ void* bufp;
/* 0x8 */ void* head;
/* 0xC */ void* tail;
} TwoHeadArena; // size = 0x10
typedef struct {
/* 0x0 */ u32 size;
/* 0x4 */ Gfx* bufp;
/* 0x8 */ Gfx* p;
/* 0xC */ Gfx* d;
} TwoHeadGfxArena; // size = 0x10
typedef struct {
/* 0x000 */ Gfx taskStart[9];
/* 0x048 */ Gfx clearZBuffer[8]; // original name: clear_zb_dl

View File

@ -1,79 +1,136 @@
#include "global.h"
/**
* @file TwoHeadArena.c
*
* This file implements a simple general purpose double-ended stack allocator.
*
* A double-ended stack allocator accepts allocations at either the "head" or "tail" of its allotted memory region.
* While in general this type of allocator could accept deallocations on the most recently allocated block at either
* end, this implementation does not support any individual deallocations; the only provided way to deallocate anything
* is to reset the entire arena, deallocating everything. This scheme is most applicable to allocating similar data
* with identical lifetime.
*/
#include "tha.h"
#include "alignment.h"
#include "functions.h"
void* THA_GetHead(TwoHeadArena* tha) {
return tha->head;
}
void THA_SetHead(TwoHeadArena* tha, void* start) {
tha->head = start;
void THA_SetHead(TwoHeadArena* tha, void* newHead) {
tha->head = newHead;
}
void* THA_GetTail(TwoHeadArena* tha) {
return tha->tail;
}
void* THA_AllocStart(TwoHeadArena* tha, size_t size) {
/**
* Allocates to the head of the Two Head Arena. The allocation will not have any alignment guarantees.
*/
void* THA_AllocHead(TwoHeadArena* tha, size_t size) {
void* start = tha->head;
tha->head = (u32)tha->head + size;
tha->head = (u8*)tha->head + size;
return start;
}
void* THA_AllocStart1(TwoHeadArena* tha) {
return THA_AllocStart(tha, 1);
void* THA_AllocHeadByte(TwoHeadArena* tha) {
return THA_AllocHead(tha, 1);
}
void* THA_AllocEnd(TwoHeadArena* tha, size_t size) {
u32 mask;
/**
* Allocates to the tail end of the Two Head Arena. The allocation will be aligned based on the size of the allocation.
* All allocations of 16 bytes or more will be aligned to 16-bytes. Otherwise, the alignment will be the largest power
* of 2 for which the size is a multiple, in order to accommodate the alignment requirements of any data types that can
* fit within the allocation.
*/
void* THA_AllocTail(TwoHeadArena* tha, size_t size) {
uintptr_t mask;
if (size >= 0x10) {
mask = ~0xF;
// Align 0x10 for allocations greater than 0x10
mask = ALIGN_MASK(0x10);
} else if (size & 1) {
mask = -1;
// No alignment for odd sizes
mask = ALIGN_MASK(1);
} else if (size & 2) {
mask = ~0x1;
// Align 2 for multiples of 2
mask = ALIGN_MASK(2);
} else if (size & 4) {
mask = ~0x3;
// Align 4 for multiples of 4
mask = ALIGN_MASK(4);
} else if (size & 8) {
// Align 8 for multiples of 8
mask = ALIGN_MASK(8);
} else {
mask = (size & 8) ? ~0x7 : -1;
mask = ALIGN_MASK(1);
}
tha->tail = (((u32)tha->tail & mask) - size) & mask;
tha->tail = (void*)((((uintptr_t)tha->tail & mask) - size) & mask);
return tha->tail;
}
void* THA_AllocEndAlign16(TwoHeadArena* tha, size_t size) {
u32 mask = ~0xF;
/**
* Allocates to the tail end of the Two Head Arena with guaranteed 16-byte alignment.
*/
void* THA_AllocTailAlign16(TwoHeadArena* tha, size_t size) {
uintptr_t mask = ALIGN_MASK(0x10);
tha->tail = (((u32)tha->tail & mask) - size) & mask;
tha->tail = (void*)((((uintptr_t)tha->tail & mask) - size) & mask);
return tha->tail;
}
void* THA_AllocEndAlign(TwoHeadArena* tha, size_t size, u32 mask) {
tha->tail = (((u32)tha->tail & mask) - size) & mask;
/**
* Allocates to the tail end of the Two Head Arena using the provided mask to align the allocated region.
*
* @param tha Arena to allocate to
* @param size Size of the allocation
* @param mask Mask to use to align the allocated region. To align to n-bytes where n is a power of 2, use the
* ALIGN_MASK(n) macro
*
* @return Pointer to the start of the allocated block
*/
void* THA_AllocTailAlign(TwoHeadArena* tha, size_t size, uintptr_t mask) {
tha->tail = (void*)((((uintptr_t)tha->tail & mask) - size) & mask);
return tha->tail;
}
s32 THA_GetSize(TwoHeadArena* tha) {
return (u32)tha->tail - (u32)tha->head;
/**
* Gets the remaining size of the Two Head Arena
*
* @return Remaining size. A negative number indicates an overflow.
*/
s32 THA_GetRemaining(TwoHeadArena* tha) {
return (s32)((u8*)tha->tail - (u8*)tha->head);
}
/**
* @return true if the Two Head Arena has overflowed, false otherwise
*/
u32 THA_IsCrash(TwoHeadArena* tha) {
return THA_GetSize(tha) < 0;
return THA_GetRemaining(tha) < 0;
}
void THA_Init(TwoHeadArena* tha) {
tha->head = tha->bufp;
tha->tail = (u32)tha->bufp + tha->size;
void THA_Reset(TwoHeadArena* tha) {
tha->head = tha->start;
tha->tail = (u8*)tha->start + tha->size;
}
void THA_Ct(TwoHeadArena* tha, void* ptr, size_t size) {
/**
* Creates a new Two Head Arena at `start` with available size `size`
*/
void THA_Init(TwoHeadArena* tha, void* start, size_t size) {
bzero(tha, sizeof(TwoHeadArena));
tha->bufp = ptr;
tha->start = start;
tha->size = size;
THA_Init(tha);
THA_Reset(tha);
}
void THA_Dt(TwoHeadArena* tha) {
/**
* Destroys the Two Head Arena, no further allocations are possible
*/
void THA_Destroy(TwoHeadArena* tha) {
bzero(tha, sizeof(TwoHeadArena));
}

View File

@ -1,65 +1,105 @@
#include "global.h"
/**
* @file TwoHeadGfxArena.c
*
* This file implements a particular use of the double-ended stack allocator from TwoHeadArena.c for graphics data.
*
* Display list commands are allocated from the head while other graphics data such as matrices and vertices are
* allocated from the tail end.
*
* @see TwoHeadArena.c
*/
void THGA_Ct(TwoHeadGfxArena* thga, Gfx* start, size_t size) {
THA_Ct((TwoHeadArena*)thga, start, size);
#include "thga.h"
#include "alignment.h"
#include "functions.h"
void THGA_Init(TwoHeadGfxArena* thga, void* start, size_t size) {
THA_Init(&thga->tha, start, size);
}
void THGA_Dt(TwoHeadGfxArena* thga) {
THA_Dt((TwoHeadArena*)thga);
void THGA_Destroy(TwoHeadGfxArena* thga) {
THA_Destroy(&thga->tha);
}
u32 THGA_IsCrash(TwoHeadGfxArena* thga) {
return THA_IsCrash((TwoHeadArena*)thga);
return THA_IsCrash(&thga->tha);
}
void THGA_Init(TwoHeadGfxArena* thga) {
THA_Init((TwoHeadArena*)thga);
void THGA_Reset(TwoHeadGfxArena* thga) {
THA_Reset(&thga->tha);
}
s32 THGA_GetSize(TwoHeadGfxArena* thga) {
return THA_GetSize((TwoHeadArena*)thga);
s32 THGA_GetRemaining(TwoHeadGfxArena* thga) {
return THA_GetRemaining(&thga->tha);
}
Gfx* THGA_GetHead(TwoHeadGfxArena* thga) {
return THA_GetHead((TwoHeadArena*)thga);
return THA_GetHead(&thga->tha);
}
void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* start) {
THA_SetHead((TwoHeadArena*)thga, start);
void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* newHead) {
THA_SetHead(&thga->tha, newHead);
}
Gfx* THGA_GetTail(TwoHeadGfxArena* thga) {
return THA_GetTail((TwoHeadArena*)thga);
void* THGA_GetTail(TwoHeadGfxArena* thga) {
return THA_GetTail(&thga->tha);
}
Gfx* THGA_AllocStartArray8(TwoHeadGfxArena* thga, u32 count) {
return THA_AllocStart((TwoHeadArena*)thga, count * 8);
/**
* Allocates a display list of `num` Gfx commands to the head of the Two Head Gfx Arena.
*/
Gfx* THGA_AllocDisplayList(TwoHeadGfxArena* thga, size_t num) {
return THA_AllocHead(&thga->tha, num * sizeof(Gfx));
}
Gfx* THGA_AllocStart8(TwoHeadGfxArena* thga) {
return THGA_AllocStartArray8(thga, 1);
/**
* Allocates a single Gfx command to the head of the Two Head Gfx Arena.
*/
Gfx* THGA_AllocGfx(TwoHeadGfxArena* thga) {
return THGA_AllocDisplayList(thga, 1);
}
Gfx* THGA_AllocStart8Wrapper(TwoHeadGfxArena* thga) {
return THGA_AllocStart8(thga);
/**
* Identical to `THGA_AllocGfx`
*
* @see THGA_AllocGfx
*/
Gfx* THGA_AllocGfx2(TwoHeadGfxArena* thga) {
return THGA_AllocGfx(thga);
}
Gfx* THGA_AllocEnd(TwoHeadGfxArena* thga, size_t size) {
return THA_AllocEnd((TwoHeadArena*)thga, size);
/**
* Allocates to the end of the Two Head Gfx Arena. Intended for data complementary to the display lists such as
* matrices and vertices that are only needed for a single graphics task.
*/
void* THGA_AllocTail(TwoHeadGfxArena* thga, size_t size) {
return THA_AllocTail(&thga->tha, size);
}
Gfx* THGA_AllocEndArray64(TwoHeadGfxArena* thga, u32 count) {
return THGA_AllocEnd(thga, count * 0x40);
/**
* Allocates `num` matrices to the tail end of the Two Head Gfx Arena.
*/
Mtx* THGA_AllocMtxArray(TwoHeadGfxArena* thga, size_t num) {
return THGA_AllocTail(thga, num * sizeof(Mtx));
}
Gfx* THGA_AllocEnd64(TwoHeadGfxArena* thga) {
return THGA_AllocEnd(thga, 0x40);
/**
* Allocates a matrix to the tail end of the Two Head Gfx Arena.
*/
Mtx* THGA_AllocMtx(TwoHeadGfxArena* thga) {
return THGA_AllocTail(thga, sizeof(Mtx));
}
Gfx* THGA_AllocEndArray16(TwoHeadGfxArena* thga, u32 count) {
return THGA_AllocEnd(thga, count * 0x10);
/**
* Allocates `num` vertices to the tail end of the Two Head Gfx Arena.
*/
Vtx* THGA_AllocVtxArray(TwoHeadGfxArena* thga, u32 num) {
return THGA_AllocTail(thga, num * sizeof(Vtx));
}
Gfx* THGA_AllocEnd16(TwoHeadGfxArena* thga) {
return THGA_AllocEnd(thga, 0x10);
/**
* Allocates a vertex to the tail end of the Two Head Gfx Arena.
*/
Vtx* THGA_AllocVtx(TwoHeadGfxArena* thga) {
return THGA_AllocTail(thga, sizeof(Vtx));
}

View File

@ -158,11 +158,11 @@ void GameState_InitArena(GameState* gameState, size_t size) {
void* buf = GameAlloc_Malloc(alloc, size);
if (buf) {
THA_Ct(&gameState->heap, buf, size);
THA_Init(&gameState->heap, buf, size);
return;
}
THA_Ct(&gameState->heap, NULL, 0);
THA_Init(&gameState->heap, NULL, 0);
__assert("../game.c", 1035);
}
@ -174,9 +174,9 @@ void GameState_Realloc(GameState* gameState, size_t size) {
size_t bytesAllocated;
void* heapStart;
heapStart = gameState->heap.bufp;
heapStart = gameState->heap.start;
alloc = &gameState->alloc;
THA_Dt(&gameState->heap);
THA_Destroy(&gameState->heap);
GameAlloc_Free(alloc, heapStart);
SystemArena_GetSizes(&systemMaxFree, &bytesFree, &bytesAllocated);
size = ((systemMaxFree - (sizeof(ArenaNode))) < size) ? (0) : (size);
@ -185,9 +185,9 @@ void GameState_Realloc(GameState* gameState, size_t size) {
}
if ((gameArena = GameAlloc_Malloc(alloc, size)) != NULL) {
THA_Ct(&gameState->heap, gameArena, size);
THA_Init(&gameState->heap, gameArena, size);
} else {
THA_Ct(&gameState->heap, 0, 0);
THA_Init(&gameState->heap, 0, 0);
__assert("../game.c", 1074);
}
}
@ -240,7 +240,7 @@ void GameState_Destroy(GameState* gameState) {
func_801420F4(&D_801F8020);
VisMono_Destroy(&sMonoColors);
func_80140900(&D_801F8048);
THA_Dt(&gameState->heap);
THA_Destroy(&gameState->heap);
GameAlloc_Cleanup(&gameState->alloc);
}
@ -257,7 +257,7 @@ u32 GameState_IsRunning(GameState* gameState) {
}
s32 GameState_GetArenaSize(GameState* gameState) {
return THA_GetSize(&gameState->heap);
return THA_GetRemaining(&gameState->heap);
}
s32 func_80173B48(GameState* gameState) {

View File

@ -26,7 +26,7 @@ void Graph_FaultClient(void) {
}
void Graph_InitTHGA(TwoHeadGfxArena* arena, Gfx* buffer, s32 size) {
THGA_Ct(arena, buffer, size);
THGA_Init(arena, buffer, size);
}
void Graph_SetNextGfxPool(GraphicsContext* gfxCtx) {

View File

@ -1,4 +1,3 @@
#include "prevent_bss_reordering.h"
#include "global.h"
#define RSP_DONE_MSG 667

View File

@ -74,7 +74,7 @@ MtxF* sCurrentMatrix; //!< original name: "Matrix_now"
* @remark original name: "new_Matrix"
*/
void Matrix_Init(GameState* gameState) {
sMatrixStack = THA_AllocEndAlign16(&gameState->heap, MATRIX_STACK_SIZE * sizeof(MtxF));
sMatrixStack = THA_AllocTailAlign16(&gameState->heap, MATRIX_STACK_SIZE * sizeof(MtxF));
sCurrentMatrix = sMatrixStack;
}

View File

@ -140,7 +140,7 @@ void DynaSSNodeList_Init(PlayState* play, DynaSSNodeList* list) {
}
void DynaSSNodeList_Alloc(PlayState* play, DynaSSNodeList* list, u32 numNodes) {
list->tbl = (SSNode*)THA_AllocEndAlign(&play->state.heap, numNodes * sizeof(SSNode), -2);
list->tbl = (SSNode*)THA_AllocTailAlign(&play->state.heap, numNodes * sizeof(SSNode), -2);
list->maxNodes = numNodes;
list->count = 0;
}
@ -1591,7 +1591,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
colCtx->subdivAmount.z = 16;
}
}
colCtx->lookupTbl = THA_AllocEndAlign(
colCtx->lookupTbl = THA_AllocTailAlign(
&play->state.heap,
colCtx->subdivAmount.x * sizeof(StaticLookup) * colCtx->subdivAmount.y * colCtx->subdivAmount.z, ~1);
if (colCtx->lookupTbl == NULL) {
@ -2478,8 +2478,8 @@ void SSNodeList_Init(SSNodeList* this) {
void SSNodeList_Alloc(PlayState* play, SSNodeList* this, s32 tblMax, s32 numPolys) {
this->max = tblMax;
this->count = 0;
this->tbl = THA_AllocEndAlign(&play->state.heap, tblMax * sizeof(SSNode), -2);
this->polyCheckTbl = THA_AllocEndAlign16(&play->state.heap, numPolys * sizeof(u8));
this->tbl = THA_AllocTailAlign(&play->state.heap, tblMax * sizeof(SSNode), -2);
this->polyCheckTbl = THA_AllocTailAlign16(&play->state.heap, numPolys * sizeof(u8));
if (this->polyCheckTbl == NULL) {
sprintf(D_801ED950, "this->polygon_check == NULL(game_alloc() MemoryAllocationError.)\n");
@ -2621,7 +2621,7 @@ void DynaPoly_NullPolyList(CollisionPoly** polyList) {
* Allocate dyna.polyList
*/
void DynaPoly_AllocPolyList(PlayState* play, CollisionPoly** polyList, s32 numPolys) {
*polyList = THA_AllocEndAlign(&play->state.heap, numPolys * sizeof(CollisionPoly), -2);
*polyList = THA_AllocTailAlign(&play->state.heap, numPolys * sizeof(CollisionPoly), -2);
}
/**
@ -2635,7 +2635,7 @@ void DynaPoly_NullVtxList(Vec3s** vtxList) {
* Allocate dyna.vtxList
*/
void DynaPoly_AllocVtxList(PlayState* play, Vec3s** vtxList, s32 numVtx) {
*vtxList = THA_AllocEndAlign(&play->state.heap, numVtx * sizeof(Vec3s), -2);
*vtxList = THA_AllocTailAlign(&play->state.heap, numVtx * sizeof(Vec3s), -2);
}
/**
@ -2650,7 +2650,7 @@ void DynaPoly_InitWaterBoxList(DynaWaterBoxList* waterBoxList) {
* Allocate dyna.waterBoxList
*/
void DynaPoly_AllocWaterBoxList(PlayState* play, DynaWaterBoxList* waterBoxList, s32 numWaterBoxes) {
waterBoxList->boxes = THA_AllocEndAlign(&play->state.heap, numWaterBoxes * sizeof(WaterBox), -2);
waterBoxList->boxes = THA_AllocTailAlign(&play->state.heap, numWaterBoxes * sizeof(WaterBox), -2);
}
/**

View File

@ -128,7 +128,7 @@ void Debug_DrawText(GraphicsContext* gfxCtx) {
Gfx* gfxHead;
GfxPrint printer;
if (THGA_GetSize(&gfxCtx->polyOpa) >= 0x2800) {
if (THGA_GetRemaining(&gfxCtx->polyOpa) >= 0x2800) {
GfxPrint_Init(&printer);
OPEN_DISPS(gfxCtx);

View File

@ -8,7 +8,7 @@ void EffectSS_Init(PlayState* play, s32 numEntries) {
EffectSs* effectsSs;
EffectSsOverlay* overlay;
sEffectSsInfo.data_table = (EffectSs*)THA_AllocEndAlign16(&play->state.heap, numEntries * sizeof(EffectSs));
sEffectSsInfo.data_table = (EffectSs*)THA_AllocTailAlign16(&play->state.heap, numEntries * sizeof(EffectSs));
sEffectSsInfo.searchIndex = 0;
sEffectSsInfo.size = numEntries;

View File

@ -65,7 +65,7 @@ void KaleidoManager_Init(PlayState* play) {
}
}
sKaleidoAreaPtr = THA_AllocEndAlign16(&play->state.heap, largestSize);
sKaleidoAreaPtr = THA_AllocTailAlign16(&play->state.heap, largestSize);
gKaleidoMgrCurOvl = NULL;
Fault_AddAddrConvClient(&sKaleidoMgrFaultAddrConvClient, KaleidoManager_FaultAddrConv, NULL);
}

View File

@ -180,7 +180,7 @@ void Map_Init(PlayState* play) {
func_80105C40(play->roomCtx.curRoom.num);
interfaceCtx->unk_278 = -1;
interfaceCtx->dungeonOrBossAreaMapIndex = -1;
interfaceCtx->mapSegment = THA_AllocEndAlign16(&play->state.heap, 0x1000);
interfaceCtx->mapSegment = THA_AllocTailAlign16(&play->state.heap, 0x1000);
if (func_8010A2AC(play)) {
gSaveContext.mapIndex = func_8010A238(play);
return;

View File

@ -572,7 +572,7 @@ void Message_Init(PlayState* play) {
messageCtx->ocarinaAction = messageCtx->unk11FF2 = 0;
messageCtx->unk1201E = 0xFF;
View_Init(&messageCtx->view, play->state.gfxCtx);
messageCtx->unk11EF8 = THA_AllocEndAlign16(&play->state.heap, 0x13C00);
messageCtx->unk11EF8 = THA_AllocTailAlign16(&play->state.heap, 0x13C00);
font = &play->msgCtx.font;
Font_LoadOrderedFont(&play->msgCtx.font);
font->unk_11D88 = 0;

View File

@ -6006,16 +6006,16 @@ void Interface_Init(PlayState* play) {
interfaceCtx->healthTimer = 200;
parameterStaticSize = SEGMENT_ROM_SIZE(parameter_static);
interfaceCtx->parameterSegment = THA_AllocEndAlign16(&play->state.heap, parameterStaticSize);
interfaceCtx->parameterSegment = THA_AllocTailAlign16(&play->state.heap, parameterStaticSize);
DmaMgr_SendRequest0(interfaceCtx->parameterSegment, SEGMENT_ROM_START(parameter_static), parameterStaticSize);
interfaceCtx->doActionSegment = THA_AllocEndAlign16(&play->state.heap, 0xC90);
interfaceCtx->doActionSegment = THA_AllocTailAlign16(&play->state.heap, 0xC90);
DmaMgr_SendRequest0(interfaceCtx->doActionSegment, SEGMENT_ROM_START(do_action_static), 0x300);
DmaMgr_SendRequest0(interfaceCtx->doActionSegment + 0x300, SEGMENT_ROM_START(do_action_static) + 0x480, 0x180);
Interface_NewDay(play, CURRENT_DAY);
interfaceCtx->iconItemSegment = THA_AllocEndAlign16(&play->state.heap, 0x4000);
interfaceCtx->iconItemSegment = THA_AllocTailAlign16(&play->state.heap, 0x4000);
if (CUR_FORM_EQUIP(EQUIP_SLOT_B) < ITEM_F0) {
Interface_LoadItemIconImpl(play, EQUIP_SLOT_B);

View File

@ -1545,7 +1545,7 @@ void Play_GetFloorSurface(PlayState* this, MtxF* mtx, Vec3f* pos) {
void* Play_LoadFile(PlayState* this, RomFile* entry) {
size_t size = entry->vromEnd - entry->vromStart;
void* allocp = THA_AllocEndAlign16(&this->state.heap, size);
void* allocp = THA_AllocTailAlign16(&this->state.heap, size);
DmaMgr_SendRequest0(allocp, entry->vromStart, size);
@ -2295,9 +2295,9 @@ void Play_Init(GameState* thisx) {
D_801F6D4C->envColor.b = 0;
D_801F6D4C->envColor.a = 0;
EnvFlags_UnsetAll(this);
THA_GetSize(&this->state.heap);
zAllocSize = THA_GetSize(&this->state.heap);
zAlloc = (uintptr_t)THA_AllocEndAlign16(&this->state.heap, zAllocSize);
THA_GetRemaining(&this->state.heap);
zAllocSize = THA_GetRemaining(&this->state.heap);
zAlloc = (uintptr_t)THA_AllocTailAlign16(&this->state.heap, zAllocSize);
ZeldaArena_Init(((zAlloc + 8) & ~0xF), (zAllocSize - ((zAlloc + 8) & ~0xF)) + zAlloc); //! @bug: Incorrect ALIGN16s
Actor_InitContext(this, &this->actorCtx, this->linkActorEntry);

View File

@ -530,7 +530,7 @@ size_t Room_AllocateAndLoad(PlayState* play, RoomContext* roomCtx) {
}
}
roomCtx->roomMemPages[0] = THA_AllocEndAlign16(&play->state.heap, maxRoomSize);
roomCtx->roomMemPages[0] = THA_AllocTailAlign16(&play->state.heap, maxRoomSize);
if (roomCtx->roomMemPages[0] == NULL) {
__assert("../z_room.c", 1078);
}

View File

@ -48,7 +48,7 @@ void Object_InitBank(GameState* gameState, ObjectContext* objectCtx) {
for (i = 0; i < OBJECT_EXCHANGE_BANK_MAX; i++) { objectCtx->status[i].id = 0; }
// clang-format on
objectCtx->spaceStart = objectCtx->status[0].segment = THA_AllocEndAlign16(&gameState->heap, spaceSize);
objectCtx->spaceStart = objectCtx->status[0].segment = THA_AllocTailAlign16(&gameState->heap, spaceSize);
objectCtx->spaceEnd = (void*)((u32)objectCtx->spaceStart + spaceSize);
objectCtx->mainKeepIndex = Object_Spawn(objectCtx, GAMEPLAY_KEEP);
@ -357,7 +357,7 @@ void Scene_LoadAreaTextures(PlayState* play, s32 fileIndex) {
size_t size = sceneTextureFiles[fileIndex].vromEnd - vromStart;
if (size != 0) {
play->roomCtx.unk74 = THA_AllocEndAlign16(&play->state.heap, size);
play->roomCtx.unk74 = THA_AllocTailAlign16(&play->state.heap, size);
DmaMgr_SendRequest0(play->roomCtx.unk74, vromStart, size);
}
}

View File

@ -1600,7 +1600,7 @@ void Sram_InitSram(GameState* gameState, SramContext* sramCtx) {
void Sram_Alloc(GameState* gameState, SramContext* sramCtx) {
if (gSaveContext.unk_3F3F) {
sramCtx->saveBuf = THA_AllocEndAlign16(&gameState->heap, SAVE_BUFFER_SIZE);
sramCtx->saveBuf = THA_AllocTailAlign16(&gameState->heap, SAVE_BUFFER_SIZE);
sramCtx->status = 0;
}
}

View File

@ -294,15 +294,15 @@ void Skybox_Init(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyboxId) {
Skybox_Setup(gameState, skyboxCtx, skyboxId);
if (skyboxId != SKYBOX_NONE) {
skyboxCtx->dListBuf = THA_AllocEndAlign16(&gameState->heap, 0x3840);
skyboxCtx->dListBuf = THA_AllocTailAlign16(&gameState->heap, 0x3840);
if (skyboxId == SKYBOX_CUTSCENE_MAP) {
// Allocate enough space for the vertices for a 6 sided skybox (cube)
skyboxCtx->roomVtx = THA_AllocEndAlign16(&gameState->heap, sizeof(Vtx) * 32 * 6);
skyboxCtx->roomVtx = THA_AllocTailAlign16(&gameState->heap, sizeof(Vtx) * 32 * 6);
func_80143148(skyboxCtx, 6);
} else {
// Allocate enough space for the vertices for a 5 sided skybox (bottom is missing)
skyboxCtx->roomVtx = THA_AllocEndAlign16(&gameState->heap, sizeof(Vtx) * 32 * 5);
skyboxCtx->roomVtx = THA_AllocTailAlign16(&gameState->heap, sizeof(Vtx) * 32 * 5);
func_80143148(skyboxCtx, 5);
}
}

View File

@ -37,9 +37,9 @@ ActorInit En_Twig_InitVars = {
(ActorFunc)EnTwig_Draw,
};
static s32 sCurrentRing;
static s16 sRingCount;
static s16 sRingNotCollected[25];
s32 sCurrentRing;
s16 sRingCount;
s16 sRingNotCollected[25];
static CollisionHeader* sColHeaders[] = {
NULL,

View File

@ -213,11 +213,11 @@ void DayTelop_Noop(DayTelopState* this) {
void DayTelop_LoadGraphics(DayTelopState* this) {
size_t segmentSize = SEGMENT_ROM_SIZE(daytelop_static);
this->daytelopStaticFile = THA_AllocEndAlign16(&this->state.heap, segmentSize);
this->daytelopStaticFile = THA_AllocTailAlign16(&this->state.heap, segmentSize);
DmaMgr_SendRequest0(this->daytelopStaticFile, SEGMENT_ROM_START(daytelop_static), segmentSize);
segmentSize = SEGMENT_ROM_SIZE(icon_item_gameover_static);
this->gameoverStaticFile = THA_AllocEndAlign16(&this->state.heap, segmentSize);
this->gameoverStaticFile = THA_AllocTailAlign16(&this->state.heap, segmentSize);
DmaMgr_SendRequest0(this->gameoverStaticFile, SEGMENT_ROM_START(icon_item_gameover_static), segmentSize);
}

View File

@ -153,7 +153,7 @@ void ConsoleLogo_Init(GameState* thisx) {
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
uintptr_t segmentSize = SEGMENT_ROM_SIZE(nintendo_rogo_static);
this->staticSegment = THA_AllocEndAlign16(&this->state.heap, segmentSize);
this->staticSegment = THA_AllocTailAlign16(&this->state.heap, segmentSize);
DmaMgr_SendRequest0(this->staticSegment, SEGMENT_ROM_START(nintendo_rogo_static), segmentSize);
Game_SetFramerateDivisor(&this->state, 1);

View File

@ -3080,35 +3080,35 @@
0x801720C4:("func_801720C4",),
0x801720FC:("func_801720FC",),
0x80172758:("Prerender_DrawBackground2D",),
0x801727F0:("THGA_Ct",),
0x80172810:("THGA_Dt",),
0x801727F0:("THGA_Init",),
0x80172810:("THGA_Destroy",),
0x80172830:("THGA_IsCrash",),
0x80172850:("THGA_Init",),
0x80172870:("THGA_GetSize",),
0x80172870:("THGA_GetRemaining",),
0x80172890:("THGA_GetHead",),
0x801728B0:("THGA_SetHead",),
0x801728D0:("THGA_GetTail",),
0x801728F0:("THGA_AllocStartArray8",),
0x80172914:("THGA_AllocStart8",),
0x80172934:("THGA_AllocStart8Wrapper",),
0x80172954:("THGA_AllocEnd",),
0x80172974:("THGA_AllocEndArray64",),
0x80172998:("THGA_AllocEnd64",),
0x801729B8:("THGA_AllocEndArray16",),
0x801729DC:("THGA_AllocEnd16",),
0x801728F0:("THGA_AllocDisplayList",),
0x80172914:("THGA_AllocGfx",),
0x80172934:("THGA_AllocGfx2",),
0x80172954:("THGA_AllocTail",),
0x80172974:("THGA_AllocMtxArray",),
0x80172998:("THGA_AllocMtx",),
0x801729B8:("THGA_AllocVtxArray",),
0x801729DC:("THGA_AllocVtx",),
0x80172A00:("THA_GetHead",),
0x80172A0C:("THA_SetHead",),
0x80172A18:("THA_GetTail",),
0x80172A24:("THA_AllocStart",),
0x80172A38:("THA_AllocStart1",),
0x80172A58:("THA_AllocEnd",),
0x80172AC8:("THA_AllocEndAlign16",),
0x80172AE8:("THA_AllocEndAlign",),
0x80172B04:("THA_GetSize",),
0x80172A24:("THA_AllocHead",),
0x80172A38:("THA_AllocHeadByte",),
0x80172A58:("THA_AllocTail",),
0x80172AC8:("THA_AllocTailAlign16",),
0x80172AE8:("THA_AllocTailAlign",),
0x80172B04:("THA_GetRemaining",),
0x80172B18:("THA_IsCrash",),
0x80172B3C:("THA_Init",),
0x80172B58:("THA_Ct",),
0x80172B9C:("THA_Dt",),
0x80172B3C:("THA_Reset",),
0x80172B58:("THA_Init",),
0x80172B9C:("THA_Destroy",),
0x80172BC0:("AudioMgr_StopAllSfxExceptSystem",),
0x80172C30:("func_80172C30",),
0x80172C68:("AudioMgr_HandleRetrace",),

View File

@ -117,6 +117,23 @@ wordReplace = {
"Actor_MarkForDeath": "Actor_Kill",
"func_800B84D0": "Actor_ProcessTalkRequest",
"func_8017D668": "Math3D_PointDistToLine2D",
"THGA_GetSize": "THGA_GetRemaining",
"THGA_AllocStartArray8": "THGA_AllocDisplayList",
"THGA_AllocStart8": "THGA_AllocGfx",
"THGA_AllocStart8Wrapper": "THGA_AllocGfx2",
"THGA_AllocEnd": "THGA_AllocTail",
"THGA_AllocEndArray64": "THGA_AllocMtxArray",
"THGA_AllocEnd64": "THGA_AllocMtx",
"THGA_AllocEndArray16": "THGA_AllocVtxArray",
"THGA_AllocEnd16": "THGA_AllocVtx",
"THA_AllocStart": "THA_AllocHead",
"THA_AllocStart1": "THA_AllocHeadByte",
"THA_AllocEnd": "THA_AllocTail",
"THA_AllocEndAlign16": "THA_AllocTailAlign16",
"THA_AllocEndAlign": "THA_AllocTailAlign",
"THA_GetSize": "THA_GetRemaining",
"func_800BDFC0": "Gfx_DrawDListOpa",
"func_800BE03C": "Gfx_DrawDListXlu",
"func_800B6FC8": "Player_GetHeight",

View File

@ -2594,35 +2594,35 @@ asm/non_matchings/code/PreRender/PreRender_ApplyFiltersSlowlyDestroy.s,PreRender
asm/non_matchings/code/PreRender/func_801720C4.s,func_801720C4,0x801720C4,0xE
asm/non_matchings/code/PreRender/func_801720FC.s,func_801720FC,0x801720FC,0x197
asm/non_matchings/code/PreRender/Prerender_DrawBackground2D.s,Prerender_DrawBackground2D,0x80172758,0x26
asm/non_matchings/code/TwoHeadGfxArena/THGA_Ct.s,THGA_Ct,0x801727F0,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_Dt.s,THGA_Dt,0x80172810,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_Init.s,THGA_Init,0x801727F0,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_Destroy.s,THGA_Destroy,0x80172810,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_IsCrash.s,THGA_IsCrash,0x80172830,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_Init.s,THGA_Init,0x80172850,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_GetSize.s,THGA_GetSize,0x80172870,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_GetRemaining.s,THGA_GetRemaining,0x80172870,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_GetHead.s,THGA_GetHead,0x80172890,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_SetHead.s,THGA_SetHead,0x801728B0,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_GetTail.s,THGA_GetTail,0x801728D0,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocStartArray8.s,THGA_AllocStartArray8,0x801728F0,0x9
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocStart8.s,THGA_AllocStart8,0x80172914,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocStart8Wrapper.s,THGA_AllocStart8Wrapper,0x80172934,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocEnd.s,THGA_AllocEnd,0x80172954,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocEndArray64.s,THGA_AllocEndArray64,0x80172974,0x9
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocEnd64.s,THGA_AllocEnd64,0x80172998,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocEndArray16.s,THGA_AllocEndArray16,0x801729B8,0x9
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocEnd16.s,THGA_AllocEnd16,0x801729DC,0x9
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocDisplayList.s,THGA_AllocDisplayList,0x801728F0,0x9
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocGfx.s,THGA_AllocGfx,0x80172914,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocGfx2.s,THGA_AllocGfx2,0x80172934,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocTail.s,THGA_AllocTail,0x80172954,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocMtxArray.s,THGA_AllocMtxArray,0x80172974,0x9
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocMtx.s,THGA_AllocMtx,0x80172998,0x8
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocVtxArray.s,THGA_AllocVtxArray,0x801729B8,0x9
asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocVtx.s,THGA_AllocVtx,0x801729DC,0x9
asm/non_matchings/code/TwoHeadArena/THA_GetHead.s,THA_GetHead,0x80172A00,0x3
asm/non_matchings/code/TwoHeadArena/THA_SetHead.s,THA_SetHead,0x80172A0C,0x3
asm/non_matchings/code/TwoHeadArena/THA_GetTail.s,THA_GetTail,0x80172A18,0x3
asm/non_matchings/code/TwoHeadArena/THA_AllocStart.s,THA_AllocStart,0x80172A24,0x5
asm/non_matchings/code/TwoHeadArena/THA_AllocStart1.s,THA_AllocStart1,0x80172A38,0x8
asm/non_matchings/code/TwoHeadArena/THA_AllocEnd.s,THA_AllocEnd,0x80172A58,0x1C
asm/non_matchings/code/TwoHeadArena/THA_AllocEndAlign16.s,THA_AllocEndAlign16,0x80172AC8,0x8
asm/non_matchings/code/TwoHeadArena/THA_AllocEndAlign.s,THA_AllocEndAlign,0x80172AE8,0x7
asm/non_matchings/code/TwoHeadArena/THA_GetSize.s,THA_GetSize,0x80172B04,0x5
asm/non_matchings/code/TwoHeadArena/THA_AllocHead.s,THA_AllocHead,0x80172A24,0x5
asm/non_matchings/code/TwoHeadArena/THA_AllocHeadByte.s,THA_AllocHeadByte,0x80172A38,0x8
asm/non_matchings/code/TwoHeadArena/THA_AllocTail.s,THA_AllocTail,0x80172A58,0x1C
asm/non_matchings/code/TwoHeadArena/THA_AllocTailAlign16.s,THA_AllocTailAlign16,0x80172AC8,0x8
asm/non_matchings/code/TwoHeadArena/THA_AllocTailAlign.s,THA_AllocTailAlign,0x80172AE8,0x7
asm/non_matchings/code/TwoHeadArena/THA_GetRemaining.s,THA_GetRemaining,0x80172B04,0x5
asm/non_matchings/code/TwoHeadArena/THA_IsCrash.s,THA_IsCrash,0x80172B18,0x9
asm/non_matchings/code/TwoHeadArena/THA_Init.s,THA_Init,0x80172B3C,0x7
asm/non_matchings/code/TwoHeadArena/THA_Ct.s,THA_Ct,0x80172B58,0x11
asm/non_matchings/code/TwoHeadArena/THA_Dt.s,THA_Dt,0x80172B9C,0x9
asm/non_matchings/code/TwoHeadArena/THA_Reset.s,THA_Reset,0x80172B3C,0x7
asm/non_matchings/code/TwoHeadArena/THA_Init.s,THA_Init,0x80172B58,0x11
asm/non_matchings/code/TwoHeadArena/THA_Destroy.s,THA_Destroy,0x80172B9C,0x9
asm/non_matchings/code/audio_stop_all_sfx/AudioMgr_StopAllSfxExceptSystem.s,AudioMgr_StopAllSfxExceptSystem,0x80172BC0,0x1C
asm/non_matchings/code/audio_thread_manager/func_80172C30.s,func_80172C30,0x80172C30,0xE
asm/non_matchings/code/audio_thread_manager/AudioMgr_HandleRetrace.s,AudioMgr_HandleRetrace,0x80172C68,0x91

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
2594 asm/non_matchings/code/PreRender/func_801720C4.s func_801720C4 0x801720C4 0xE
2595 asm/non_matchings/code/PreRender/func_801720FC.s func_801720FC 0x801720FC 0x197
2596 asm/non_matchings/code/PreRender/Prerender_DrawBackground2D.s Prerender_DrawBackground2D 0x80172758 0x26
2597 asm/non_matchings/code/TwoHeadGfxArena/THGA_Ct.s asm/non_matchings/code/TwoHeadGfxArena/THGA_Init.s THGA_Ct THGA_Init 0x801727F0 0x8
2598 asm/non_matchings/code/TwoHeadGfxArena/THGA_Dt.s asm/non_matchings/code/TwoHeadGfxArena/THGA_Destroy.s THGA_Dt THGA_Destroy 0x80172810 0x8
2599 asm/non_matchings/code/TwoHeadGfxArena/THGA_IsCrash.s THGA_IsCrash 0x80172830 0x8
2600 asm/non_matchings/code/TwoHeadGfxArena/THGA_Init.s THGA_Init 0x80172850 0x8
2601 asm/non_matchings/code/TwoHeadGfxArena/THGA_GetSize.s asm/non_matchings/code/TwoHeadGfxArena/THGA_GetRemaining.s THGA_GetSize THGA_GetRemaining 0x80172870 0x8
2602 asm/non_matchings/code/TwoHeadGfxArena/THGA_GetHead.s THGA_GetHead 0x80172890 0x8
2603 asm/non_matchings/code/TwoHeadGfxArena/THGA_SetHead.s THGA_SetHead 0x801728B0 0x8
2604 asm/non_matchings/code/TwoHeadGfxArena/THGA_GetTail.s THGA_GetTail 0x801728D0 0x8
2605 asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocStartArray8.s asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocDisplayList.s THGA_AllocStartArray8 THGA_AllocDisplayList 0x801728F0 0x9
2606 asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocStart8.s asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocGfx.s THGA_AllocStart8 THGA_AllocGfx 0x80172914 0x8
2607 asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocStart8Wrapper.s asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocGfx2.s THGA_AllocStart8Wrapper THGA_AllocGfx2 0x80172934 0x8
2608 asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocEnd.s asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocTail.s THGA_AllocEnd THGA_AllocTail 0x80172954 0x8
2609 asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocEndArray64.s asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocMtxArray.s THGA_AllocEndArray64 THGA_AllocMtxArray 0x80172974 0x9
2610 asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocEnd64.s asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocMtx.s THGA_AllocEnd64 THGA_AllocMtx 0x80172998 0x8
2611 asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocEndArray16.s asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocVtxArray.s THGA_AllocEndArray16 THGA_AllocVtxArray 0x801729B8 0x9
2612 asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocEnd16.s asm/non_matchings/code/TwoHeadGfxArena/THGA_AllocVtx.s THGA_AllocEnd16 THGA_AllocVtx 0x801729DC 0x9
2613 asm/non_matchings/code/TwoHeadArena/THA_GetHead.s THA_GetHead 0x80172A00 0x3
2614 asm/non_matchings/code/TwoHeadArena/THA_SetHead.s THA_SetHead 0x80172A0C 0x3
2615 asm/non_matchings/code/TwoHeadArena/THA_GetTail.s THA_GetTail 0x80172A18 0x3
2616 asm/non_matchings/code/TwoHeadArena/THA_AllocStart.s asm/non_matchings/code/TwoHeadArena/THA_AllocHead.s THA_AllocStart THA_AllocHead 0x80172A24 0x5
2617 asm/non_matchings/code/TwoHeadArena/THA_AllocStart1.s asm/non_matchings/code/TwoHeadArena/THA_AllocHeadByte.s THA_AllocStart1 THA_AllocHeadByte 0x80172A38 0x8
2618 asm/non_matchings/code/TwoHeadArena/THA_AllocEnd.s asm/non_matchings/code/TwoHeadArena/THA_AllocTail.s THA_AllocEnd THA_AllocTail 0x80172A58 0x1C
2619 asm/non_matchings/code/TwoHeadArena/THA_AllocEndAlign16.s asm/non_matchings/code/TwoHeadArena/THA_AllocTailAlign16.s THA_AllocEndAlign16 THA_AllocTailAlign16 0x80172AC8 0x8
2620 asm/non_matchings/code/TwoHeadArena/THA_AllocEndAlign.s asm/non_matchings/code/TwoHeadArena/THA_AllocTailAlign.s THA_AllocEndAlign THA_AllocTailAlign 0x80172AE8 0x7
2621 asm/non_matchings/code/TwoHeadArena/THA_GetSize.s asm/non_matchings/code/TwoHeadArena/THA_GetRemaining.s THA_GetSize THA_GetRemaining 0x80172B04 0x5
2622 asm/non_matchings/code/TwoHeadArena/THA_IsCrash.s THA_IsCrash 0x80172B18 0x9
2623 asm/non_matchings/code/TwoHeadArena/THA_Init.s asm/non_matchings/code/TwoHeadArena/THA_Reset.s THA_Init THA_Reset 0x80172B3C 0x7
2624 asm/non_matchings/code/TwoHeadArena/THA_Ct.s asm/non_matchings/code/TwoHeadArena/THA_Init.s THA_Ct THA_Init 0x80172B58 0x11
2625 asm/non_matchings/code/TwoHeadArena/THA_Dt.s asm/non_matchings/code/TwoHeadArena/THA_Destroy.s THA_Dt THA_Destroy 0x80172B9C 0x9
2626 asm/non_matchings/code/audio_stop_all_sfx/AudioMgr_StopAllSfxExceptSystem.s AudioMgr_StopAllSfxExceptSystem 0x80172BC0 0x1C
2627 asm/non_matchings/code/audio_thread_manager/func_80172C30.s func_80172C30 0x80172C30 0xE
2628 asm/non_matchings/code/audio_thread_manager/AudioMgr_HandleRetrace.s AudioMgr_HandleRetrace 0x80172C68 0x91