From 8f8b574e5667b61717e7774ba3ca98ba42189711 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Thu, 13 Feb 2025 19:55:08 +0000 Subject: [PATCH] Added debug view codes (#402) Co-authored-by: RadiantDerg <9061202+RadiantDerg@users.noreply.github.com> --- UnleashedRecomp/app.cpp | 12 ++++++++++++ UnleashedRecomp/user/config_def.h | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/UnleashedRecomp/app.cpp b/UnleashedRecomp/app.cpp index 4b9de25..be696de 100644 --- a/UnleashedRecomp/app.cpp +++ b/UnleashedRecomp/app.cpp @@ -79,6 +79,18 @@ PPC_FUNC(sub_822C1130) if (auto pApplicationDocument = SWA::CApplicationDocument::GetInstance()) pApplicationDocument->m_InspireSubtitles = Config::Subtitles; + if (Config::EnableEventCollisionDebugView) + *SWA::SGlobals::ms_IsTriggerRender = true; + + if (Config::EnableGIMipLevelDebugView) + *SWA::SGlobals::ms_VisualizeLoadedLevel = true; + + if (Config::EnableObjectCollisionDebugView) + *SWA::SGlobals::ms_IsObjectCollisionRender = true; + + if (Config::EnableStageCollisionDebugView) + *SWA::SGlobals::ms_IsCollisionRender = true; + __imp__sub_822C1130(ctx, base); } diff --git a/UnleashedRecomp/user/config_def.h b/UnleashedRecomp/user/config_def.h index 25c924e..c9069f9 100644 --- a/UnleashedRecomp/user/config_def.h +++ b/UnleashedRecomp/user/config_def.h @@ -79,6 +79,10 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, AllowCancellingUnleash, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableAutoSaveWarning, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDLCIcon, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDWMRoundedCorners, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, EnableEventCollisionDebugView, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, EnableGIMipLevelDebugView, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, EnableObjectCollisionDebugView, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, EnableStageCollisionDebugView, false); CONFIG_DEFINE_HIDDEN("Codes", bool, FixEggmanlandUsingEventGalleryTransition, false); CONFIG_DEFINE_HIDDEN("Codes", bool, FixUnleashOutOfControlDrain, false); CONFIG_DEFINE_HIDDEN("Codes", bool, HomingAttackOnJump, false);