1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-12 18:01:16 +00:00

Use CHECK_BTN_ANY more

This commit is contained in:
Dragorn421 2021-09-21 10:53:45 +02:00
parent fffd300be3
commit f93eee8320
No known key found for this signature in database
GPG key ID: C182A3A3996E8201
2 changed files with 5 additions and 5 deletions

View file

@ -574,7 +574,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) {
pad54 = input->prev.button ^ input->cur.button;
input->press.button = input->cur.button & pad54;
if (input->cur.button & BTN_R) {
if (CHECK_BTN_ANY(input->cur.button, BTN_R)) {
input->cur.button = ((sCounterState == 0) && (this->swordState == 0)) ? BTN_R : input->cur.button ^ BTN_R;
}
input->rel.button = input->prev.button & pad54;

View file

@ -319,21 +319,21 @@ void KaleidoScope_DrawDebugEditor(GlobalContext* globalCtx) {
heldDBtnTimer = 16;
}
if (dBtnInput & BTN_DDOWN) {
if (CHECK_BTN_ANY(dBtnInput, BTN_DDOWN)) {
if ((u32)++curRow > 10) {
curRow = 0;
}
curSection = sRowFirstSections[curRow];
} else if (dBtnInput & BTN_DUP) {
} else if (CHECK_BTN_ANY(dBtnInput, BTN_DUP)) {
if (--curRow < 0) {
curRow = 22;
}
curSection = sRowFirstSections[curRow];
} else if (dBtnInput & BTN_DLEFT) {
} else if (CHECK_BTN_ANY(dBtnInput, BTN_DLEFT)) {
if (--curSection < 0) {
curSection = 0x5C;
}
} else if (dBtnInput & BTN_DRIGHT) {
} else if (CHECK_BTN_ANY(dBtnInput, BTN_DRIGHT)) {
if (++curSection > 0x5C) {
curSection = 0;
}