From b34daeaac82abe54a6395636f797759f7c3e1bfa Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Fri, 24 Jan 2025 19:28:45 +0300 Subject: [PATCH] Remove medal swinging animation from the YNCP. --- UnleashedRecomp/patches/resident_patches.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/UnleashedRecomp/patches/resident_patches.cpp b/UnleashedRecomp/patches/resident_patches.cpp index 07ccd07e..ac0b3979 100644 --- a/UnleashedRecomp/patches/resident_patches.cpp +++ b/UnleashedRecomp/patches/resident_patches.cpp @@ -42,6 +42,20 @@ bool LoadingRenderMidAsmHook() return Config::TimeOfDayTransition == ETimeOfDayTransition::PlayStation; } +// Patch "ui_loading.yncp" to remove the medal swinging animation. +// SWA::CCsdProject::Make +PPC_FUNC_IMPL(__imp__sub_825E4068); +PPC_FUNC(sub_825E4068) +{ + if (ctx.r4.u32 != NULL && ctx.r5.u32 == 0x65C0C && XXH3_64bits(base + ctx.r4.u32, ctx.r5.u32) == 0xD4DA1A9BE4D79BED) + { + // Keyframe count. First keyframe is at the center of the screen. + PPC_STORE_U32(ctx.r4.u32 + 0x2794C, 1); + } + + __imp__sub_825E4068(ctx, base); +} + // SWA::CLoading::Update PPC_FUNC_IMPL(__imp__sub_824DAB60); PPC_FUNC(sub_824DAB60)