mirror of
https://github.com/Mr-Wiseguy/Zelda64Recomp.git
synced 2024-12-25 12:21:49 +01:00
Reset functionality implemented
This commit is contained in:
parent
b1a6d32123
commit
0076632916
@ -40,9 +40,13 @@ void controls_play_update(PlayState* play) {
|
|||||||
gSaveContext.options.zTargetSetting = recomp_get_targeting_mode();
|
gSaveContext.options.zTargetSetting = recomp_get_targeting_mode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_reset_game(PlayState* this) {
|
void do_reset_game(PlayState* play) {
|
||||||
STOP_GAMESTATE(&this->state);
|
gSaveContext.gameMode = GAMEMODE_OWL_SAVE;
|
||||||
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, sizeof(ConsoleLogoState));
|
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.
|
// @recomp Patched to add hooks for various added functionality.
|
||||||
|
@ -165,7 +165,6 @@ namespace zelda64 {
|
|||||||
bool should_game_reset;
|
bool should_game_reset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static recomp::InputDevice cur_device = recomp::InputDevice::Controller;
|
static recomp::InputDevice cur_device = recomp::InputDevice::Controller;
|
||||||
|
|
||||||
int recomp::get_scanned_input_index() {
|
int recomp::get_scanned_input_index() {
|
||||||
@ -292,12 +291,13 @@ void zelda64::open_reset_game_prompt() {
|
|||||||
"Cancel",
|
"Cancel",
|
||||||
[]() {
|
[]() {
|
||||||
should_game_reset = true;
|
should_game_reset = true;
|
||||||
|
close_config_menu();
|
||||||
},
|
},
|
||||||
[]() {},
|
[]() {},
|
||||||
recompui::ButtonVariant::Error,
|
recompui::ButtonVariant::Error,
|
||||||
recompui::ButtonVariant::Tertiary,
|
recompui::ButtonVariant::Tertiary,
|
||||||
true,
|
true,
|
||||||
"config__quit-game-button"
|
"config__reset_game-button"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user