1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 22:41:14 +00:00

Add enum for setup dls and name z_rcp.c functions (#1196)

* Introduce `SetupDL` enum

* wip

* wip

* Remove comments on each setupdl index

* Name setup dl functions by setupdl index

* `Gfx_SetupDl` -> `Gfx_SetupDL`

* Run formatter

* globalctx -> play

* fix regressions

* `Gfx_SetupDL` -> `Gfx_SetupDL_` (add separating underscore)

* `CallSetupDL` -> `SetupDL`
This commit is contained in:
Dragorn421 2022-06-03 15:25:48 -07:00 committed by GitHub
parent 4775fd4a7e
commit 1a41694d58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
376 changed files with 1047 additions and 971 deletions

View file

@ -492,7 +492,7 @@ void ObjectKankyo_DrawFairies(ObjectKankyo* this2, PlayState* play2) {
if (!(play->cameraPtrs[CAM_ID_MAIN]->unk_14C & 0x100)) {
OPEN_DISPS(play->state.gfxCtx, "../z_object_kankyo.c", 807);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_20);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gSun1Tex));
gSPDisplayList(POLY_XLU_DISP++, gKokiriDustMoteMaterialDL);
@ -693,7 +693,7 @@ void ObjectKankyo_DrawSnow(ObjectKankyo* this2, PlayState* play2) {
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gDust5Tex));
func_80094C50(play->state.gfxCtx);
Gfx_SetupDL_61Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &D_01000000, G_MTX_MODELVIEW | G_MTX_NOPUSH | G_MTX_MUL);
gDPPipeSync(POLY_XLU_DISP++);
@ -748,7 +748,7 @@ void ObjectKankyo_DrawLightning(ObjectKankyo* this, PlayState* play) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 255, 255, 128);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_object_kankyo.c", 1213), G_MTX_LOAD);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEffLightningTextures[this->effects[0].timer]));
func_80094C50(play->state.gfxCtx);
Gfx_SetupDL_61Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &D_01000000, G_MTX_MODELVIEW | G_MTX_NOPUSH | G_MTX_MUL);
gDPPipeSync(POLY_XLU_DISP++);
gSPDisplayList(POLY_XLU_DISP++, gEffLightningDL);
@ -835,7 +835,7 @@ void ObjectKankyo_DrawSunGraveSpark(ObjectKankyo* this2, PlayState* play2) {
Matrix_Translate((end.x - start.x) * weight + start.x, (end.y - start.y) * weight + start.y,
(end.z - start.z) * weight + start.z, MTXMODE_NEW);
Matrix_Scale(this->effects[0].size, this->effects[0].size, this->effects[0].size, MTXMODE_APPLY);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (u8)(105 * this->effects[0].amplitude) + 150, 255,
(u8)(105 * this->effects[0].amplitude) + 150, this->effects[0].alpha);
@ -917,7 +917,7 @@ void ObjectKankyo_DrawBeams(ObjectKankyo* this2, PlayState* play2) {
Matrix_RotateY(DEG_TO_RAD(beamYaw[i]), MTXMODE_APPLY);
Matrix_RotateX(DEG_TO_RAD(beamPitch[i]), MTXMODE_APPLY);
Matrix_Scale(this->effects[i].size, 0.1f, this->effects[i].size, MTXMODE_APPLY);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, sBeamPrimColors[i].r, sBeamPrimColors[i].g,
sBeamPrimColors[i].b, 128);