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/padutils.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/padutils.c')
| -rw-r--r-- | src/code/padutils.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/code/padutils.c b/src/code/padutils.c index b19fdbf12..564cfbf6f 100644 --- a/src/code/padutils.c +++ b/src/code/padutils.c @@ -1,4 +1,4 @@ -#include <global.h> +#include "global.h" void PadUtils_Init(Input* input) { bzero(input, sizeof(Input)); @@ -8,53 +8,53 @@ void func_800FCB70() { } void PadUtils_ResetPressRel(Input* input) { - input->press.in.button = 0; - input->rel.in.button = 0; + input->press.button = 0; + input->rel.button = 0; } u32 PadUtils_CheckCurExact(Input* input, u16 value) { - return value == input->cur.in.button; + return value == input->cur.button; } u32 PadUtils_CheckCur(Input* input, u16 key) { - return key == (input->cur.in.button & key); + return key == (input->cur.button & key); } u32 PadUtils_CheckPressed(Input* input, u16 key) { - return key == (input->press.in.button & key); + return key == (input->press.button & key); } u32 PadUtils_CheckReleased(Input* input, u16 key) { - return key == (input->rel.in.button & key); + return key == (input->rel.button & key); } u16 PadUtils_GetCurButton(Input* input) { - return input->cur.in.button; + return input->cur.button; } u16 PadUtils_GetPressButton(Input* input) { - return input->press.in.button; + return input->press.button; } s8 PadUtils_GetCurX(Input* input) { - return input->cur.in.x; + return input->cur.stick_x; } s8 PadUtils_GetCurY(Input* input) { - return input->cur.in.y; + return input->cur.stick_y; } void PadUtils_SetRelXY(Input* input, s32 x, s32 y) { - input->rel.in.x = x; - input->rel.in.y = y; + input->rel.stick_x = x; + input->rel.stick_y = y; } s8 PadUtils_GetRelXImpl(Input* input) { - return input->rel.in.x; + return input->rel.stick_x; } s8 PadUtils_GetRelYImpl(Input* input) { - return input->rel.in.y; + return input->rel.stick_y; } s8 PadUtils_GetRelX(Input* input) { |
