From 8b6cb55bc7f805333af0079d108c24fc1d11f506 Mon Sep 17 00:00:00 2001 From: sitton76 <58642183+sitton76@users.noreply.github.com> Date: Fri, 17 May 2024 19:12:48 +0000 Subject: [PATCH] fixed z_en_egol and z_en_estone frame interpolation issue. (#371) * fixed z_en_egol and z_en_estone frame interpolation issue. * Changed EnEgol_draw RecordOpenCHild from "Poly_XLU_DISP" to "this" --- mm/src/overlays/actors/ovl_En_Egol/z_en_egol.c | 5 +++++ mm/src/overlays/actors/ovl_En_Estone/z_en_estone.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/mm/src/overlays/actors/ovl_En_Egol/z_en_egol.c b/mm/src/overlays/actors/ovl_En_Egol/z_en_egol.c index d912cdfa6..7aa963fc4 100644 --- a/mm/src/overlays/actors/ovl_En_Egol/z_en_egol.c +++ b/mm/src/overlays/actors/ovl_En_Egol/z_en_egol.c @@ -11,6 +11,7 @@ #include "overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h" #include "overlays/actors/ovl_En_Estone/z_en_estone.h" #include "overlays/effects/ovl_Effect_Ss_Hitmark/z_eff_ss_hitmark.h" +#include "2s2h/Enhancements/FrameInterpolation/FrameInterpolation.h" #define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_80000000) @@ -1515,6 +1516,7 @@ void EnEgol_Draw(Actor* thisx, PlayState* play2) { laserLightScaleMod = 10.0f; laserLightAlpha = 80.0f; for (i = 0; i < ARRAY_COUNT(sLightOrbColors); i++) { + FrameInterpolation_RecordOpenChild(this, i); Matrix_Push(); Matrix_Scale(laserLightScaleMod, laserLightScaleMod, laserLightScaleMod, MTXMODE_APPLY); Matrix_ReplaceRotation(&play->billboardMtxF); @@ -1526,6 +1528,7 @@ void EnEgol_Draw(Actor* thisx, PlayState* play2) { Matrix_Pop(); laserLightScaleMod = 3.0f; laserLightAlpha = 200.0f; + FrameInterpolation_RecordCloseChild(); } } else { gDPSetEnvColor(POLY_XLU_DISP++, 155, 255, 255, 128); @@ -1627,6 +1630,7 @@ void EnEgol_DrawEffects(EnEgol* this, PlayState* play) { Gfx_SetupDL25_Opa(play->state.gfxCtx); for (i = 0; i < ARRAY_COUNT(this->effects); i++, effect++) { if (effect->isActive) { + FrameInterpolation_RecordOpenChild(effect, i); Matrix_Push(); Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW); @@ -1667,6 +1671,7 @@ void EnEgol_DrawEffects(EnEgol* this, PlayState* play) { default: break; + FrameInterpolation_RecordCloseChild(); } Matrix_Pop(); } diff --git a/mm/src/overlays/actors/ovl_En_Estone/z_en_estone.c b/mm/src/overlays/actors/ovl_En_Estone/z_en_estone.c index bd4feebe6..531313e74 100644 --- a/mm/src/overlays/actors/ovl_En_Estone/z_en_estone.c +++ b/mm/src/overlays/actors/ovl_En_Estone/z_en_estone.c @@ -7,6 +7,7 @@ #include "z_en_estone.h" #include "objects/object_eg/object_eg.h" #include "objects/gameplay_keep/gameplay_keep.h" +#include "2s2h/Enhancements/FrameInterpolation/FrameInterpolation.h" #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) @@ -267,6 +268,7 @@ void EnEstone_DrawEffects(EnEstone* this, PlayState* play) { Gfx_SetupDL25_Opa(play->state.gfxCtx); for (i = 0; i < ARRAY_COUNT(this->effects); i++, effect++) { if (effect->isActive) { + FrameInterpolation_RecordOpenChild(effect, i); Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW); Matrix_RotateXS(effect->rot.x, MTXMODE_APPLY); Matrix_RotateYS(effect->rot.y, MTXMODE_APPLY); @@ -277,6 +279,7 @@ void EnEstone_DrawEffects(EnEstone* this, PlayState* play) { gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x80, 255, 255, 255, 255); gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 255); gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_06AB30); + FrameInterpolation_RecordCloseChild(); } }