diff options
| author | Preston Pan <preston@nullring.xyz> | 2023-02-06 19:44:28 -0800 |
|---|---|---|
| committer | Preston Pan <preston@nullring.xyz> | 2023-02-06 19:44:28 -0800 |
| commit | 78b8db870a20df98fdeb7d9ef80835895f716714 (patch) | |
| tree | 9bee539fcf35abdef0d3d43e54457b7190fe8e38 /tetris.c | |
| parent | 3088717fca8571c3078ed0d35c11849cabe0799e (diff) | |
add more files
Diffstat (limited to 'tetris.c')
| -rw-r--r-- | tetris.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tetris.c b/tetris.c new file mode 100644 index 0000000..1321d5c --- /dev/null +++ b/tetris.c @@ -0,0 +1,25 @@ +#include <stdlib.h> +#include <stdio.h> +#include <signal.h> + +#define UNUSED(x) (void)(x) + +volatile sig_atomic_t g_int_ctrl_c = 0; +int score = 0; + +void interrupt_handler(int sig) { + UNUSED(sig); + g_int_ctrl_c = 1; +} + +int main (int argc, char **argv) { + int width; + int height; + + /* handle SIGINT interrupts */ + signal(SIGINT, interrupt_handler); + /* Game Loop */ + while (1) { + } + return 0; +} |
