From bb574ac2e723343e7fba68294cf86b3fef77e488 Mon Sep 17 00:00:00 2001 From: LT-Schmiddy Date: Tue, 31 Dec 2024 17:11:22 -0500 Subject: [PATCH] Formatting & a couple comments. --- assets/config_menu.rml | 2 +- patches/options.c | 2 ++ patches/play_patches.c | 1 + patches/title_patches.c | 2 ++ src/ui/ui_renderer.cpp | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/config_menu.rml b/assets/config_menu.rml index 12d310d..5d4274b 100644 --- a/assets/config_menu.rml +++ b/assets/config_menu.rml @@ -77,7 +77,7 @@ class="icon-button" onclick="open_reset_game_prompt" id="config__reset_game-button" - data-if="reset_button_visibility" + data-if="reset_button_visibility" > diff --git a/patches/options.c b/patches/options.c index 3f4f88f..6f8e3d3 100644 --- a/patches/options.c +++ b/patches/options.c @@ -76,6 +76,8 @@ RECOMP_PATCH void FileSelect_Init(GameState* thisx) { FileSelectState* this = (FileSelectState*)thisx; size_t size; + // @recomp indicates that the titlescreen has ended. + // The game reset button will now be controlled exclusively by the PlayState recomp_set_in_title_sequence(false); GameState_SetFramerateDivisor(&this->state, 1); diff --git a/patches/play_patches.c b/patches/play_patches.c index c6d0b91..27c8164 100644 --- a/patches/play_patches.c +++ b/patches/play_patches.c @@ -477,6 +477,7 @@ RECOMP_PATCH void Play_Destroy(GameState* thisx) { PlayState* this = (PlayState*)thisx; GraphicsContext* gfxCtx = this->state.gfxCtx; + // @recomp hide the reset button when the PlayState is destroyed. recomp_set_reset_button_visibility(0); if (sBombersNotebookOpen) { diff --git a/patches/title_patches.c b/patches/title_patches.c index 39b788b..dec9ad4 100644 --- a/patches/title_patches.c +++ b/patches/title_patches.c @@ -34,5 +34,7 @@ RECOMP_PATCH void TitleSetup_Init(GameState* thisx) { gSaveContext.respawn[RESPAWN_MODE_DEKU].entrance = 0xFF; gSaveContext.respawn[RESPAWN_MODE_HUMAN].entrance = 0xFF; + // @recomp the game reset button shouldn't be shown during the title sequence, + // despite the fact that a PlayState is initialized. recomp_set_in_title_sequence(true); } diff --git a/src/ui/ui_renderer.cpp b/src/ui/ui_renderer.cpp index 14f57ca..a234d7c 100644 --- a/src/ui/ui_renderer.cpp +++ b/src/ui/ui_renderer.cpp @@ -1020,7 +1020,7 @@ struct UIContext { current_document->GetElementsByTagName(tabs, "tab"); for (const auto& tab : tabs) { tab->SetProperty("nav-down", "#" + id); - } + } } void update_prompt_loop(void) {