1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-06 16:04:35 +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:
Dragorn421 2024-09-11 09:59:23 +02:00 committed by GitHub
parent 2e79b83bb8
commit 5441559b30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
268 changed files with 702 additions and 1272 deletions

View file

@ -3005,7 +3005,7 @@ void Interface_DrawActionButton(PlayState* play) {
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
Matrix_RotateX(interfaceCtx->unk_1F4 / 10000.0f, MTXMODE_APPLY);
gSPMatrix(OVERLAY_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_parameter.c", 3177), G_MTX_MODELVIEW | G_MTX_LOAD);
MATRIX_FINALIZE_AND_LOAD(OVERLAY_DISP++, play->state.gfxCtx, "../z_parameter.c", 3177);
gSPVertex(OVERLAY_DISP++, &interfaceCtx->actionVtx[0], 4, 0);
gDPLoadTextureBlock(OVERLAY_DISP++, gButtonBackgroundTex, G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0,
@ -3372,8 +3372,7 @@ void Interface_Draw(PlayState* play) {
Matrix_Translate(0.0f, 0.0f, R_A_LABEL_Z(gSaveContext.language) / 10.0f, MTXMODE_NEW);
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
Matrix_RotateX(interfaceCtx->unk_1F4 / 10000.0f, MTXMODE_APPLY);
gSPMatrix(OVERLAY_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_parameter.c", 3701),
G_MTX_MODELVIEW | G_MTX_LOAD);
MATRIX_FINALIZE_AND_LOAD(OVERLAY_DISP++, play->state.gfxCtx, "../z_parameter.c", 3701);
gSPVertex(OVERLAY_DISP++, &interfaceCtx->actionVtx[4], 4, 0);
if ((interfaceCtx->unk_1EC < 2) || (interfaceCtx->unk_1EC == 3)) {
@ -3391,7 +3390,7 @@ void Interface_Draw(PlayState* play) {
gSPSegment(OVERLAY_DISP++, 0x08, pauseCtx->iconItemSegment);
Gfx_SetupDL_42Overlay(play->state.gfxCtx);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
// PAUSE_QUAD_CURSOR_4
pauseCtx->cursorVtx[16].v.ob[0] = pauseCtx->cursorVtx[18].v.ob[0] = pauseCtx->equipAnimX / 10;