From 8fffcdb5577a22d5ad4f761bcbdf1ad0468c3450 Mon Sep 17 00:00:00 2001 From: Sonic Dreamcaster Date: Sun, 25 May 2025 15:30:10 -0300 Subject: [PATCH] add floor interpolation to the ending floor --- src/overlays/ovl_ending/fox_end2.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 43d88173..8ca480af 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -458,8 +458,24 @@ void Ending_8018EDB8(u32 arg0, AssetInfo* asset) { gDPLoadTextureBlock(gMasterDisp++, D_END_700EA38, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 5, G_TX_NOLOD, G_TX_NOLOD); - gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, arg0 * 14, 0, G_TX_NOMIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); + int interpolatedFrames = GameEngine_GetInterpolationFrameCount(); + + float scrollArg = arg0 * 14; + float inc = 14 / (float) interpolatedFrames; + + for (int i = 0; i < interpolatedFrames; i++) { + gDPSetInterpolation(gMasterDisp++, i); + + gDPSetupTile2(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, scrollArg, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); + + gDPSetTileSizeInterp(gMasterDisp, G_TX_RENDERTILE, scrollArg, 0, 32 << 2, 0); + + gMasterDisp += 3; + + scrollArg += inc; + } + gSPDisplayList(gMasterDisp++, D_END_700E9E0); }