1 #ifndef joypad_h 2 #define joypad_h 3 #include "gb_struct_def.h" 4 #include <stdbool.h> 5 6 typedef enum { 7 GB_KEY_RIGHT, 8 GB_KEY_LEFT, 9 GB_KEY_UP, 10 GB_KEY_DOWN, 11 GB_KEY_A, 12 GB_KEY_B, 13 GB_KEY_SELECT, 14 GB_KEY_START, 15 GB_KEY_MAX 16 } GB_key_t; 17 18 void GB_set_key_state(GB_gameboy_t *gb, GB_key_t index, bool pressed); 19 void GB_set_key_state_for_player(GB_gameboy_t *gb, GB_key_t index, unsigned player, bool pressed); 20 void GB_icd_set_joyp(GB_gameboy_t *gb, uint8_t value); 21 22 #ifdef GB_INTERNAL 23 void GB_update_joyp(GB_gameboy_t *gb); 24 #endif 25 #endif /* joypad_h */ 26