1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-06 07:56:32 +00:00

Create debug macros for common functions (#1597)

* Create debug macros for common functions

* Revert NDEBUG change

* MALLOCR -> MALLOC_R

* DEBUG -> OOT_DEBUG

* Use the same name for debug and non-debug matrix functions

* Fix file/line argument order

* Revert g[s]DPNoOp[Tag]

* Use SystemArena_MallocDebug directly in GameAlloc_MallocDebug

* MTXF_TO_MTX -> MATRIX_TO_MTX
This commit is contained in:
cadmic 2024-01-09 04:59:03 -08:00 committed by GitHub
parent e146d7bc26
commit cd917b0cb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
314 changed files with 1352 additions and 1294 deletions

View file

@ -29,7 +29,7 @@ void* GameAlloc_MallocDebug(GameAlloc* this, u32 size, const char* file, s32 lin
}
void* GameAlloc_Malloc(GameAlloc* this, u32 size) {
GameAllocEntry* ptr = SystemArena_MallocDebug(size + sizeof(GameAllocEntry), "../gamealloc.c", 93);
GameAllocEntry* ptr = SYSTEM_ARENA_MALLOC(size + sizeof(GameAllocEntry), "../gamealloc.c", 93);
if (ptr != NULL) {
ptr->size = size;
@ -54,7 +54,7 @@ void GameAlloc_Free(GameAlloc* this, void* data) {
ptr->prev->next = ptr->next;
ptr->next->prev = ptr->prev;
this->head = this->base.prev;
SystemArena_FreeDebug(ptr, "../gamealloc.c", 125);
SYSTEM_ARENA_FREE(ptr, "../gamealloc.c", 125);
}
}
@ -65,7 +65,7 @@ void GameAlloc_Cleanup(GameAlloc* this) {
while (&this->base != next) {
cur = next;
next = next->next;
SystemArena_FreeDebug(cur, "../gamealloc.c", 145);
SYSTEM_ARENA_FREE(cur, "../gamealloc.c", 145);
}
this->head = &this->base;