Formatting & a couple comments.

This commit is contained in:
LT-Schmiddy 2024-12-31 17:11:22 -05:00
parent 525feeed60
commit bb574ac2e7
5 changed files with 7 additions and 2 deletions

View file

@ -77,7 +77,7 @@
class="icon-button" class="icon-button"
onclick="open_reset_game_prompt" onclick="open_reset_game_prompt"
id="config__reset_game-button" id="config__reset_game-button"
data-if="reset_button_visibility" data-if="reset_button_visibility"
> >
<svg src="icons/Reset.svg" /> <svg src="icons/Reset.svg" />
</button> </button>

View file

@ -76,6 +76,8 @@ RECOMP_PATCH void FileSelect_Init(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx; FileSelectState* this = (FileSelectState*)thisx;
size_t size; 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); recomp_set_in_title_sequence(false);
GameState_SetFramerateDivisor(&this->state, 1); GameState_SetFramerateDivisor(&this->state, 1);

View file

@ -477,6 +477,7 @@ RECOMP_PATCH void Play_Destroy(GameState* thisx) {
PlayState* this = (PlayState*)thisx; PlayState* this = (PlayState*)thisx;
GraphicsContext* gfxCtx = this->state.gfxCtx; GraphicsContext* gfxCtx = this->state.gfxCtx;
// @recomp hide the reset button when the PlayState is destroyed.
recomp_set_reset_button_visibility(0); recomp_set_reset_button_visibility(0);
if (sBombersNotebookOpen) { if (sBombersNotebookOpen) {

View file

@ -34,5 +34,7 @@ RECOMP_PATCH void TitleSetup_Init(GameState* thisx) {
gSaveContext.respawn[RESPAWN_MODE_DEKU].entrance = 0xFF; gSaveContext.respawn[RESPAWN_MODE_DEKU].entrance = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_HUMAN].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); recomp_set_in_title_sequence(true);
} }

View file

@ -1020,7 +1020,7 @@ struct UIContext {
current_document->GetElementsByTagName(tabs, "tab"); current_document->GetElementsByTagName(tabs, "tab");
for (const auto& tab : tabs) { for (const auto& tab : tabs) {
tab->SetProperty("nav-down", "#" + id); tab->SetProperty("nav-down", "#" + id);
} }
} }
void update_prompt_loop(void) { void update_prompt_loop(void) {