From 8e08d4d68520bedef01cefd7b9e3f7e6b904b9f5 Mon Sep 17 00:00:00 2001 From: Reonu <15913880+Reonu@users.noreply.github.com> Date: Sat, 2 Aug 2025 22:01:29 +0100 Subject: [PATCH] Fixed interpolation glitch with Gibdo mask in Pamela cutscene --- patches/specific_actor_transform_tagging.c | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/patches/specific_actor_transform_tagging.c b/patches/specific_actor_transform_tagging.c index 35a72e0..38459ad 100644 --- a/patches/specific_actor_transform_tagging.c +++ b/patches/specific_actor_transform_tagging.c @@ -13,6 +13,7 @@ #include "overlays/actors/ovl_En_Honotrap/z_en_honotrap.h" #include "overlays/actors/ovl_En_Tanron1/z_en_tanron1.h" #include "overlays/actors/ovl_En_Kusa2/z_en_kusa2.h" +#include "overlays/actors/ovl_Dm_Char05/z_dm_char05.h" // Decomp renames, TODO update decomp and remove these #define EnHonotrap_FlameGroup func_8092F878 @@ -1373,3 +1374,26 @@ RECOMP_PATCH void func_80A5E6F0(Actor* thisx, PlayState* play) { CLOSE_DISPS(play->state.gfxCtx); } + +extern void func_80AADF54(PlayState* play, DmChar05* this); + +// @recomp Patched to avoid an interpolation glitch in Pamela's dad's cutscene +// that happens when the mask is meant to teleport offscreen. +RECOMP_PATCH void func_80AADB4C(Actor* thisx, PlayState* play) { + DmChar05* this = (DmChar05*)thisx; + if (this->unk_18E == 0) { + if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_518) && + (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_518)]->id != 1)) { + // @recomp During this cue the mask does nothing other than teleport offscreen and stay still, + // so we can just skip interpolation the entire time. + if (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_518)]->id == 3) { + actor_set_interpolation_skipped(thisx); + } + Gfx_SetupDL25_Opa(play->state.gfxCtx); + SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, + this->skelAnime.dListCount, NULL, NULL, &this->actor); + } + } else if (this->unk_18E == 1) { + func_80AADF54(play, this); + } +}