From 96b0a0702340d45789808a40b530fc90d63ba710 Mon Sep 17 00:00:00 2001 From: Sonic Dreamcaster Date: Mon, 13 Jan 2025 16:46:39 -0300 Subject: [PATCH] Lock-On indicator Point Filtering --- include/gfx.h | 1 + src/engine/fox_display.c | 2 +- src/engine/fox_rcp_setup.c | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/gfx.h b/include/gfx.h index 78a27d68..3e22a976 100644 --- a/include/gfx.h +++ b/include/gfx.h @@ -314,6 +314,7 @@ typedef enum SetupDL { SETUPDL_36_POINT, SETUPDL_62_POINT, SETUPDL_63_POINT, + SETUPDL_67_POINT, SETUPDL_75_POINT, SETUPDL_76_POINT, SETUPDL_77_POINT, diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index d2ca123b..109edd25 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -1663,7 +1663,7 @@ void Display_LockOnIndicator(void) { Matrix_Scale(gGfxMatrix, var_fs0 * 1.5f, var_fs0 * 1.5f, 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, D_display_801615A8[i] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, SETUPDL_67); + RCP_SetupDL(&gMasterDisp, SETUPDL_67_POINT); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); gSPDisplayList(gMasterDisp++, D_1024F60); diff --git a/src/engine/fox_rcp_setup.c b/src/engine/fox_rcp_setup.c index c642e885..6dd770e8 100644 --- a/src/engine/fox_rcp_setup.c +++ b/src/engine/fox_rcp_setup.c @@ -1322,6 +1322,21 @@ Gfx gRcpSetupDLs[][9] = { G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE | G_PM_NPRIMITIVE), gsSPEndDisplayList(), }, + { + /* SETUPDL_67_POINT */ + gsDPPipeSync(), + gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | + G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), + gsDPSetCombineLERP(PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, + TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0), + gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH), + gsSPSetOtherMode(G_SETOTHERMODE_L, G_MDSFT_ALPHACOMPARE, 3, G_AC_NONE | G_ZS_PIXEL), + gsDPSetRenderMode(G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2), + gsSPSetOtherModeHi(G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE | + G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE | G_PM_NPRIMITIVE), + gsSPEndDisplayList(), + }, { /* SETUPDL_75_POINT */ gsDPPipeSync(),