fencer/src/input.h
2023-10-01 15:22:27 +02:00

20 lines
579 B
C

#ifndef _fencer_input_h
#define _fencer_input_h
#include <SDL2/SDL_events.h>
#include <SDL2/SDL_scancode.h>
#include <SDL2/SDL_keyboard.h>
typedef void (*InputActionDelegate)(int value);
extern void input_init();
extern void input_clean();
extern void input_handle_event(SDL_Event event);
extern void input_add_axis_action(SDL_Scancode negative, SDL_Scancode positive, InputActionDelegate delegate);
extern void input_add_key_action(SDL_Scancode key, InputActionDelegate delegate);
extern void input_remove_actions(InputActionDelegate delegate);
#endif // !_fencer_input_h