engine-psx/include/input.h

24 lines
415 B
C
Raw Normal View History

2024-07-19 23:50:47 -03:00
#ifndef INPUT_H
#define INPUT_H
#include <psxpad.h>
2024-11-23 01:00:17 -03:00
typedef struct {
uint16_t current;
uint16_t old;
} InputState;
2024-07-19 23:50:47 -03:00
void pad_init(void);
void pad_update(void);
2024-11-23 01:00:17 -03:00
void input_get_state(InputState *);
uint16_t input_pressing(InputState *, PadButton);
uint16_t input_pressed(InputState *, PadButton);
2024-07-19 23:50:47 -03:00
uint16_t pad_pressing(PadButton b);
uint16_t pad_pressed(PadButton b);
2024-11-23 01:00:17 -03:00
uint16_t pad_pressed_any();
2024-07-19 23:50:47 -03:00
#endif