From 7974f176264ad98daa8b10175df07f9a5d01849d Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Wed, 12 Feb 2025 21:16:25 +0300 Subject: [PATCH] Hide boss gauge in Inspire cutscenes. --- .../patches/aspect_ratio_patches.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/UnleashedRecomp/patches/aspect_ratio_patches.cpp b/UnleashedRecomp/patches/aspect_ratio_patches.cpp index 6effa177..9875d69c 100644 --- a/UnleashedRecomp/patches/aspect_ratio_patches.cpp +++ b/UnleashedRecomp/patches/aspect_ratio_patches.cpp @@ -8,6 +8,7 @@ #include "aspect_ratio_patches.h" #include "camera_patches.h" +#include "inspire_patches.h" // These are here for now to not recompile basically all of the project. namespace Chao::CSD @@ -347,7 +348,9 @@ enum UNSTRETCH_HORIZONTAL = 1 << 19, - CORNER_EXTRACT = 1 << 20 + CORNER_EXTRACT = 1 << 20, + + SKIP_INSPIRE = 1 << 21, }; struct CsdModifier @@ -364,10 +367,10 @@ static const xxHashMap g_modifiers = { HashStr("ui_balloon/window/footer"), { ALIGN_BOTTOM } }, // ui_boss_gauge - { HashStr("ui_boss_gauge/gauge_bg"), { ALIGN_TOP_RIGHT | SCALE } }, - { HashStr("ui_boss_gauge/gauge_2"), { ALIGN_TOP_RIGHT | SCALE } }, - { HashStr("ui_boss_gauge/gauge_1"), { ALIGN_TOP_RIGHT | SCALE } }, - { HashStr("ui_boss_gauge/gauge_breakpoint"), { ALIGN_TOP_RIGHT | SCALE } }, + { HashStr("ui_boss_gauge/gauge_bg"), { ALIGN_TOP_RIGHT | SCALE | SKIP_INSPIRE} }, + { HashStr("ui_boss_gauge/gauge_2"), { ALIGN_TOP_RIGHT | SCALE | SKIP_INSPIRE} }, + { HashStr("ui_boss_gauge/gauge_1"), { ALIGN_TOP_RIGHT | SCALE | SKIP_INSPIRE} }, + { HashStr("ui_boss_gauge/gauge_breakpoint"), { ALIGN_TOP_RIGHT | SCALE | SKIP_INSPIRE} }, // ui_boss_name { HashStr("ui_boss_name/name_so/bg"), { UNSTRETCH_HORIZONTAL } }, @@ -924,6 +927,12 @@ static void Draw(PPCContext& ctx, uint8_t* base, PPCFunc* original, uint32_t str return; } + // That goddamn boss gauge doesn't disappear in the cutscene where Dark Gaia and Chip hug each other + if ((modifier.flags & SKIP_INSPIRE) != 0 && !InspirePatches::s_sceneName.empty() && *reinterpret_cast*>(base + ctx.r4.u32) >= 1280.0f) + { + return; + } + if (g_cornerExtract) { if ((modifier.flags & (STORE_LEFT_CORNER | STORE_RIGHT_CORNER)) != 0)