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

@ -3343,7 +3343,7 @@ void BossGanon_DrawShock(BossGanon* this, PlayState* play) {
OPEN_DISPS(gfxCtx, "../z_boss_ganon.c", 7350);
if ((this->unk_2E8 != 0) || (this->unk_2E6 != 0)) {
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightBallMaterialDL);
@ -3399,7 +3399,7 @@ void BossGanon_DrawHandLightBall(BossGanon* this, PlayState* play) {
OPEN_DISPS(gfxCtx, "../z_boss_ganon.c", 7476);
if (this->handLightBallScale > 0.0f) {
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
if ((this->unk_1A2 % 2) != 0) {
@ -3440,7 +3440,7 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, PlayState* play) {
OPEN_DISPS(gfxCtx, "../z_boss_ganon.c", 7548);
if (this->unk_284 > 0.0f) {
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
// light flecks
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, (s8)this->unk_290);
@ -3754,7 +3754,7 @@ void BossGanon_DrawShadowTexture(void* tex, BossGanon* this, PlayState* play) {
OPEN_DISPS(gfxCtx, "../z_boss_ganon.c", 8372);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, 50);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
@ -3785,8 +3785,8 @@ void BossGanon_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 9138);
func_80093D18(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
if ((this->unk_1A6 & 2) != 0) {
POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, 255, 50, 0, 0, 900, 1099);
@ -4127,7 +4127,7 @@ void BossGanon_LightBall_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 9849);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
alpha = ((this->unk_1A2 % 2) != 0) ? this->fwork[GDF_FWORK_1] * 0.4f : this->fwork[GDF_FWORK_1] * 0.35f;
@ -4273,7 +4273,7 @@ void func_808E229C(Actor* thisx, PlayState* play2) {
s32 temp;
OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 10081);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0);
gSPDisplayList(POLY_XLU_DISP++, gDorfLightBallMaterialDL);
@ -4556,7 +4556,7 @@ void func_808E324C(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon.c", 10489);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, (s8)this->fwork[GDF_FWORK_1]);
gDPSetEnvColor(POLY_XLU_DISP++, 150, 255, 0, 128);
gSPSegment(POLY_XLU_DISP++, 0x0D, mtx);
@ -4811,7 +4811,7 @@ void BossGanon_DrawEffects(PlayState* play) {
GanondorfEffect* effFirst = eff;
OPEN_DISPS(gfxCtx, "../z_boss_ganon.c", 10865);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
for (i = 0; i < 200; i++, eff++) {
if (eff->type == GDF_EFF_WINDOW_SHARD) {