mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +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:
parent
e146d7bc26
commit
cd917b0cb8
314 changed files with 1352 additions and 1294 deletions
|
@ -2434,7 +2434,7 @@ void BossMo_DrawTentacle(BossMo* this, PlayState* play) {
|
|||
s16 i;
|
||||
s16 notCut;
|
||||
s16 index;
|
||||
Mtx* matrix = Graph_Alloc(play->state.gfxCtx, 41 * sizeof(Mtx));
|
||||
Mtx* matrix = GRAPH_ALLOC(play->state.gfxCtx, 41 * sizeof(Mtx));
|
||||
f32 phi_f20;
|
||||
f32 phi_f22;
|
||||
Vec3f sp110;
|
||||
|
@ -2489,7 +2489,7 @@ void BossMo_DrawTentacle(BossMo* this, PlayState* play) {
|
|||
MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_RotateX(M_PI / 2.0f, MTXMODE_APPLY);
|
||||
Matrix_ToMtx(matrix, "../z_boss_mo.c", 6452);
|
||||
MATRIX_TO_MTX(matrix, "../z_boss_mo.c", 6452);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, matrix, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
|
@ -2522,7 +2522,7 @@ void BossMo_DrawTentacle(BossMo* this, PlayState* play) {
|
|||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(phi_f22, phi_f22, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_mo.c", 6511),
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_boss_mo.c", 6511),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gMorphaBubbleDL);
|
||||
|
@ -2582,7 +2582,7 @@ void BossMo_DrawWater(BossMo* this, PlayState* play) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, 80);
|
||||
|
||||
Matrix_Scale(0.5f, 1.0f, 0.5f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_mo.c", 6675),
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_boss_mo.c", 6675),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gMorphaWaterDL);
|
||||
|
@ -2613,7 +2613,7 @@ void BossMo_DrawCore(Actor* thisx, PlayState* play) {
|
|||
|
||||
Matrix_RotateX(this->work[MO_TENT_MOVE_TIMER] * 0.5f, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->work[MO_TENT_MOVE_TIMER] * 0.8f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_mo.c", 6735),
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_boss_mo.c", 6735),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, (s8)this->baseAlpha);
|
||||
|
@ -2651,7 +2651,7 @@ void BossMo_DrawCore(Actor* thisx, PlayState* play) {
|
|||
|
||||
Matrix_Translate(this->actor.world.pos.x, groundLevel, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(0.23f, 1.0f, 0.23f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_mo.c", 6820),
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_boss_mo.c", 6820),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gCircleShadowDL));
|
||||
|
@ -2709,7 +2709,7 @@ void BossMo_DrawCore(Actor* thisx, PlayState* play) {
|
|||
Matrix_RotateX(M_PI / 2.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.05f, 1.0f, 0.05f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_mo.c", 6941),
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_boss_mo.c", 6941),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gMorphaWaterDL);
|
||||
|
@ -2923,7 +2923,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, PlayState* play) {
|
|||
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(effect->scale, 1.0f, effect->scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_mo.c", 7294),
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(gfxCtx, "../z_boss_mo.c", 7294),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffWaterRippleDL);
|
||||
|
@ -2946,7 +2946,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, PlayState* play) {
|
|||
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(effect->scale, 1.0f, effect->scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_mo.c", 7330),
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(gfxCtx, "../z_boss_mo.c", 7330),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffShockwaveDL);
|
||||
|
@ -2975,7 +2975,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, PlayState* play) {
|
|||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(effect->scale / effect->fwork[MO_FX_STRETCH], effect->fwork[MO_FX_STRETCH] * effect->scale,
|
||||
1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_mo.c", 7373),
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(gfxCtx, "../z_boss_mo.c", 7373),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gMorphaDropletModelDL);
|
||||
|
@ -3001,7 +3001,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, PlayState* play) {
|
|||
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(effect->scale, 1.0f, effect->scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_mo.c", 7441),
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(gfxCtx, "../z_boss_mo.c", 7441),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gMorphaWetSpotModelDL);
|
||||
|
@ -3025,7 +3025,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, PlayState* play) {
|
|||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_mo.c", 7476),
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(gfxCtx, "../z_boss_mo.c", 7476),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gMorphaBubbleDL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue