Reset button now invisible during title sequence.

This commit is contained in:
LT-Schmiddy 2024-11-30 16:59:01 -05:00
parent b2b13c5d77
commit efaf7d615a
4 changed files with 13 additions and 10 deletions

View File

@ -3,6 +3,8 @@
#include "z64shrink_window.h"
#include "overlays/gamestates/ovl_file_choose/z_file_select.h"
#include "play_patches.h"
#define FS_BTN_CONFIRM_REWIND 2
INCBIN(rewind_button_texture, "rewind.ia16.bin");
@ -69,14 +71,12 @@ RECOMP_PATCH void FileSelect_RotateToOptions(GameState* thisx) {
recomp_exit();
}
extern int recomp_in_title_sequence;
RECOMP_PATCH void FileSelect_Init(GameState* thisx) {
s32 pad;
FileSelectState* this = (FileSelectState*)thisx;
size_t size;
recomp_in_title_sequence = false;
recomp_set_in_title_sequence(false);
recomp_printf("FileSelect_Init\n");
GameState_SetFramerateDivisor(&this->state, 1);

View File

@ -170,7 +170,11 @@ RECOMP_DECLARE_EVENT(recomp_on_play_init(PlayState* this));
RECOMP_DECLARE_EVENT(recomp_after_play_init(PlayState* this));
bool allow_no_ocarina_tf = false;
bool recomp_in_title_sequence = false;
static bool recomp_in_title_sequence = false;
void recomp_set_in_title_sequence(bool val) {
recomp_in_title_sequence = val;
}
// @recomp_export void recomp_set_allow_no_ocarina_tf(bool new_val): Set whether to force Termina Field to load normally even if Link has no ocarina.
RECOMP_EXPORT void recomp_set_allow_no_ocarina_tf(bool new_val) {

View File

@ -12,6 +12,8 @@ void analog_cam_post_play_update(PlayState* play);
void matrix_play_update(PlayState* play);
void autosave_post_play_update(PlayState* play);
void recomp_set_in_title_sequence(bool val);
DECLARE_FUNC(void, recomp_set_reset_button_visibility, u8 visibility);
DECLARE_FUNC(bool, recomp_should_reset_game);

View File

@ -1,21 +1,19 @@
#include "patches.h"
#include "patch_helpers.h"
#include "play_patches.h"
#include "global.h"
#include "z64save.h"
#include "z64shrink_window.h"
#include "z64view.h"
#include "regs.h"
DECLARE_FUNC(void, recomp_set_reset_button_visibility, u8 visibility);
typedef struct {
/* 0x000 */ GameState state;
/* 0x0A8 */ View view;
} TitleSetupState; // size = 0x210
extern int recomp_in_title_sequence;
void TitleSetup_Init(GameState* thisx);
void TitleSetup_Main(GameState* thisx);
void TitleSetup_Destroy(GameState* thisx);
@ -36,6 +34,5 @@ RECOMP_PATCH void TitleSetup_Init(GameState* thisx) {
gSaveContext.respawn[RESPAWN_MODE_DEKU].entrance = 0xFF;
gSaveContext.respawn[RESPAWN_MODE_HUMAN].entrance = 0xFF;
recomp_in_title_sequence = true;
recomp_printf("TitleSetup_Init\n");
recomp_set_in_title_sequence(true);
}