rename a couple events

This commit is contained in:
LittleCube 2024-09-28 09:05:06 -04:00
parent 8afbf0facb
commit 5562bb450a
2 changed files with 10 additions and 9 deletions

View File

@ -740,11 +740,11 @@ RECOMP_PATCH void Sram_ResetSaveFromMoonCrash(SramContext* sramCtx) {
} }
bool owls_quit_game = true; bool loading_resets_owl_save = true;
RECOMP_EXPORT void recomp_set_owls_quit_game(bool new_val) RECOMP_EXPORT void recomp_set_loading_resets_owl_save(bool new_val)
{ {
owls_quit_game = new_val; loading_resets_owl_save = new_val;
} }
RECOMP_DECLARE_EVENT(recomp_on_owl_update(ObjWarpstone* this, PlayState* play)); RECOMP_DECLARE_EVENT(recomp_on_owl_update(ObjWarpstone* this, PlayState* play));
@ -765,10 +765,11 @@ RECOMP_PATCH void ObjWarpstone_Update(Actor* thisx, PlayState* play) {
if (play->msgCtx.choiceIndex != 0) { if (play->msgCtx.choiceIndex != 0) {
recomp_on_owl_save(this, play); recomp_on_owl_save(this, play);
Audio_PlaySfx_MessageDecide(); Audio_PlaySfx_MessageDecide();
if (!owls_quit_game) { // @recomp Only use normal owl save if flag is set.
Message_CloseTextbox(play); if (loading_resets_owl_save) {
} else {
play->msgCtx.msgMode = MSGMODE_OWL_SAVE_0; play->msgCtx.msgMode = MSGMODE_OWL_SAVE_0;
} else {
Message_CloseTextbox(play);
} }
play->msgCtx.unk120D6 = 0; play->msgCtx.unk120D6 = 0;
play->msgCtx.unk120D4 = 0; play->msgCtx.unk120D4 = 0;
@ -785,7 +786,7 @@ RECOMP_PATCH void ObjWarpstone_Update(Actor* thisx, PlayState* play) {
} }
// @recomp Skip the text talking about the save being deleted on load, if autosave is enabled. // @recomp Skip the text talking about the save being deleted on load, if autosave is enabled.
if (recomp_autosave_enabled()) { if (recomp_autosave_enabled() || !loading_resets_owl_save) {
if (this->isTalking && play->msgCtx.currentTextId == 0xC01 && play->msgCtx.msgBufPos == 269) { if (this->isTalking && play->msgCtx.currentTextId == 0xC01 && play->msgCtx.msgBufPos == 269) {
play->msgCtx.msgBufPos = 530; play->msgCtx.msgBufPos = 530;
} }

View File

@ -5,7 +5,7 @@
extern Input D_801F6C18; extern Input D_801F6C18;
RECOMP_DECLARE_EVENT(recomp_on_play_main(PlayState* play)); RECOMP_DECLARE_EVENT(recomp_on_play_main(PlayState* play));
RECOMP_DECLARE_EVENT(recomp_before_play_update(PlayState* play)); RECOMP_DECLARE_EVENT(recomp_on_play_update(PlayState* play));
RECOMP_DECLARE_EVENT(recomp_after_play_update(PlayState* play)); RECOMP_DECLARE_EVENT(recomp_after_play_update(PlayState* play));
void controls_play_update(PlayState* play) { void controls_play_update(PlayState* play) {
@ -38,7 +38,7 @@ RECOMP_PATCH void Play_Main(GameState* thisx) {
this->state.gfxCtx = NULL; this->state.gfxCtx = NULL;
} }
camera_pre_play_update(this); camera_pre_play_update(this);
recomp_before_play_update(this); recomp_on_play_update(this);
Play_Update(this); Play_Update(this);
recomp_after_play_update(this); recomp_after_play_update(this);
camera_post_play_update(this); camera_post_play_update(this);