mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-14 19:10:25 +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:
parent
4775fd4a7e
commit
1a41694d58
376 changed files with 1047 additions and 971 deletions
|
@ -1703,13 +1703,13 @@ void DemoEffect_DrawJewel(Actor* thisx, PlayState* play2) {
|
|||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2599),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
func_8002ED80(&this->actor, play, 0);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, this->primXluColor[0], this->primXluColor[1],
|
||||
this->primXluColor[2], 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->envXluColor[0], this->envXluColor[1], this->envXluColor[2], 255);
|
||||
gSPDisplayList(POLY_XLU_DISP++, this->jewelDisplayList);
|
||||
func_80093D18(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
func_8002EBCC(&this->actor, play, 0);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 128, this->primOpaColor[0], this->primOpaColor[1],
|
||||
this->primOpaColor[2], 255);
|
||||
|
@ -1737,7 +1737,7 @@ void DemoEffect_DrawCrystalLight(Actor* thisx, PlayState* play) {
|
|||
gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 255, 255, 170, 255);
|
||||
}
|
||||
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 8,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 2) % 512, 512 - (frames % 512) - 1, 128, 128, 1,
|
||||
|
@ -1779,7 +1779,7 @@ void DemoEffect_DrawFireBall(Actor* thisx, PlayState* play) {
|
|||
OPEN_DISPS(play->state.gfxCtx, "../z_demo_effect.c", 2701);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 64, 64, 255, 200, 0, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 255);
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2709),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_XLU_DISP++, play->billboardMtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
|
@ -1822,12 +1822,12 @@ void DemoEffect_DrawGodLgt(Actor* thisx, PlayState* play) {
|
|||
gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, this->primXluColor[0], this->primXluColor[1], this->primXluColor[2],
|
||||
255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->envXluColor[0], this->envXluColor[1], this->envXluColor[2], 255);
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
Matrix_Push();
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2801),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoldenGoddessAuraDL);
|
||||
func_80093D18(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
func_8002EBCC(&this->actor, play, 0);
|
||||
Matrix_Pop();
|
||||
|
||||
|
@ -1866,7 +1866,7 @@ void DemoEffect_DrawLightEffect(Actor* thisx, PlayState* play) {
|
|||
} else {
|
||||
disp = (u32)gEffFlash1DL; // necessary to match, should be able to remove after fake matches are fixed
|
||||
alpha = &this->light.alpha;
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, this->primXluColor[0], this->primXluColor[1],
|
||||
this->primXluColor[2], *alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->envXluColor[0], this->envXluColor[1], this->envXluColor[2], 255);
|
||||
|
@ -1901,7 +1901,7 @@ void DemoEffect_DrawBlueOrb(Actor* thisx, PlayState* play) {
|
|||
OPEN_DISPS(play->state.gfxCtx, "../z_demo_effect.c", 2892);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 188, 255, 255, this->blueOrb.alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, 255);
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(this->blueOrb.rotation), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2901),
|
||||
|
@ -1922,7 +1922,7 @@ void DemoEffect_DrawLgtShower(Actor* thisx, PlayState* play) {
|
|||
OPEN_DISPS(play->state.gfxCtx, "../z_demo_effect.c", 2921);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 64, 64, 255, 255, 160, this->lgtShower.alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 50, 200, 0, 255);
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2927),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_XLU_DISP++, 8,
|
||||
|
@ -1942,7 +1942,7 @@ void DemoEffect_DrawLightRing(Actor* thisx, PlayState* play2) {
|
|||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_demo_effect.c", 2956);
|
||||
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 170, 255, 255, this->lightRing.alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, 255);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2963),
|
||||
|
@ -1966,7 +1966,7 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, PlayState* play) {
|
|||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_demo_effect.c", 2994);
|
||||
if (gSaveContext.entranceIndex != ENTR_NAKANIWA_0 || play->csCtx.frames < 885) {
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
|
||||
if (this->triforceSpot.lightColumnOpacity > 0) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_AURORA - SFX_FLAG);
|
||||
|
@ -1992,7 +1992,7 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->triforceSpot.triforceSpotOpacity < 250) {
|
||||
func_8002ED80(&this->actor, play, 0);
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->triforceSpot.rotation), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 3053),
|
||||
|
@ -2003,7 +2003,7 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, PlayState* play) {
|
|||
gSPDisplayList(POLY_XLU_DISP++, gTriforceDL);
|
||||
} else {
|
||||
func_8002EBCC(&this->actor, play, 0);
|
||||
func_80093D18(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_PASS, G_RM_AA_ZB_OPA_SURF2);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->triforceSpot.rotation), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 3085),
|
||||
|
@ -2044,7 +2044,7 @@ s32 DemoEffect_OverrideLimbDrawTimeWarp(PlayState* play, SkelCurve* skelCurve, s
|
|||
u32 frames = play->gameplayFrames;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_demo_effect.c", 3154);
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, 170, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->envXluColor[0], this->envXluColor[1], this->envXluColor[2], 255);
|
||||
gSPSegment(POLY_XLU_DISP++, 8,
|
||||
|
@ -2074,7 +2074,7 @@ void DemoEffect_DrawTimeWarp(Actor* thisx, PlayState* play) {
|
|||
Flags_GetEnv(play, 1) || gSaveContext.sceneSetupIndex >= 4 || gSaveContext.entranceIndex == ENTR_TOKINOMA_4) {
|
||||
OPEN_DISPS(gfxCtx, "../z_demo_effect.c", 3201);
|
||||
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 25);
|
||||
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_25);
|
||||
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
|
||||
SkelCurve_Draw(&this->actor, play, &this->skelCurve, DemoEffect_OverrideLimbDrawTimeWarp, NULL, 1,
|
||||
&this->actor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue