diff options
| author | Random <28494085+Random06457@users.noreply.github.com> | 2020-10-03 17:22:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-03 11:22:44 -0400 |
| commit | 174af7384d1cfcbf15da02d9069bf02bdc433c20 (patch) | |
| tree | e4fb18346f71047c123ec4d34a80ae7e4d8ab9ea /src/code/flg_set.c | |
| parent | 6136ee6debd570a63fc695a6f4664553303f2324 (diff) | |
libultra cleanup (#215)
* cleanup libultra
* fixes
- use quotes instead of <> for includes
- add macros for zelda specific thread priorities
- fix Makefile
- properly format the remaining pfs structs
* fix button macros + add CHECK_BTN_ANY/CHECK_BTN_ALL
* remove ULTRA_ABS
* fix includes
* update z_player.c/z_lib.c + run format.sh
* merge upstream/master
* fix include in En_Goroiwa
* fix includes
Diffstat (limited to 'src/code/flg_set.c')
| -rw-r--r-- | src/code/flg_set.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/code/flg_set.c b/src/code/flg_set.c index 966c39ba2..44707957a 100644 --- a/src/code/flg_set.c +++ b/src/code/flg_set.c @@ -1,5 +1,4 @@ -#include <global.h> -#include <ultra64/controller.h> +#include "global.h" void FlagSet_Update(GlobalContext* globalCtx) { static s32 entryIdx = 0; @@ -76,35 +75,35 @@ void FlagSet_Update(GlobalContext* globalCtx) { } } - if (CHECK_PAD(input->press, L_JPAD)) { + if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) { timer = 10; curBit++; } - if (CHECK_PAD(input->press, R_JPAD)) { + if (CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) { curBit--; timer = 10; } if (timer == 0) { - if (CHECK_PAD(input->cur, L_JPAD)) { + if (CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) { curBit++; timer = 2; } - if (CHECK_PAD(input->cur, R_JPAD)) { + if (CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT)) { curBit--; timer = 2; } } curBit %= 16; - if (CHECK_PAD(input->press, U_JPAD)) { + if (CHECK_BTN_ALL(input->press.button, BTN_DUP)) { entryIdx--; if (entryIdx < 0) { entryIdx = 0; } timer = 10; } - if (CHECK_PAD(input->press, D_JPAD)) { + if (CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) { timer = 10; entryIdx++; if (!entries[entryIdx].value) { @@ -113,14 +112,14 @@ void FlagSet_Update(GlobalContext* globalCtx) { } if (timer == 0) { - if (CHECK_PAD(input->cur, U_JPAD)) { + if (CHECK_BTN_ALL(input->cur.button, BTN_DUP)) { entryIdx--; timer = 2; if (entryIdx < 0) { entryIdx = 0; } } - if (CHECK_PAD(input->cur, D_JPAD)) { + if (CHECK_BTN_ALL(input->cur.button, BTN_DDOWN)) { timer = 2; entryIdx++; if (!entries[entryIdx].value) { @@ -129,7 +128,7 @@ void FlagSet_Update(GlobalContext* globalCtx) { } } - if (CHECK_PAD(input->press, A_BUTTON)) { + if (CHECK_BTN_ALL(input->press.button, BTN_A)) { *entries[entryIdx].value ^= (1 << curBit); } @@ -145,7 +144,7 @@ void FlagSet_Update(GlobalContext* globalCtx) { oGfxCtx->polyOpa.p = gfx; } - if (CHECK_PAD(input->press, L_TRIG)) { + if (CHECK_BTN_ALL(input->press.button, BTN_L)) { globalCtx->pauseCtx.flag = 0; } |
