[docs] Pull upstream updates: SetupDL (#2048)

This commit is contained in:
Garrett Cox
2022-11-29 17:29:36 -06:00
committed by GitHub
parent d7c3522142
commit 3cb9f93ff4
378 changed files with 1114 additions and 1022 deletions

View File

@@ -1350,7 +1350,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), G_MTX_LOAD);
func_80093AD0(play->state.gfxCtx);
Gfx_SetupDL_54Opa(play->state.gfxCtx);
static Vtx vertices[] = {
VTX(-31, -31, 0, 0, 0, 255, 255, 255, 255),
@@ -1388,7 +1388,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
if (alpha > 0.0f) {
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), 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);
@@ -1581,7 +1581,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
if (screenFillAlpha != 0) {
if (alphaScale > 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);
@@ -1664,7 +1664,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
if (play->envCtx.unk_EE[1]) {
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, 20);
}
// draw rain drops
@@ -1708,7 +1708,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
FrameInterpolation_RecordOpenChild("Droplet Ring", i);
if (!firstDone) {
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);
firstDone++;
@@ -1768,7 +1768,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
func_800938B4(play->state.gfxCtx);
Gfx_SetupDL_57Opa(play->state.gfxCtx);
alpha = (1000 - play->lightCtx.fogNear) * 0.02f;
@@ -1790,7 +1790,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
if (play->envCtx.customSkyboxFilter) {
OPEN_DISPS(play->state.gfxCtx);
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]);
@@ -1803,7 +1803,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
void Environment_DrawLightningFlash(PlayState* play, u8 red, u8 green, u8 blue, u8 alpha) {
OPEN_DISPS(play->state.gfxCtx);
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);
@@ -1977,7 +1977,7 @@ void Environment_DrawLightning(PlayState* play, s32 unused) {
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
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++, SEG_ADDR(1, 0), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gEffLightningDL);
}
@@ -2252,7 +2252,7 @@ void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue,
OPEN_DISPS(gfxCtx);
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);
@@ -2260,7 +2260,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) {
@@ -2420,7 +2420,7 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) {
OPEN_DISPS(play->state.gfxCtx);
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);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, primColor.r, primColor.g, primColor.b, play->envCtx.sandstormPrimA);