#include "jinput.h" #include #include "crt.h" namespace input { static const uint8_t *keys = nullptr; static uint8_t keypressed = 0; void init() { keys = SDL_GetKeyboardState(NULL); } bool anyKey() { update(); return keypressed != 0; } bool keyPressed(uint8_t tecla) { update(); return keys[tecla]; } uint8_t getKey() { return keypressed; } void updateKey(uint8_t key) { keypressed = key; } }