mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 06:21:16 +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
|
@ -417,8 +417,7 @@ void ObjLightswitch_DrawOpa(Actor* thisx, PlayState* play) {
|
|||
pos.z = thisx->world.pos.z;
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 841),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_obj_lightswitch.c", 841);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFaceTextures[this->faceTextureIndex]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_lightswitch_DL_000260);
|
||||
|
||||
|
@ -427,15 +426,13 @@ void ObjLightswitch_DrawOpa(Actor* thisx, PlayState* play) {
|
|||
rot.z = thisx->shape.rot.z + this->flameRingRot;
|
||||
Matrix_SetTranslateRotateYXZ(pos.x, pos.y, pos.z, &rot);
|
||||
Matrix_Scale(thisx->scale.x, thisx->scale.y, thisx->scale.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 859),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_obj_lightswitch.c", 859);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_lightswitch_DL_000398);
|
||||
|
||||
rot.z = thisx->shape.rot.z - this->flameRingRot;
|
||||
Matrix_SetTranslateRotateYXZ(pos.x, pos.y, pos.z, &rot);
|
||||
Matrix_Scale(thisx->scale.x, thisx->scale.y, thisx->scale.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 873),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_obj_lightswitch.c", 873);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_lightswitch_DL_000408);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_obj_lightswitch.c", 878);
|
||||
|
@ -457,8 +454,7 @@ void ObjLightswitch_DrawXlu(Actor* thisx, PlayState* play) {
|
|||
sp68.y = thisx->world.pos.y + (thisx->shape.yOffset * thisx->scale.y);
|
||||
sp68.z = thisx->world.pos.z;
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 912),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_obj_lightswitch.c", 912);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFaceTextures[this->faceTextureIndex]));
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_lightswitch_DL_000260);
|
||||
|
||||
|
@ -468,15 +464,13 @@ void ObjLightswitch_DrawXlu(Actor* thisx, PlayState* play) {
|
|||
|
||||
Matrix_SetTranslateRotateYXZ(sp68.x, sp68.y, sp68.z, &sp60);
|
||||
Matrix_Scale(thisx->scale.x, thisx->scale.y, thisx->scale.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 930),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_obj_lightswitch.c", 930);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_lightswitch_DL_000398);
|
||||
|
||||
sp60.z = thisx->shape.rot.z - this->flameRingRot;
|
||||
Matrix_SetTranslateRotateYXZ(sp68.x, sp68.y, sp68.z, &sp60);
|
||||
Matrix_Scale(thisx->scale.x, thisx->scale.y, thisx->scale.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_lightswitch.c", 944),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_obj_lightswitch.c", 944);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_lightswitch_DL_000408);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_obj_lightswitch.c", 949);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue