mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 03:14:38 +00:00
Cleanup gSPMatrix, rename Matrix_New
-> Matrix_Finalize
, add MATRIX_FINALIZE_AND_LOAD
(#1983)
* clean up gSPMatrix usage * add weird hybrid macro gSPMATRIX_SET_NEW * Matrix_NewMtx, MATRIX_NEW -> Matrix_Finalize, MATRIX_FINALIZE * gSPMATRIX_SET_NEW -> MATRIX_FINALIZE_AND_LOAD * format
This commit is contained in:
parent
2e79b83bb8
commit
5441559b30
268 changed files with 702 additions and 1272 deletions
|
@ -71,7 +71,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, PlayState* play, Gfx* dlist,
|
|||
temp2 = (1.0f - (temp1 * (1.0f / 350))) * actor->shape.shadowScale;
|
||||
Matrix_Scale(actor->scale.x * temp2, 1.0f, actor->scale.z * temp2, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 1588), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_actor.c", 1588);
|
||||
gSPDisplayList(POLY_OPA_DISP++, dlist);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_actor.c", 1594);
|
||||
|
@ -109,7 +109,7 @@ void ActorShadow_DrawFoot(PlayState* play, Light* light, MtxF* arg2, s32 arg3, f
|
|||
Matrix_RotateY(sp58, MTXMODE_APPLY);
|
||||
Matrix_Scale(arg5, 1.0f, arg5 * arg6, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 1687), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_actor.c", 1687);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFootShadowDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_actor.c", 1693);
|
||||
|
@ -414,8 +414,7 @@ void Attention_Draw(Attention* attention, PlayState* play) {
|
|||
Matrix_RotateZ(M_PI / 2, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_Translate(reticle->radius, reticle->radius, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(OVERLAY_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 2116),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
MATRIX_FINALIZE_AND_LOAD(OVERLAY_DISP++, play->state.gfxCtx, "../z_actor.c", 2116);
|
||||
gSPDisplayList(OVERLAY_DISP++, gLockOnReticleTriangleDL);
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
@ -444,7 +443,7 @@ void Attention_Draw(Attention* attention, PlayState* play) {
|
|||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, attentionColor->primary.r, attentionColor->primary.g,
|
||||
attentionColor->primary.b, 255);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 2153), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_actor.c", 2153);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gLockOnArrowDL);
|
||||
}
|
||||
|
||||
|
@ -2188,15 +2187,13 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 200, 0, 255);
|
||||
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT2((play->gameplayFrames * 1500) & 0xFFFF), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 5458),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_actor.c", 5458);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
|
||||
|
||||
Matrix_Pop();
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT2(~((play->gameplayFrames * 1200) & 0xFFFF)), MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 5463),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_actor.c", 5463);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
|
||||
}
|
||||
|
||||
|
@ -3857,7 +3854,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) {
|
|||
|
||||
Matrix_Scale(arg1->x, 1.0f, arg1->z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 8149), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_actor.c", 8149);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gCircleShadowDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_actor.c", 8155);
|
||||
|
@ -3949,8 +3946,7 @@ void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type) {
|
|||
Matrix_Scale(entry->chainsScale, entry->chainsScale, entry->chainsScale, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 8299),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_actor.c", 8299);
|
||||
gSPDisplayList(POLY_OPA_DISP++, entry->chainDL);
|
||||
|
||||
if (i % 2) {
|
||||
|
@ -3966,7 +3962,7 @@ void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type) {
|
|||
Matrix_Put(&baseMtxF);
|
||||
Matrix_Scale(frame * 0.1f, frame * 0.1f, frame * 0.1f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 8314), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_actor.c", 8314);
|
||||
gSPDisplayList(POLY_OPA_DISP++, entry->lockDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_actor.c", 8319);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue