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>
This commit is contained in:
tonyspumoni
2022-10-30 10:58:10 -06:00
committed by GitHub
co-authored by Fazana
parent e0acb62ac2
commit 72cfe9e0fa
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -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;
+1 -1
View File
@@ -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;