mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-19 21:41:59 +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
|
@ -1417,7 +1417,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
|
|||
scale = (color * 2.0f) + 10.0f;
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_kankyo.c", 2364), G_MTX_LOAD);
|
||||
func_80093AD0(play->state.gfxCtx);
|
||||
Gfx_SetupDL_54Opa(play->state.gfxCtx);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gSunDL);
|
||||
|
||||
Matrix_Translate(play->view.eye.x - play->envCtx.sunPos.x, play->view.eye.y - play->envCtx.sunPos.y,
|
||||
|
@ -1436,7 +1436,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
|
|||
|
||||
if (alpha > 0.0f) {
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_kankyo.c", 2406), G_MTX_LOAD);
|
||||
func_8009398C(play->state.gfxCtx);
|
||||
Gfx_SetupDL_51Opa(play->state.gfxCtx);
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 240, 255, 180, alpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 80, 70, 20, alpha);
|
||||
|
@ -1631,7 +1631,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
|
|||
|
||||
if (glareStrength != 0) {
|
||||
if (glareAlphaScale > 0.0f) {
|
||||
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP);
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
|
||||
alpha = colorIntensity / 10.0f;
|
||||
alpha = CLAMP_MAX(alpha, 1.0f);
|
||||
|
@ -1714,7 +1714,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
|
|||
if (play->envCtx.precipitation[PRECIP_RAIN_CUR]) {
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 255, 255, 30);
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 20);
|
||||
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_20);
|
||||
}
|
||||
|
||||
// draw rain drops
|
||||
|
@ -1752,7 +1752,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
|
|||
|
||||
for (i = 0; i < play->envCtx.precipitation[PRECIP_RAIN_CUR]; i++) {
|
||||
if (!materialFlag) {
|
||||
func_80093D84(gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(gfxCtx);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 120);
|
||||
materialFlag++;
|
||||
|
@ -1809,7 +1809,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
|
|||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 3032);
|
||||
|
||||
func_800938B4(play->state.gfxCtx);
|
||||
Gfx_SetupDL_57Opa(play->state.gfxCtx);
|
||||
|
||||
alpha = (1000 - play->lightCtx.fogNear) * 0.02f;
|
||||
|
||||
|
@ -1831,7 +1831,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
|
|||
if (play->envCtx.customSkyboxFilter) {
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 3048);
|
||||
|
||||
func_800938B4(play->state.gfxCtx);
|
||||
Gfx_SetupDL_57Opa(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, play->envCtx.skyboxFilterColor[0], play->envCtx.skyboxFilterColor[1],
|
||||
play->envCtx.skyboxFilterColor[2], play->envCtx.skyboxFilterColor[3]);
|
||||
gDPFillRectangle(POLY_OPA_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
|
@ -1843,7 +1843,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
|
|||
void Environment_DrawLightningFlash(PlayState* play, u8 red, u8 green, u8 blue, u8 alpha) {
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 3069);
|
||||
|
||||
func_800938B4(play->state.gfxCtx);
|
||||
Gfx_SetupDL_57Opa(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha);
|
||||
gDPFillRectangle(POLY_OPA_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
|
||||
|
@ -2015,7 +2015,7 @@ void Environment_DrawLightning(PlayState* play, s32 unused) {
|
|||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_kankyo.c", 3333),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(lightningTextures[sLightningBolts[i].textureIndex]));
|
||||
func_80094C50(play->state.gfxCtx);
|
||||
Gfx_SetupDL_61Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, &D_01000000, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffLightningDL);
|
||||
}
|
||||
|
@ -2306,7 +2306,7 @@ void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue,
|
|||
OPEN_DISPS(gfxCtx, "../z_kankyo.c", 3835);
|
||||
|
||||
if (drawFlags & FILL_SCREEN_OPA) {
|
||||
POLY_OPA_DISP = func_800937C0(POLY_OPA_DISP);
|
||||
POLY_OPA_DISP = Gfx_SetupDL_57(POLY_OPA_DISP);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha);
|
||||
gDPSetAlphaDither(POLY_OPA_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_OPA_DISP++, G_CD_DISABLE);
|
||||
|
@ -2314,7 +2314,7 @@ void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue,
|
|||
}
|
||||
|
||||
if (drawFlags & FILL_SCREEN_XLU) {
|
||||
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP);
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, red, green, blue, alpha);
|
||||
|
||||
if ((u32)alpha == 255) {
|
||||
|
@ -2468,7 +2468,7 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) {
|
|||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 4044);
|
||||
|
||||
POLY_XLU_DISP = func_80093F34(POLY_XLU_DISP);
|
||||
POLY_XLU_DISP = Gfx_SetupDL_64(POLY_XLU_DISP);
|
||||
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_NOISE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_NOISE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue