summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinmmar <herwig.orlich@gmail.com>2023-08-15 03:54:03 +0200
committerReinmmar <herwig.orlich@gmail.com>2023-08-15 03:54:03 +0200
commit1739e6205ad1803255eb9e73e4f7e42add7a3abd (patch)
tree2bee0ad46984771b6cb9b74f50b77d8acf240055
parent355e125cacff0295ba280667c9361b85e2714758 (diff)
Labeled all unlabeled inputs(if I didn't miss any)
-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/figurineMenu.c8
-rw-r--r--src/menu/pauseMenu.c2
-rw-r--r--src/npc/phonograph.c12
-rw-r--r--src/object/figurineDevice.c12
-rw-r--r--src/playerItem/playerItemCellOverwriteSet.c2
-rw-r--r--src/staffroll.c8
10 files changed, 32 insertions, 32 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/figurineMenu.c b/src/menu/figurineMenu.c
index b6dcf8b0..570c7dd2 100644
--- a/src/menu/figurineMenu.c
+++ b/src/menu/figurineMenu.c
@@ -181,14 +181,14 @@ void FigurineMenu0_Type3(void) {
uVar1 = gFigurineMenu.unk1f;
switch (gInput.unk4) {
- case 2:
- case 8:
+ case B_BUTTON:
+ case START_BUTTON:
FigurineMenu_080A46C0();
break;
- case 0x10:
+ case DPAD_RIGHT:
uVar1 += 8;
break;
- case 0x20:
+ case DPAD_LEFT:
uVar1 -= 8;
break;
}
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/object/figurineDevice.c b/src/object/figurineDevice.c
index 7cdfc32c..3c6bdb65 100644
--- a/src/object/figurineDevice.c
+++ b/src/object/figurineDevice.c
@@ -245,7 +245,7 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
if (super->timer != 0) {
super->timer--;
}
- if ((gInput.newKeys & 1) != 0) {
+ if ((gInput.newKeys & A_BUTTON) != 0) {
SoundReq(SFX_TEXTBOX_SELECT);
this->unk_7a = 2;
super->timer = 60;
@@ -254,7 +254,7 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
}
old_81 = this->unk_81;
#ifndef EU
- if ((gInput.heldKeys & 0x100) != 0) {
+ if ((gInput.heldKeys & R_BUTTON) != 0) {
tmp = 10;
} else {
tmp = 1;
@@ -264,10 +264,10 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
#else
switch (gInput.unk4 & 0xfffffeff) {
#endif
- case 0x40:
+ case DPAD_UP:
sub_08087F94(this, tmp);
break;
- case 0x80:
+ case DPAD_DOWN:
sub_08087F94(this, -tmp);
break;
}
@@ -276,10 +276,10 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
}
#else
switch (gInput.unk4) {
- case 0x40:
+ case DPAD_UP:
sub_08087F94(this, 1);
break;
- case 0x80:
+ case DPAD_DOWN:
sub_08087F94(this, -1);
break;
}
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;
}
}