From a7063dc118fae44de1cf3a71d1877e4a385928b0 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:21:30 +0000 Subject: [PATCH] Added code to use arrow transition for Time of Day Transition (#362) --- UnleashedRecomp/patches/resident_patches.cpp | 7 +++++-- UnleashedRecomp/ui/options_menu.cpp | 2 +- UnleashedRecomp/user/config_def.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/UnleashedRecomp/patches/resident_patches.cpp b/UnleashedRecomp/patches/resident_patches.cpp index 725d704..45266ac 100644 --- a/UnleashedRecomp/patches/resident_patches.cpp +++ b/UnleashedRecomp/patches/resident_patches.cpp @@ -15,13 +15,16 @@ PPC_FUNC(sub_824DCF38) App::s_isLoading = true; - if (Config::TimeOfDayTransition == ETimeOfDayTransition::PlayStation) + if (ctx.r4.u32 == SWA::eLoadingDisplayType_WerehogMovie) { - if (ctx.r4.u32 == SWA::eLoadingDisplayType_WerehogMovie) + if (Config::TimeOfDayTransition == ETimeOfDayTransition::PlayStation) { ctx.r4.u32 = SWA::eLoadingDisplayType_ChangeTimeOfDay; pLoading->m_IsNightToDay = App::s_isWerehog; } + + if (Config::UseArrowsForTimeOfDayTransition) + ctx.r4.u32 = SWA::eLoadingDisplayType_Arrows; } if (auto pGameDocument = SWA::CGameDocument::GetInstance()) diff --git a/UnleashedRecomp/ui/options_menu.cpp b/UnleashedRecomp/ui/options_menu.cpp index 5979d3b..be70240 100644 --- a/UnleashedRecomp/ui/options_menu.cpp +++ b/UnleashedRecomp/ui/options_menu.cpp @@ -1199,7 +1199,7 @@ static void DrawConfigOptions() DrawConfigOption(rowCount++, yOffset, &Config::Hints, !isStage, cmnReason); DrawConfigOption(rowCount++, yOffset, &Config::ControlTutorial, !isStage, cmnReason); DrawConfigOption(rowCount++, yOffset, &Config::AchievementNotifications, true); - DrawConfigOption(rowCount++, yOffset, &Config::TimeOfDayTransition, true); + DrawConfigOption(rowCount++, yOffset, &Config::TimeOfDayTransition, !Config::UseArrowsForTimeOfDayTransition); break; case 1: // INPUT diff --git a/UnleashedRecomp/user/config_def.h b/UnleashedRecomp/user/config_def.h index a972029..50d9be5 100644 --- a/UnleashedRecomp/user/config_def.h +++ b/UnleashedRecomp/user/config_def.h @@ -109,6 +109,7 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, HomingAttackOnJump, false); CONFIG_DEFINE_HIDDEN("Codes", bool, HUDToggleKey, false); CONFIG_DEFINE_HIDDEN("Codes", bool, SaveScoreAtCheckpoints, false); CONFIG_DEFINE_HIDDEN("Codes", bool, SkipIntroLogos, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, UseArrowsForTimeOfDayTransition, false); CONFIG_DEFINE_HIDDEN("Codes", bool, UseOfficialTitleOnTitleBar, false); CONFIG_DEFINE("Update", time_t, LastChecked, 0);