Initial Commit
This commit is contained in:
commit
5314a9d5c5
308 changed files with 190647 additions and 0 deletions
25
include/input.h
Normal file
25
include/input.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef __INPUT_H
|
||||
#define __INPUT_H
|
||||
|
||||
typedef enum {
|
||||
ACTION_ROTATE,
|
||||
ACTION_MOVE_LEFT,
|
||||
ACTION_MOVE_RIGHT,
|
||||
ACTION_DROP,
|
||||
ACTION_QUIT,
|
||||
} action_t;
|
||||
|
||||
#define NUM_ACTIONS 5
|
||||
|
||||
void input_init();
|
||||
|
||||
void input_update();
|
||||
|
||||
// check if an action is triggered repeatedly.
|
||||
int input_repeat(action_t action);
|
||||
|
||||
// check if an action is triggered once.
|
||||
// eg. If a key was pressed.
|
||||
int input_once(action_t action);
|
||||
|
||||
#endif /* !__INPUT_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue