1
0
Fork 0

Initial Commit

This commit is contained in:
Henrik Hautakoski 2025-07-04 07:34:31 +02:00
commit 5314a9d5c5
308 changed files with 190647 additions and 0 deletions

25
include/input.h Normal file
View 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 */