Lephisto/src/input.h

24 lines
479 B
C

#pragma once
#include <SDL/SDL.h>
/* Input types. */
typedef enum {
KEYBIND_NULL,
KEYBIND_KEYBOARD,
KEYBIND_JAXIS,
KEYBIND_JBUTTON
} KeybindType;
/* Set input. */
void input_setDefault(void);
void input_setKeybind(char* keybind, KeybindType type, int key, int reverse);
int input_getKeybind(char* keybind, KeybindType* type, int* reverse);
/* Handle the events. */
void input_handle(SDL_Event* event);
/* Init/Exit. */
void input_init(void);
void input_exit(void);