summaryrefslogtreecommitdiff
path: root/src/code/z_player_lib.c
diff options
context:
space:
mode:
authorcadmic <cadmic24@gmail.com>2024-01-09 04:59:03 -0800
committerGitHub <noreply@github.com>2024-01-09 07:59:03 -0500
commitcd917b0cb8c20e457d43805ee27d2597daed63e3 (patch)
tree6506a87bb08252072ca10e6993f64f2b475fca09 /src/code/z_player_lib.c
parente146d7bc2642633f8b09357c115014a3dfca59da (diff)
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
Diffstat (limited to 'src/code/z_player_lib.c')
-rw-r--r--src/code/z_player_lib.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index feee098ca..7a7d9c366 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -1368,7 +1368,7 @@ void Player_DrawHookshotReticle(PlayState* play, Player* this, f32 arg2) {
Matrix_Translate(sp74.x, sp74.y, sp74.z, MTXMODE_NEW);
Matrix_Scale(sp60, sp60, sp60, MTXMODE_APPLY);
- gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_player_lib.c", 2587),
+ gSPMatrix(OVERLAY_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_player_lib.c", 2587),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(OVERLAY_DISP++, 0x06, play->objectCtx.slots[this->actor.objectSlot].segment);
gSPDisplayList(OVERLAY_DISP++, gLinkAdultHookshotReticleDL);
@@ -1475,7 +1475,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_RotateZYX(-0x8000, 0, 0x4000, MTXMODE_APPLY);
Matrix_Scale(1.0f, this->unk_85C, 1.0f, MTXMODE_APPLY);
- gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_player_lib.c", 2653),
+ gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_player_lib.c", 2653),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gLinkChildLinkDekuStickDL);
@@ -1496,7 +1496,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
OPEN_DISPS(play->state.gfxCtx, "../z_player_lib.c", 2710);
- gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_player_lib.c", 2712),
+ gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_player_lib.c", 2712),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetEnvColor(POLY_XLU_DISP++, bottleColor->r, bottleColor->g, bottleColor->b, 0);
gSPDisplayList(POLY_XLU_DISP++, sBottleDLists[((void)0, gSaveContext.save.linkAge)]);
@@ -1569,7 +1569,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_RotateZ(this->unk_858 * -0.2f, MTXMODE_APPLY);
}
- gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_player_lib.c", 2804),
+ gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_player_lib.c", 2804),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, stringData->dList);
@@ -1648,11 +1648,11 @@ u32 Player_InitPauseDrawData(PlayState* play, u8* segment, SkelAnime* skelAnime)
size = gObjectTable[OBJECT_GAMEPLAY_KEEP].vromEnd - gObjectTable[OBJECT_GAMEPLAY_KEEP].vromStart;
ptr = segment + PAUSE_EQUIP_BUFFER_SIZE;
- DmaMgr_RequestSyncDebug(ptr, gObjectTable[OBJECT_GAMEPLAY_KEEP].vromStart, size, "../z_player_lib.c", 2982);
+ DMA_REQUEST_SYNC(ptr, gObjectTable[OBJECT_GAMEPLAY_KEEP].vromStart, size, "../z_player_lib.c", 2982);
size = gObjectTable[linkObjectId].vromEnd - gObjectTable[linkObjectId].vromStart;
ptr = segment + PAUSE_EQUIP_BUFFER_SIZE + PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE;
- DmaMgr_RequestSyncDebug(ptr, gObjectTable[linkObjectId].vromStart, size, "../z_player_lib.c", 2988);
+ DMA_REQUEST_SYNC(ptr, gObjectTable[linkObjectId].vromStart, size, "../z_player_lib.c", 2988);
ptr = (void*)ALIGN16((uintptr_t)ptr + size);
@@ -1728,8 +1728,8 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject,
Gfx* opaRef;
Gfx* xluRef;
u16 perspNorm;
- Mtx* perspMtx = Graph_Alloc(play->state.gfxCtx, sizeof(Mtx));
- Mtx* lookAtMtx = Graph_Alloc(play->state.gfxCtx, sizeof(Mtx));
+ Mtx* perspMtx = GRAPH_ALLOC(play->state.gfxCtx, sizeof(Mtx));
+ Mtx* lookAtMtx = GRAPH_ALLOC(play->state.gfxCtx, sizeof(Mtx));
OPEN_DISPS(play->state.gfxCtx, "../z_player_lib.c", 3129);