From 72cfe9e0fa8d2e551259b8e630a33c0064df122a Mon Sep 17 00:00:00 2001 From: tonyspumoni <94409037+tonyspumoni@users.noreply.github.com> Date: Sun, 30 Oct 2022 10:58:10 -0600 Subject: [PATCH] name D_800DF4E0->gNeedToCloseDialogueBox (#267) * name D_800DF4E0->gNeedToCloseDialogueBox * Update src/menu.c Co-authored-by: Fazana <52551480+FazanaJ@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Fazana <52551480+FazanaJ@users.noreply.github.com> Co-authored-by: Fazana <52551480+FazanaJ@users.noreply.github.com> --- src/menu.c | 12 ++++++------ src/menu.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/menu.c b/src/menu.c index 14ccba4e..0367699c 100644 --- a/src/menu.c +++ b/src/menu.c @@ -328,7 +328,7 @@ s32 D_800DF4D0 = 0; // Unused? s32 gTrackIdToLoad = 0; s8 D_800DF4D8 = 1; s8 D_800DF4DC = 0; -s8 D_800DF4E0 = 0; +s8 gNeedToCloseDialogueBox = FALSE; s8 D_800DF4E4[4] = { 0, 0, 0, 0 @@ -7800,14 +7800,14 @@ void func_8009CF68(s32 arg0) { sCurrentMenuID = 0; sDialogueOption = 0; } - D_800DF4E0 = 1; + gNeedToCloseDialogueBox = TRUE; D_800DF4E4[arg0] = 1; } } void func_8009CFB0(void) { - if (D_800DF4E0 != 0) { - D_800DF4E0 = 0; + if (gNeedToCloseDialogueBox) { + gNeedToCloseDialogueBox = FALSE; close_dialogue_box(1); reset_controller_sticks(); } @@ -7820,7 +7820,7 @@ s32 func_8009CFEC(u32 dialogueOption) { if ((func_800C3400() != 0) && (dialogueOption != DIALOG_CHALLENGE)) { return 0; } - if (D_800DF4E0 != 0) { + if (gNeedToCloseDialogueBox) { return 0; } if (dialogueOption != DIALOG_CHALLENGE) { @@ -8082,7 +8082,7 @@ s32 taj_menu_loop(void) { if (sCurrentMenuID == 7) { sp2C = 3; } - D_800DF4E0 = 0; + gNeedToCloseDialogueBox = FALSE; close_dialogue_box(1); D_800DF4DC = 0; sCurrentMenuID = 0; diff --git a/src/menu.h b/src/menu.h index b1c98597..04ee7712 100644 --- a/src/menu.h +++ b/src/menu.h @@ -309,7 +309,7 @@ extern s32 D_800DF4D0; extern s32 gTrackIdToLoad; extern s8 D_800DF4D8; extern s8 D_800DF4DC; -extern s8 D_800DF4E0; +extern s8 gNeedToCloseDialogueBox; extern s8 D_800DF4E4[4]; extern s32 D_800DF4E8; extern s8 gDialogueOptionTangible;