Merge pull request #627 from Reinmmar/Inputs

This commit is contained in:
notyourav 2023-08-22 17:31:31 -07:00 committed by GitHub
commit 968c0ba5cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 22 additions and 22 deletions

View File

@ -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++;
}
}

View File

@ -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;
}

View File

@ -434,6 +434,6 @@ void MiscManager_TypeF(MiscManager* this) {
if (gPlayerEntity.action == PLAYER_TALKEZLO) {
DeleteThisEntity();
}
gInput.heldKeys |= 0x4;
gInput.heldKeys |= SELECT_BUTTON;
}
#endif

View File

@ -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++;
}
}

View File

@ -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);
}

View File

@ -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--;

View File

@ -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);

View File

@ -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;
}
}