summaryrefslogtreecommitdiff
path: root/src/field.c
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2018-07-09 01:06:04 +0300
committerOxore <oxore@protonmail.com>2018-07-09 01:06:04 +0300
commit73ec96ee907f0a8ebdeec20f2058de705b00d65d (patch)
tree144d4558a6cf91948e2946194406c2268ae6bb7c /src/field.c
parent45ebf081cbf623bc258d20f38b68ed6c334316d3 (diff)
Finish painter, refactor game logic & keys handling
Add dependencies in Makefile: now it tracks headers too! Introduce texts in painter. Delegate all the window painting to the painter. Refactor texts from yaml parsing. Remove overcomplicated keymaps and lists of keymaps of... Whatever! Just let em go! Simple idlist with foreach is more than enough. Make displayable values be separate text objects which consists only of a number value that rendered every tick and then displayed. Refactor game logic: make state machine look much obvious with transition functions. Refactor long if-else and switch-case statement chains: replace them with arrays of values (it actually takes more lines of code :P) Refactor keys handling: shorten and separate shape moving code to functions.
Diffstat (limited to 'src/field.c')
-rw-r--r--src/field.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/field.c b/src/field.c
index 37680ae..18b4fed 100644
--- a/src/field.c
+++ b/src/field.c
@@ -2,6 +2,7 @@
#include <string.h>
#include <SFML/Graphics/RectangleShape.h>
+#include "vector.h"
#include "field.h"
#include "tet_conf.h"