#ifndef INPUT_H_ #define INPUT_H_ #include "../bang.h" #include "../types/circbuf.h" // Bedrock input device. typedef struct { bool pointer; // Pointer active bool keyboard; // Keyboard active u16 x, y; // Pointer position u16 x_read, y_read; // Read caches for pointer position CircBuf keybuffer; // Queued keypresses u8 gamepad; // Gamepad state bool wake; // Wake flag } InputDevice; // Methods. void input_reset(InputDevice *input); void input_read_x(InputDevice *input); void input_read_y(InputDevice *input); void input_receive_key(InputDevice *input, u8 byte); void input_update_gamepad(InputDevice *input); void input_update_touch(InputDevice *input); #endif