1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 07:21:19 +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

@ -472,8 +472,7 @@ Gfx* EnBombf_NewMtxDList(GraphicsContext* gfxCtx, PlayState* play) {
displayList = GRAPH_ALLOC(gfxCtx, 5 * sizeof(Gfx));
displayListHead = displayList;
Matrix_ReplaceRotation(&play->billboardMtxF);
gSPMatrix(displayListHead++, MATRIX_NEW(gfxCtx, "../z_en_bombf.c", 1021),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
MATRIX_FINALIZE_AND_LOAD(displayListHead++, gfxCtx, "../z_en_bombf.c", 1021);
gSPEndDisplayList(displayListHead++);
return displayList;
}
@ -488,8 +487,7 @@ void EnBombf_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
if (thisx->params != BOMBFLOWER_BODY) {
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_en_bombf.c", 1041),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_en_bombf.c", 1041);
gSPDisplayList(POLY_OPA_DISP++, gBombFlowerLeavesDL);
gSPDisplayList(POLY_OPA_DISP++, gBombFlowerBaseLeavesDL);
@ -500,8 +498,7 @@ void EnBombf_Draw(Actor* thisx, PlayState* play) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 200, 255, 200, 255);
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, (s16)this->flashIntensity, 20, 10, 0);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_en_bombf.c", 1054),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_en_bombf.c", 1054);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(EnBombf_NewMtxDList(play->state.gfxCtx, play)));
gSPDisplayList(POLY_OPA_DISP++, gBombFlowerBombAndSparkDL);
} else {