31 lines
412 B
C
31 lines
412 B
C
#pragma once
|
|
|
|
enum Key {
|
|
K_LEFT,
|
|
K_RIGHT,
|
|
K_UP,
|
|
K_DOWN,
|
|
K_JUMP,
|
|
K_POLARITY,
|
|
K_EXIT,
|
|
K_SKIP,
|
|
K_EDITOR,
|
|
K_SCROLL_UP,
|
|
K_SCROLL_DOWN,
|
|
K_DEBUG,
|
|
K_COUNT
|
|
};
|
|
enum KeyState { KS_UP, KS_DOWN, KS_PRESS };
|
|
|
|
struct Input {
|
|
enum Key keys[K_COUNT];
|
|
enum KeyState states[K_COUNT];
|
|
};
|
|
|
|
void input_init(void);
|
|
void input_update(void);
|
|
|
|
int input_down(enum Key);
|
|
int input_pressed(enum Key);
|
|
int input_up(enum Key);
|