Skip to content

Commit

Permalink
fix more incorrect dpad handling for hud updates (HarbourMasters#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archez authored Sep 8, 2024
1 parent 6ff3be9 commit bbfa903
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion mm/src/code/z_parameter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2376,6 +2376,14 @@ void Interface_UpdateButtonsPart2(PlayState* play) {
}
}

// #region 2S2H [Dpad]
for (s16 j = EQUIP_SLOT_D_RIGHT; j <= EQUIP_SLOT_D_UP; j++) {
if (gSaveContext.shipSaveContext.dpad.status[j] == BTN_ENABLED) {
gSaveContext.shipSaveContext.dpad.status[j] = BTN_DISABLED;
}
}
// #endregion

Interface_SetHudVisibility(HUD_VISIBILITY_B);
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_82_08)) {
// Swordsman's log minigame
Expand All @@ -2385,6 +2393,14 @@ void Interface_UpdateButtonsPart2(PlayState* play) {
}
}

// #region 2S2H [Dpad]
for (s16 j = EQUIP_SLOT_D_RIGHT; j <= EQUIP_SLOT_D_UP; j++) {
if (gSaveContext.shipSaveContext.dpad.status[j] == BTN_ENABLED) {
gSaveContext.shipSaveContext.dpad.status[j] = BTN_DISABLED;
}
}
// #endregion

Interface_SetHudVisibility(HUD_VISIBILITY_A_B_HEARTS_MAGIC_MINIMAP);
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_84_20)) {
// Related to moon child
Expand Down Expand Up @@ -2460,7 +2476,7 @@ void Interface_UpdateButtonsPart2(PlayState* play) {
gSaveContext.buttonStatus[i] = BTN_DISABLED;
}
// #region 2S2H [Dpad]
for (s16 j = EQUIP_SLOT_C_LEFT; j <= EQUIP_SLOT_C_RIGHT; j++) {
for (s16 j = EQUIP_SLOT_D_RIGHT; j <= EQUIP_SLOT_D_UP; j++) {
if (gSaveContext.shipSaveContext.dpad.status[j] == BTN_ENABLED) {
restoreHudVisibility = true;
}
Expand Down

0 comments on commit bbfa903

Please sign in to comment.