Reset functionality implemented

This commit is contained in:
LT_Schmiddy (Alex Schmid) 2024-11-23 23:28:17 -05:00
parent b1a6d32123
commit 0076632916
2 changed files with 9 additions and 5 deletions

View File

@ -40,9 +40,13 @@ void controls_play_update(PlayState* play) {
gSaveContext.options.zTargetSetting = recomp_get_targeting_mode();
}
void do_reset_game(PlayState* this) {
STOP_GAMESTATE(&this->state);
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, sizeof(ConsoleLogoState));
void do_reset_game(PlayState* play) {
gSaveContext.gameMode = GAMEMODE_OWL_SAVE;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_FADE_BLACK;
play->nextEntrance = ENTRANCE(CUTSCENE, 0);
gSaveContext.save.cutsceneIndex = 0;
gSaveContext.sceneLayer = 0;
}
// @recomp Patched to add hooks for various added functionality.

View File

@ -165,7 +165,6 @@ namespace zelda64 {
bool should_game_reset;
}
static recomp::InputDevice cur_device = recomp::InputDevice::Controller;
int recomp::get_scanned_input_index() {
@ -292,12 +291,13 @@ void zelda64::open_reset_game_prompt() {
"Cancel",
[]() {
should_game_reset = true;
close_config_menu();
},
[]() {},
recompui::ButtonVariant::Error,
recompui::ButtonVariant::Tertiary,
true,
"config__quit-game-button"
"config__reset_game-button"
);
}