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

@ -1527,7 +1527,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, PlayState* play) {
for (i = 0; i < BOSSFD_EFFECT_COUNT; i++, effect++) {
if (effect->type == BFD_FX_EMBER) {
if (materialFlag == 0) {
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPDisplayList(POLY_XLU_DISP++, gVolvagiaEmberMaterialDL);
materialFlag++;
}
@ -1548,7 +1548,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, PlayState* play) {
for (i = 0; i < BOSSFD_EFFECT_COUNT; i++, effect++) {
if (effect->type == BFD_FX_DEBRIS) {
if (materialFlag == 0) {
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPDisplayList(POLY_OPA_DISP++, gVolvagiaDebrisMaterialDL);
materialFlag++;
}
@ -1569,7 +1569,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, PlayState* play) {
for (i = 0; i < BOSSFD_EFFECT_COUNT; i++, effect++) {
if (effect->type == BFD_FX_DUST) {
if (materialFlag == 0) {
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_0);
gSPDisplayList(POLY_XLU_DISP++, gVolvagiaDustMaterialDL);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 90, 30, 0, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 90, 30, 0, 0);
@ -1592,7 +1592,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, PlayState* play) {
for (i = 0; i < BOSSFD_EFFECT_COUNT; i++, effect++) {
if (effect->type == BFD_FX_FIRE_BREATH) {
if (materialFlag == 0) {
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_0);
gSPDisplayList(POLY_XLU_DISP++, gVolvagiaDustMaterialDL);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 10, 0, 255);
materialFlag++;
@ -1615,7 +1615,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, PlayState* play) {
for (i = 0; i < BOSSFD_EFFECT_COUNT; i++, effect++) {
if (effect->type == BFD_FX_SKULL_PIECE) {
if (materialFlag == 0) {
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPDisplayList(POLY_XLU_DISP++, gVolvagiaSkullPieceMaterialDL);
materialFlag++;
}
@ -1641,7 +1641,7 @@ void BossFd_Draw(Actor* thisx, PlayState* play) {
osSyncPrintf("FD DRAW START\n");
if (this->actionFunc != BossFd_Wait) {
OPEN_DISPS(play->state.gfxCtx, "../z_boss_fd.c", 4217);
func_80093D18(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
if (this->work[BFD_DAMAGE_FLASH_TIMER] & 2) {
POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, 255, 255, 255, 0, 900, 1099);
}
@ -1956,7 +1956,7 @@ void BossFd_DrawBody(PlayState* play, BossFd* this) {
Vec3f spB0 = { 0.0f, 1700.0f, 7000.0f };
Vec3f spA4 = { -1000.0f, 700.0f, 7000.0f };
func_80093D84(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPDisplayList(POLY_XLU_DISP++, gVolvagiaManeMaterialDL);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, this->fwork[BFD_MANE_COLOR_CENTER], 0, 255);
Matrix_Push();