Remove POLY_KAL and restore POLY_OPA for kaleido (#5041)

This commit is contained in:
Archez
2025-02-12 15:30:06 -05:00
committed by GitHub
parent 297a056dff
commit 135c2e8217
16 changed files with 479 additions and 520 deletions

View File

@@ -112,13 +112,11 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx) {
pool->tailMagic = GFXPOOL_TAIL_MAGIC;
THGA_Ct(&gfxCtx->polyOpa, pool->polyOpaBuffer, sizeof(pool->polyOpaBuffer));
THGA_Ct(&gfxCtx->polyXlu, pool->polyXluBuffer, sizeof(pool->polyXluBuffer));
THGA_Ct(&gfxCtx->polyKal, pool->polyKalBuffer, sizeof(pool->polyKalBuffer));
THGA_Ct(&gfxCtx->overlay, pool->overlayBuffer, sizeof(pool->overlayBuffer));
THGA_Ct(&gfxCtx->work, pool->workBuffer, sizeof(pool->workBuffer));
gfxCtx->polyOpaBuffer = pool->polyOpaBuffer;
gfxCtx->polyXluBuffer = pool->polyXluBuffer;
gfxCtx->polyKalBuffer = pool->polyKalBuffer;
gfxCtx->overlayBuffer = pool->overlayBuffer;
gfxCtx->workBuffer = pool->workBuffer;
@@ -335,8 +333,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
gSPBranchList(WORK_DISP++, gfxCtx->polyOpaBuffer);
gSPBranchList(POLY_OPA_DISP++, gfxCtx->polyXluBuffer);
gSPBranchList(POLY_XLU_DISP++, gfxCtx->polyKalBuffer);
gSPBranchList(POLY_KAL_DISP++, gfxCtx->overlayBuffer);
gSPBranchList(POLY_XLU_DISP++, gfxCtx->overlayBuffer);
gDPPipeSync(OVERLAY_DISP++);
gDPFullSync(OVERLAY_DISP++);
gSPEndDisplayList(OVERLAY_DISP++);

View File

@@ -1365,7 +1365,6 @@ void Play_Draw(PlayState* play) {
if ((HREG(80) != 10) || (HREG(82) != 0)) {
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
POLY_XLU_DISP = Play_SetFog(play, POLY_XLU_DISP);
POLY_KAL_DISP = Play_SetFog(play, POLY_KAL_DISP);
func_800AA460(&play->view, play->view.fovy, play->view.zNear, play->lightCtx.fogFar);
func_800AAA50(&play->view, 15);

View File

@@ -1187,14 +1187,6 @@ void Gfx_SetupDL_39Opa(GraphicsContext* gfxCtx) {
CLOSE_DISPS(gfxCtx);
}
void Gfx_SetupDL_39Kal(GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx);
POLY_KAL_DISP = Gfx_SetupDL_39(POLY_KAL_DISP);
CLOSE_DISPS(gfxCtx);
}
void Gfx_SetupDL_39Overlay(GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx);
@@ -1298,14 +1290,6 @@ void Gfx_SetupDL_42Opa(GraphicsContext* gfxCtx) {
CLOSE_DISPS(gfxCtx);
}
void Gfx_SetupDL_42Kal(GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx);
gSPDisplayList(POLY_KAL_DISP++, sSetupDL[SETUPDL_42]);
CLOSE_DISPS(gfxCtx);
}
void Gfx_SetupDL_42Overlay(GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx);
@@ -1469,26 +1453,22 @@ void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
// Set up the RDP render state for rectangles in FILL mode
gSPDisplayList(POLY_OPA_DISP++, sFillSetupDL);
gSPDisplayList(POLY_XLU_DISP++, sFillSetupDL);
gSPDisplayList(POLY_KAL_DISP++, sFillSetupDL);
gSPDisplayList(OVERLAY_DISP++, sFillSetupDL);
// Set the scissor region to the full screen
gDPSetScissor(POLY_OPA_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth, gScreenHeight);
gDPSetScissor(POLY_XLU_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth, gScreenHeight);
gDPSetScissor(POLY_KAL_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth, gScreenHeight);
gDPSetScissor(OVERLAY_DISP++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth, gScreenHeight);
// Set up the framebuffer, primitives will be drawn here
gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer);
gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer);
gDPSetColorImage(POLY_XLU_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer);
gDPSetColorImage(POLY_KAL_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer);
gDPSetColorImage(OVERLAY_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer);
// Set up the z-buffer
gDPSetDepthImage(POLY_OPA_DISP++, gZBuffer);
gDPSetDepthImage(POLY_XLU_DISP++, gZBuffer);
gDPSetDepthImage(POLY_KAL_DISP++, gZBuffer);
gDPSetDepthImage(OVERLAY_DISP++, gZBuffer);
if ((R_PAUSE_MENU_MODE < 2) && (gTrnsnUnkState < 2)) {

View File

@@ -188,8 +188,6 @@ void func_800AA550(View* view) {
gDPSetScissor(POLY_OPA_DISP++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetScissor(POLY_XLU_DISP++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry);
gDPPipeSync(POLY_KAL_DISP++);
gDPSetScissor(POLY_KAL_DISP++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry);
CLOSE_DISPS(gfxCtx);
}
@@ -312,7 +310,6 @@ s32 func_800AAA9C(View* view) {
gSPViewport(POLY_OPA_DISP++, vp);
gSPViewport(POLY_XLU_DISP++, vp);
gSPViewport(POLY_KAL_DISP++, vp);
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
projectionFlipped = Graph_Alloc(gfxCtx, sizeof(Mtx));
@@ -451,8 +448,6 @@ s32 func_800AAA9C(View* view) {
gSPMatrix(POLY_OPA_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPPerspNormalize(POLY_XLU_DISP++, view->normal);
gSPMatrix(POLY_XLU_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPPerspNormalize(POLY_KAL_DISP++, view->normal);
gSPMatrix(POLY_KAL_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
Matrix_MtxFToMtx(viewingF.mf, viewing);
@@ -478,7 +473,6 @@ s32 func_800AAA9C(View* view) {
}
gSPMatrix(POLY_OPA_DISP++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
gSPMatrix(POLY_XLU_DISP++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
gSPMatrix(POLY_KAL_DISP++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
FrameInterpolation_RecordCloseChild();
CLOSE_DISPS(gfxCtx);
@@ -502,7 +496,6 @@ s32 func_800AB0A8(View* view) {
gSPViewport(POLY_OPA_DISP++, vp);
gSPViewport(POLY_XLU_DISP++, vp);
gSPViewport(POLY_KAL_DISP++, vp);
gSPViewport(OVERLAY_DISP++, vp);
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
@@ -516,7 +509,6 @@ s32 func_800AB0A8(View* view) {
gSPMatrix(POLY_OPA_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(POLY_XLU_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(POLY_KAL_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
CLOSE_DISPS(gfxCtx);