summaryrefslogtreecommitdiff
path: root/tetris.c
diff options
context:
space:
mode:
Diffstat (limited to 'tetris.c')
-rw-r--r--tetris.c25
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;
+}