mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +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
|
@ -581,8 +581,7 @@ void func_80967FFC(Actor* thisx, PlayState* play) {
|
|||
|
||||
for (i = 0, j = 0; i < 6; i++, j += 2) {
|
||||
Matrix_RotateZ(M_PI / 3, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_demo_6k.c", 1115),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_demo_6k.c", 1115);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, colors[j + 0].r, colors[j + 0].g, colors[j + 0].b, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, colors[j + 1].r, colors[j + 1].g, colors[j + 1].b, 255);
|
||||
|
@ -624,8 +623,7 @@ void func_80968298(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
Matrix_RotateX(-M_PI / 2, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_demo_6k.c", 1170),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_demo_6k.c", 1170);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 210, 210, 210, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 100, 100, 255);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
|
@ -634,8 +632,7 @@ void func_80968298(Actor* thisx, PlayState* play) {
|
|||
(timer1 * 12) & 0xFFF, 64, 32));
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_demo_6k_DL_0039D0);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_demo_6k.c", 1189),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_demo_6k.c", 1189);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 50, 50, 50, 255);
|
||||
|
@ -665,13 +662,11 @@ void func_8096865C(Actor* thisx, PlayState* play) {
|
|||
Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_RotateZ(DEG_TO_RAD(this->timer2 * 6), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_demo_6k.c", 1230),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_demo_6k.c", 1230);
|
||||
gSPDisplayList(POLY_XLU_DISP++, displayList);
|
||||
Matrix_Pop();
|
||||
Matrix_RotateZ(DEG_TO_RAD(-(f32)(this->timer2 * 6)), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_demo_6k.c", 1236),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_demo_6k.c", 1236);
|
||||
gSPDisplayList(POLY_XLU_DISP++, displayList);
|
||||
}
|
||||
|
||||
|
@ -702,8 +697,7 @@ void func_809688C4(Actor* thisx, PlayState* play2) {
|
|||
this->unk_234[i] * D_8096931C[(frames + i) & 3],
|
||||
this->unk_234[i] * D_8096931C[(frames + i) & 3], MTXMODE_APPLY);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_demo_6k.c", 1297),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_demo_6k.c", 1297);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
@ -726,8 +720,7 @@ void func_80968B70(Actor* thisx, PlayState* play) {
|
|||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_RotateX(M_PI / 2, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_demo_6k.c", 1322),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_demo_6k.c", 1322);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0xFF - ((timer2 * 2) & 0xFF), 0, 32, 32, 1,
|
||||
0xFF - ((timer2 * 2) & 0xFF), (timer2 * 15) & 0x3FF, 16, 64));
|
||||
|
@ -775,8 +768,7 @@ void func_80968FB0(Actor* thisx, PlayState* play) {
|
|||
scaleFactor = ((s16)D_809693CC[(frames * 4) & 0xF] * 0.01f) + 1.0f;
|
||||
Matrix_Scale(this->actor.scale.x * scaleFactor, this->actor.scale.y * scaleFactor,
|
||||
this->actor.scale.z * scaleFactor, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_demo_6k.c", 1394),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_demo_6k.c", 1394);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, displayList);
|
||||
gDPPipeSync(displayList++);
|
||||
gDPSetPrimColor(displayList++, 0, 0x80, 255, 255, 255, this->unk_293);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue