summaryrefslogtreecommitdiff
path: root/src/boot_O2/padutils.c
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2023-09-11 17:38:31 -0700
committerGitHub <noreply@github.com>2023-09-12 10:38:31 +1000
commit190b78549e0fa1a801786e73d914185e1fbca2a6 (patch)
treebc62310b90bbd59005ef01873ca4a007d8c8ef31 /src/boot_O2/padutils.c
parent39523baf8c52d59b8ca52832c22e70eadf518f8a (diff)
Non libultra Boot Cleanup (#1370)
* reorganize * math64 * rcp_utils * osSyncPrintfUnused * comment spacing
Diffstat (limited to 'src/boot_O2/padutils.c')
-rw-r--r--src/boot_O2/padutils.c92
1 files changed, 0 insertions, 92 deletions
diff --git a/src/boot_O2/padutils.c b/src/boot_O2/padutils.c
deleted file mode 100644
index 1c6bbe868..000000000
--- a/src/boot_O2/padutils.c
+++ /dev/null
@@ -1,92 +0,0 @@
-#include "padutils.h"
-
-void PadUtils_Init(Input* input) {
- bzero(input, sizeof(Input));
-}
-
-void func_80085150(void) {
-}
-
-void PadUtils_ResetPressRel(Input* input) {
- input->press.button = 0;
- input->rel.button = 0;
-}
-
-u32 PadUtils_CheckCurExact(Input* input, u16 value) {
- return value == input->cur.button;
-}
-
-u32 PadUtils_CheckCur(Input* input, u16 key) {
- return key == (input->cur.button & key);
-}
-
-u32 PadUtils_CheckPressed(Input* input, u16 key) {
- return key == (input->press.button & key);
-}
-
-u32 PadUtils_CheckReleased(Input* input, u16 key) {
- return key == (input->rel.button & key);
-}
-
-u16 PadUtils_GetCurButton(Input* input) {
- return input->cur.button;
-}
-
-u16 PadUtils_GetPressButton(Input* input) {
- return input->press.button;
-}
-
-s8 PadUtils_GetCurX(Input* input) {
- return input->cur.stick_x;
-}
-
-s8 PadUtils_GetCurY(Input* input) {
- return input->cur.stick_y;
-}
-
-void PadUtils_SetRelXY(Input* input, s32 x, s32 y) {
- input->rel.stick_x = x;
- input->rel.stick_y = y;
-}
-
-s8 PadUtils_GetRelXImpl(Input* input) {
- return input->rel.stick_x;
-}
-
-s8 PadUtils_GetRelYImpl(Input* input) {
- return input->rel.stick_y;
-}
-
-s8 PadUtils_GetRelX(Input* input) {
- return PadUtils_GetRelXImpl(input);
-}
-
-s8 PadUtils_GetRelY(Input* input) {
- return PadUtils_GetRelYImpl(input);
-}
-
-void PadUtils_UpdateRelXY(Input* input) {
- s32 curX = PadUtils_GetCurX(input);
- s32 curY = PadUtils_GetCurY(input);
- s32 relX;
- s32 relY;
-
- if (curX > 7) {
- relX = (curX < 0x43) ? curX - 7 : 0x43 - 7;
- } else if (curX < -7) {
- relX = (curX > -0x43) ? curX + 7 : -0x43 + 7;
- } else {
- relX = 0;
- }
-
- if (curY > 7) {
- relY = (curY < 0x43) ? curY - 7 : 0x43 - 7;
-
- } else if (curY < -7) {
- relY = (curY > -0x43) ? curY + 7 : -0x43 + 7;
- } else {
- relY = 0;
- }
-
- PadUtils_SetRelXY(input, relX, relY);
-}