1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-16 12:02:50 +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

@ -419,7 +419,7 @@ void ObjLightswitch_DrawOpa(ObjLightswitch* this, PlayState* play) {
pos.z = this->actor.world.pos.z;
}
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_obj_lightswitch.c", 841),
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 841),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFaceTextures[this->faceTextureIndex]));
gSPDisplayList(POLY_OPA_DISP++, object_lightswitch_DL_000260);
@ -429,14 +429,14 @@ void ObjLightswitch_DrawOpa(ObjLightswitch* this, PlayState* play) {
rot.z = this->actor.shape.rot.z + this->flameRingRot;
Matrix_SetTranslateRotateYXZ(pos.x, pos.y, pos.z, &rot);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_obj_lightswitch.c", 859),
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 859),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, object_lightswitch_DL_000398);
rot.z = this->actor.shape.rot.z - this->flameRingRot;
Matrix_SetTranslateRotateYXZ(pos.x, pos.y, pos.z, &rot);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_obj_lightswitch.c", 873),
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 873),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, object_lightswitch_DL_000408);
@ -459,7 +459,7 @@ void ObjLightswitch_DrawXlu(ObjLightswitch* this, PlayState* play) {
sp68.y = this->actor.world.pos.y + (this->actor.shape.yOffset * this->actor.scale.y);
sp68.z = this->actor.world.pos.z;
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_obj_lightswitch.c", 912),
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 912),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFaceTextures[this->faceTextureIndex]));
gSPDisplayList(POLY_XLU_DISP++, object_lightswitch_DL_000260);
@ -470,14 +470,14 @@ void ObjLightswitch_DrawXlu(ObjLightswitch* this, PlayState* play) {
Matrix_SetTranslateRotateYXZ(sp68.x, sp68.y, sp68.z, &sp60);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_obj_lightswitch.c", 930),
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 930),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, object_lightswitch_DL_000398);
sp60.z = this->actor.shape.rot.z - this->flameRingRot;
Matrix_SetTranslateRotateYXZ(sp68.x, sp68.y, sp68.z, &sp60);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_obj_lightswitch.c", 944),
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 944),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, object_lightswitch_DL_000408);