From 9a9711945c2add826e5887aabe2330bee9042b4b Mon Sep 17 00:00:00 2001 From: Oxore Date: Thu, 12 Jul 2018 04:13:15 +0300 Subject: Introduce pause mechanics, refactor a little Introduce Pause mechanics and mention it in README.md. Makefile: replace unnecessary "-MMD -MP" with just "-MD" flag, so it allows to compile with tcc too. Refactor: Rename game.isStarted field to game.started field. Move arrKeys container to engine.c and remove it from main.c. Refactor char iterator in utf8to32_strcpy function. --- src/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 89754ff..bf9014a 100644 --- a/src/main.c +++ b/src/main.c @@ -21,15 +21,14 @@ struct idlist *texts; struct field fld, nxt; struct game game = { - .isStarted = 0, + .started = 0, + .paused = 0, .scoreCurrent = 0, .level = 1, .moveLatency = L00LATENCY, .lines = 0 }; -char arrKeys = 0; - static void handleWindowEvents() { sfEvent event; while (sfRenderWindow_pollEvent(window, &event)) -- cgit v1.2.3