summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotyourav <65437533+notyourav@users.noreply.github.com>2023-08-22 17:31:31 -0700
committerGitHub <noreply@github.com>2023-08-22 17:31:31 -0700
commit968c0ba5cc8d9c353833ca64ce1f077852689466 (patch)
treebc2f92d7f0e366c6f7ca00c583fce1e32e1732e8
parente57f2f34e85b3a9b813e478e58c1688ff2a811ad (diff)
parent03eacc3c046ccaa25292081f98042a38b165ccce (diff)
Merge pull request #627 from Reinmmar/Inputs
-rw-r--r--src/beanstalkSubtask.c2
-rw-r--r--src/fileselect.c8
-rw-r--r--src/manager/miscManager.c2
-rw-r--r--src/manager/vaatiAppearingManager.c8
-rw-r--r--src/menu/pauseMenu.c2
-rw-r--r--src/npc/phonograph.c12
-rw-r--r--src/playerItem/playerItemCellOverwriteSet.c2
-rw-r--r--src/staffroll.c8
8 files changed, 22 insertions, 22 deletions
diff --git a/src/beanstalkSubtask.c b/src/beanstalkSubtask.c
index 89e2f40c..41dd45c3 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 7676d0e1..7e4d9108 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 c0c47a89..5ae26ace 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 9e349cb1..6eabadd8 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 27f747d9..3963cb7b 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 bd25c406..469dddb5 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 7d30cdd6..94445140 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 65d2ad5a..a2df531f 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;
}
}