From 78b8db870a20df98fdeb7d9ef80835895f716714 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Mon, 6 Feb 2023 19:44:28 -0800 Subject: add more files --- tetris.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tetris.c (limited to 'tetris.c') 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 +#include +#include + +#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; +} -- cgit v1.3.1