summaryrefslogtreecommitdiff
path: root/src/code/z_draw.c
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2024-09-11 09:59:23 +0200
committerGitHub <noreply@github.com>2024-09-11 16:59:23 +0900
commit5441559b30d4419eb25e77abc4ff2eb1f34027aa (patch)
tree0ee031e4e2bba3ec1806b547d9df639cc6428a61 /src/code/z_draw.c
parent2e79b83bb81b1fd65a12a2b2a018de27271611a0 (diff)
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
Diffstat (limited to 'src/code/z_draw.c')
-rw-r--r--src/code/z_draw.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/code/z_draw.c b/src/code/z_draw.c
index b4ecd2ffa..89b49faf4 100644
--- a/src/code/z_draw.c
+++ b/src/code/z_draw.c
@@ -385,7 +385,7 @@ void GetItem_DrawMaskOrBombchu(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 556);
Gfx_SetupDL_26Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 560), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 560);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 565);
@@ -397,7 +397,7 @@ void GetItem_DrawSoldOut(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 572);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_5);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 576), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 576);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 581);
@@ -409,7 +409,7 @@ void GetItem_DrawBlueFire(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 588);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 592), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 592);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
@@ -420,7 +420,7 @@ void GetItem_DrawBlueFire(PlayState* play, s16 drawId) {
Matrix_Push();
Matrix_Translate(-8.0f, -2.0f, 0.0f, MTXMODE_APPLY);
Matrix_ReplaceRotation(&play->billboardMtxF);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 615), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 615);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
Matrix_Pop();
@@ -433,11 +433,11 @@ void GetItem_DrawPoes(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 628);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 632), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 632);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 641), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 641);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0 * (play->state.frames * 0),
@@ -445,7 +445,7 @@ void GetItem_DrawPoes(PlayState* play, s16 drawId) {
1 * -(play->state.frames * 6), 16, 32));
Matrix_Push();
Matrix_ReplaceRotation(&play->billboardMtxF);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 656), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 656);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
Matrix_Pop();
@@ -459,11 +459,11 @@ void GetItem_DrawFairy(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 670);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 674), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 674);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 683), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 683);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0 * (play->state.frames * 0),
@@ -471,7 +471,7 @@ void GetItem_DrawFairy(PlayState* play, s16 drawId) {
1 * -(play->state.frames * 6), 32, 32));
Matrix_Push();
Matrix_ReplaceRotation(&play->billboardMtxF);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 698), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 698);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
Matrix_Pop();
@@ -488,11 +488,11 @@ void GetItem_DrawMirrorShield(PlayState* play, s16 drawId) {
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0 * (play->state.frames * 0) % 256,
1 * (play->state.frames * 2) % 256, 64, 64, 1, 0 * (play->state.frames * 0) % 128,
1 * (play->state.frames * 1) % 128, 32, 32));
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 723), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 723);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 730), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 730);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 735);
@@ -504,7 +504,7 @@ void GetItem_DrawSkullToken(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 742);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 746), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 746);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
@@ -512,7 +512,7 @@ void GetItem_DrawSkullToken(PlayState* play, s16 drawId) {
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0 * (play->state.frames * 0),
1 * -(play->state.frames * 5), 32, 32, 1, 0 * (play->state.frames * 0),
0 * (play->state.frames * 0), 32, 64));
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 760), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 760);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 765);
@@ -524,7 +524,7 @@ void GetItem_DrawEggOrMedallion(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 772);
Gfx_SetupDL_26Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 776), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 776);
gSPDisplayList(POLY_OPA_DISP++, entry->dlists[0]);
gSPDisplayList(POLY_OPA_DISP++, entry->dlists[1]);
@@ -537,11 +537,11 @@ void GetItem_DrawCompass(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 811);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 815), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 815);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_5);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 822), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 822);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 827);
@@ -557,14 +557,14 @@ void GetItem_DrawPotion(PlayState* play, s16 drawId) {
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -1 * (play->state.frames * 1),
1 * (play->state.frames * 1), 32, 32, 1, -1 * (play->state.frames * 1),
1 * (play->state.frames * 1), 32, 32));
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 845), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 845);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[3]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 855), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 855);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[4]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[5]);
@@ -581,7 +581,7 @@ void GetItem_DrawGoronSword(PlayState* play, s16 drawId) {
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 1 * (play->state.frames * 1),
0 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 1),
0 * (play->state.frames * 1), 32, 32));
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 878), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 878);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 883);
@@ -597,7 +597,7 @@ void GetItem_DrawDekuNuts(PlayState* play, s16 drawId) {
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 1 * (play->state.frames * 6),
1 * (play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 6),
1 * (play->state.frames * 6), 32, 32));
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 901), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 901);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 906);
@@ -613,7 +613,7 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 drawId) {
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0 * (play->state.frames * 1),
1 * -(play->state.frames * 3), 32, 32, 1, 0 * (play->state.frames * 1),
1 * -(play->state.frames * 2), 32, 32));
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 924), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 924);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 929);
@@ -629,7 +629,7 @@ void GetItem_DrawFish(PlayState* play, s16 drawId) {
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0 * (play->state.frames * 0),
1 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 0),
1 * (play->state.frames * 1), 32, 32));
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 947), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 947);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 952);
@@ -641,7 +641,7 @@ void GetItem_DrawOpa0(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 959);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 963), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 963);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 968);
@@ -653,11 +653,11 @@ void GetItem_DrawOpa0Xlu1(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 975);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 979), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 979);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 986), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 986);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 991);
@@ -669,7 +669,7 @@ void GetItem_DrawXlu01(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 998);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1002), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 1002);
gSPDisplayList(POLY_XLU_DISP++, entry->dlists[0]);
gSPDisplayList(POLY_XLU_DISP++, entry->dlists[1]);
@@ -682,12 +682,12 @@ void GetItem_DrawOpa10Xlu2(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1015);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1019), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 1019);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1027), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 1027);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
CLOSE_DISPS(play->state.gfxCtx, "../z_draw.c", 1032);
@@ -699,11 +699,11 @@ void GetItem_DrawMagicArrow(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1039);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1043), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 1043);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1050), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 1050);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
@@ -720,7 +720,7 @@ void GetItem_DrawMagicSpell(PlayState* play, s16 drawId) {
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 1 * (play->state.frames * 2),
1 * -(play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 1),
-1 * (play->state.frames * 2), 32, 32));
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1074), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 1074);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
@@ -734,7 +734,7 @@ void GetItem_DrawOpa1023(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1088);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1092), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 1092);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]);
@@ -749,12 +749,12 @@ void GetItem_DrawOpa10Xlu32(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1108);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1112), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 1112);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1120), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 1120);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
@@ -769,12 +769,12 @@ void GetItem_DrawSmallRupee(PlayState* play, s16 drawId) {
Matrix_Scale(0.7f, 0.7f, 0.7f, MTXMODE_APPLY);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1140), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 1140);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1148), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 1148);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
@@ -791,7 +791,7 @@ void GetItem_DrawScale(PlayState* play, s16 drawId) {
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 1 * (play->state.frames * 2),
-1 * (play->state.frames * 2), 64, 64, 1, 1 * (play->state.frames * 4),
1 * -(play->state.frames * 4), 32, 32));
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1173), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 1173);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@@ -806,12 +806,12 @@ void GetItem_DrawBulletBag(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1188);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1192), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 1192);
gSPDisplayList(POLY_OPA_DISP++, entry->dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, entry->dlists[0]);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1200), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_draw.c", 1200);
gSPDisplayList(POLY_XLU_DISP++, entry->dlists[2]);
gSPDisplayList(POLY_XLU_DISP++, entry->dlists[3]);
gSPDisplayList(POLY_XLU_DISP++, entry->dlists[4]);
@@ -825,7 +825,7 @@ void GetItem_DrawWallet(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1214);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_draw.c", 1218), G_MTX_MODELVIEW | G_MTX_LOAD);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_draw.c", 1218);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]);