From 56657a85f0c7ca6f5e16cc854dbd3c7ddc421be4 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Thu, 17 Oct 2024 23:54:30 +0100 Subject: [PATCH] Implemented loading screen hook to disable Werehog video --- UnleashedRecomp/game.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/UnleashedRecomp/game.cpp b/UnleashedRecomp/game.cpp index 9c3afa3..67d9c7f 100644 --- a/UnleashedRecomp/game.cpp +++ b/UnleashedRecomp/game.cpp @@ -125,6 +125,36 @@ void ResetScoreOnRestartMidAsmHook() #pragma endregion +#pragma region Loading Hooks + +// Loading screen hook. +PPC_FUNC_IMPL(__imp__sub_824DCF38); +PPC_FUNC(sub_824DCF38) +{ + /* Force the Werehog transition ID + to use a different transition. */ + if (!Config::WerehogHubTransformVideo) + { + /* + 0 - Tails Electric NOW LOADING + 1 - No Transition + 2 - Werehog Transition + 3 - Tails Electric NOW LOADING w/ Info (requires context) + 4 - Arrows In/Out + 5 - NOW LOADING + 6 - Theatre Mode + 7 - NOW LOADING + 8 - Black Screen + */ + if (ctx.r4.u32 == 2) + ctx.r4.u32 = 4; + } + + __imp__sub_824DCF38(ctx, base); +} + +#pragma endregion + #pragma region Miscellaneous Hooks bool DisableHintsMidAsmHook()