diff --git a/src/beanstalkSubtask.c b/src/beanstalkSubtask.c index 89e2f40cc..41dd45c32 100644 --- a/src/beanstalkSubtask.c +++ b/src/beanstalkSubtask.c @@ -116,7 +116,7 @@ void sub_08019764(void) { UpdateEntities(); DrawEntities(); CopyOAM(); - if ((--gUnk_02018EB0.unk_4 == 0) || ((gInput.newKeys & 10) != 0)) { + if ((--gUnk_02018EB0.unk_4 == 0) || ((gInput.newKeys & (B_BUTTON | START_BUTTON)) != 0)) { gUnk_02018EB0.unk_0++; } } diff --git a/src/fileselect.c b/src/fileselect.c index 7676d0e15..7e4d9108c 100644 --- a/src/fileselect.c +++ b/src/fileselect.c @@ -1146,16 +1146,16 @@ void sub_080610B8(void) { uVar6 = 0; tmp4 = 0; switch (gInput.unk4) { - case 0x40: + case DPAD_UP: tmp4 = -1; break; - case 0x80: + case DPAD_DOWN: tmp4 = 1; break; - case 0x20: + case DPAD_LEFT: uVar6 = -1; break; - case 0x10: + case DPAD_RIGHT: uVar6 = 1; break; } diff --git a/src/manager/miscManager.c b/src/manager/miscManager.c index c0c47a891..5ae26ace5 100644 --- a/src/manager/miscManager.c +++ b/src/manager/miscManager.c @@ -434,6 +434,6 @@ void MiscManager_TypeF(MiscManager* this) { if (gPlayerEntity.action == PLAYER_TALKEZLO) { DeleteThisEntity(); } - gInput.heldKeys |= 0x4; + gInput.heldKeys |= SELECT_BUTTON; } #endif diff --git a/src/manager/vaatiAppearingManager.c b/src/manager/vaatiAppearingManager.c index 9e349cb1e..6eabadd88 100644 --- a/src/manager/vaatiAppearingManager.c +++ b/src/manager/vaatiAppearingManager.c @@ -138,16 +138,16 @@ void VaatiAppearingManager_Action2(VaatiAppearingManager* this) { } void VaatiAppearingManager_Action3(VaatiAppearingManager* this) { - if ((gInput.heldKeys & 0x40) != 0) { + if ((gInput.heldKeys & DPAD_UP) != 0) { this->field_0x20--; } - if ((gInput.heldKeys & 0x80) != 0) { + if ((gInput.heldKeys & DPAD_DOWN) != 0) { this->field_0x20++; } - if ((gInput.heldKeys & 0x20) != 0) { + if ((gInput.heldKeys & DPAD_LEFT) != 0) { this->field_0x28--; } - if ((gInput.heldKeys & 0x10) != 0) { + if ((gInput.heldKeys & DPAD_RIGHT) != 0) { this->field_0x28++; } } diff --git a/src/menu/pauseMenu.c b/src/menu/pauseMenu.c index 27f747d90..3963cb7b5 100644 --- a/src/menu/pauseMenu.c +++ b/src/menu/pauseMenu.c @@ -398,7 +398,7 @@ void PauseMenu_ItemMenu_Update(void) { } case B_BUTTON: if (gPauseMenu.items[menuSlot] != 0) { - u32 slot = !!(gInput.newKeys ^ 1); + u32 slot = !!(gInput.newKeys ^ A_BUTTON); ForceEquipItem(gPauseMenu.items[menuSlot], slot); SoundReq(SFX_TEXTBOX_SELECT); } diff --git a/src/npc/phonograph.c b/src/npc/phonograph.c index bd25c4060..469dddb5f 100644 --- a/src/npc/phonograph.c +++ b/src/npc/phonograph.c @@ -62,10 +62,10 @@ void sub_0806E964(PhonographEntity* this, ScriptExecutionContext* context) { sub_0806EABC(this); } - if (gInput.unk4 & 0xc0) { + if (gInput.unk4 & (DPAD_UP | DPAD_DOWN)) { s32 val2, val3; s32 val = this->unk_68; - if (gInput.unk4 & 0x40) { + if (gInput.unk4 & DPAD_UP) { val++; } else { val--; @@ -134,8 +134,8 @@ void sub_0806E964(PhonographEntity* this, ScriptExecutionContext* context) { val2 = 0x34; } val = this->unk_68; - if (gInput.newKeys & 0xc0) { - if (gInput.newKeys & 0x40) { + if (gInput.newKeys & (DPAD_UP | DPAD_DOWN)) { + if (gInput.newKeys & DPAD_UP) { val++; } else { val--; @@ -148,8 +148,8 @@ void sub_0806E964(PhonographEntity* this, ScriptExecutionContext* context) { if (val > val2) { val = 1; } - } else if (gInput.unk4 & 0xc0) { - if (gInput.unk4 & 0x40) { + } else if (gInput.unk4 & (DPAD_UP | DPAD_DOWN)) { + if (gInput.unk4 & DPAD_UP) { val++; } else { val--; diff --git a/src/playerItem/playerItemCellOverwriteSet.c b/src/playerItem/playerItemCellOverwriteSet.c index 7d30cdd6b..944451400 100644 --- a/src/playerItem/playerItemCellOverwriteSet.c +++ b/src/playerItem/playerItemCellOverwriteSet.c @@ -35,7 +35,7 @@ void PlayerItemCellOverwriteSet(PlayerItemCellOverwriteSetEntity* this) { gPlayerState.mobility |= 0x80; tmp = gInput.heldKeys & R_BUTTON; if ((gInput.heldKeys & A_BUTTON) != 0) { - if ((R_BUTTON & gInput.newKeys) != 0) { + if ((gInput.newKeys & R_BUTTON) != 0) { this->tileType = GetTileType(TILE(player->x.HALF.HI + gUnk_080B7B6C[player->animationState & 0xe], player->y.HALF.HI + gUnk_080B7B6C[(player->animationState & 0xe) + 1]), super->collisionLayer); diff --git a/src/staffroll.c b/src/staffroll.c index 65d2ad5ae..a2df531ff 100644 --- a/src/staffroll.c +++ b/src/staffroll.c @@ -269,13 +269,13 @@ void StaffrollTask_State2(void) { } else { choice = gStaffrollMenu.base.field_0x3; switch (gInput.newKeys) { - case 0x40: + case DPAD_UP: choice = 0; break; - case 0x80: + case DPAD_DOWN: choice = 1; break; - case 1: + case A_BUTTON: if (choice != 0) { tmp = 4; } else { @@ -313,7 +313,7 @@ void StaffrollTask_State2(void) { if (gStaffrollMenu.base.transitionTimer != 0) { gStaffrollMenu.base.transitionTimer--; } else { - if ((gInput.newKeys & 0xb) != 0) { + if ((gInput.newKeys & (A_BUTTON | B_BUTTON | START_BUTTON)) != 0) { gStaffrollMenu.base.overlayType = 1; } }