2016-03-30 23:07:55 +03:00
|
|
|
#ifndef joypad_h
|
|
|
|
#define joypad_h
|
2017-04-17 20:16:17 +03:00
|
|
|
#include "gb_struct_def.h"
|
2018-05-27 19:30:23 +03:00
|
|
|
#include <stdbool.h>
|
2016-03-30 23:07:55 +03:00
|
|
|
|
2017-04-17 20:16:17 +03: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-12 00:37:06 +02:00
|
|
|
void GB_set_key_state_for_player(GB_gameboy_t *gb, GB_key_t index, unsigned player, bool pressed);
|
2016-03-30 23:07:55 +03:00
|
|
|
|
2017-04-17 20:16:17 +03:00
|
|
|
#ifdef GB_INTERNAL
|
|
|
|
void GB_update_joyp(GB_gameboy_t *gb);
|
|
|
|
#endif
|
2016-03-30 23:07:55 +03:00
|
|
|
#endif /* joypad_h */
|