24 lines
398 B
C
24 lines
398 B
C
#ifndef INPUT_H
|
|
#define INPUT_H
|
|
|
|
typedef void (*input_callback_t)();
|
|
|
|
typedef struct {
|
|
int spin;
|
|
int thrust;
|
|
} input_state_t;
|
|
|
|
extern input_state_t input;
|
|
|
|
int input_init();
|
|
void input_cleanup();
|
|
|
|
void input_on_shoot(input_callback_t cb);
|
|
void input_on_restart(input_callback_t cb);
|
|
void input_on_quit(input_callback_t cb);
|
|
void input_on_pause(input_callback_t cb);
|
|
|
|
void input_handle();
|
|
|
|
#endif
|