2016-03-30 20:07:55 +00:00
|
|
|
#ifndef joypad_h
|
|
|
|
#define joypad_h
|
2021-11-07 11:39:18 +00:00
|
|
|
#include "defs.h"
|
2018-05-27 16:30:23 +00:00
|
|
|
#include <stdbool.h>
|
2016-03-30 20:07:55 +00:00
|
|
|
|
2017-04-17 17:16:17 +00:00
|
|
|
typedef enum {
|
|
|
|
GB_KEY_RIGHT,
|
|
|
|
GB_KEY_LEFT,
|
|
|
|
GB_KEY_UP,
|
|
|
|
GB_KEY_DOWN,
|
|
|
|
GB_KEY_A,
|
|
|
|
GB_KEY_B,
|
|
|
|
GB_KEY_SELECT,
|
|
|
|
GB_KEY_START,
|
|
|
|
GB_KEY_MAX
|
|
|
|
} GB_key_t;
|
|
|
|
|
|
|
|
void GB_set_key_state(GB_gameboy_t *gb, GB_key_t index, bool pressed);
|
2018-11-11 22:37:06 +00:00
|
|
|
void GB_set_key_state_for_player(GB_gameboy_t *gb, GB_key_t index, unsigned player, bool pressed);
|
2019-07-16 18:42:57 +00:00
|
|
|
void GB_icd_set_joyp(GB_gameboy_t *gb, uint8_t value);
|
2016-03-30 20:07:55 +00:00
|
|
|
|
2017-04-17 17:16:17 +00:00
|
|
|
#ifdef GB_INTERNAL
|
2021-11-07 12:13:52 +00:00
|
|
|
internal void GB_update_joyp(GB_gameboy_t *gb);
|
2017-04-17 17:16:17 +00:00
|
|
|
#endif
|
2016-03-30 20:07:55 +00:00
|
|
|
#endif /* joypad_h */
|