1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-20 14:01:15 +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

@ -563,7 +563,7 @@ void func_80967FFC(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_demo_6k.c", 1070);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
Matrix_RotateX(-M_PI / 2, MTXMODE_APPLY);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0x7FFF - ((timer1 * 8) & 0x7FFF), 16, 512, 1, 0,
@ -611,12 +611,12 @@ void func_80968298(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_demo_6k.c", 1145);
alpha = (s32)(this->unk_170 * 255.0f);
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP);
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, alpha);
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
alpha = (s32)(this->unk_16C * 255.0f);
for (i2 = 0, i = 0; i < 63; i++) {
@ -639,7 +639,7 @@ void func_80968298(Actor* thisx, PlayState* play) {
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_6k.c", 1189),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
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++, 50, 50, 50, 255);
gSPDisplayList(POLY_XLU_DISP++, object_demo_6k_DL_001040);
@ -661,7 +661,7 @@ void func_8096865C(Actor* thisx, PlayState* play) {
displayList = gEffFlash2DL;
}
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, 255);
gDPSetEnvColor(POLY_XLU_DISP++, sEnvColors[this->unk_293].r, sEnvColors[this->unk_293].g,
sEnvColors[this->unk_293].b, 255);
@ -691,7 +691,7 @@ void func_809688C4(Actor* thisx, PlayState* play2) {
(play->csCtx.npcActions[1]->action != 1)) {
OPEN_DISPS(play->state.gfxCtx, "../z_demo_6k.c", 1277);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, 255);
Matrix_RotateY(BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000)), MTXMODE_APPLY);
@ -728,7 +728,7 @@ void func_80968B70(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_demo_6k.c", 1316);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateX(M_PI / 2, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_6k.c", 1322),
@ -778,7 +778,7 @@ void func_80968FB0(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_demo_6k.c", 1386);
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
scaleFactor = ((s16)D_809693CC[(frames * 4) & 0xF] * 0.01f) + 1.0f;
Matrix_Scale(this->actor.scale.x * scaleFactor, this->actor.scale.y * scaleFactor,
this->actor.scale.z * scaleFactor, MTXMODE_APPLY);