blob: 8bc9c6face641f2581458c64bbbd4a706d581ab2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef LIBU64_PAD_H
#define LIBU64_PAD_H
#include "ultra64.h"
typedef struct Input {
/* 0x00 */ OSContPad cur;
/* 0x06 */ OSContPad prev;
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
/* 0x12 */ OSContPad rel; // X/Y store adjusted
} Input; // size = 0x18
void pad_init(Input* input);
void pad_cleanup(void);
void pad_flush(Input* input);
s32 pad_push_only(Input* input, u16 value);
s32 pad_push_also(Input* input, u16 key);
s32 pad_on_trigger(Input* input, u16 key);
s32 pad_off_trigger(Input* input, u16 key);
u16 pad_button(Input* input);
u16 pad_trigger(Input* input);
s8 pad_physical_stick_x(Input* input);
s8 pad_physical_stick_y(Input* input);
void pad_set_logical_stick(Input* input, s32 x, s32 y);
s8 pad_logical_stick_x(Input* input);
s8 pad_logical_stick_y(Input* input);
s8 pad_stick_x(Input* input);
s8 pad_stick_y(Input* input);
void pad_correct_stick(Input* input);
#endif
|