diff options
author | Oxore <oxore@protonmail.com> | 2018-07-09 01:06:04 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2018-07-09 01:06:04 +0300 |
commit | 73ec96ee907f0a8ebdeec20f2058de705b00d65d (patch) | |
tree | 144d4558a6cf91948e2946194406c2268ae6bb7c /include/draw.h | |
parent | 45ebf081cbf623bc258d20f38b68ed6c334316d3 (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 'include/draw.h')
-rw-r--r-- | include/draw.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/include/draw.h b/include/draw.h deleted file mode 100644 index 17bf176..0000000 --- a/include/draw.h +++ /dev/null @@ -1,18 +0,0 @@ -struct window { - sfVideoMode mode; - sfRenderWindow *window; - sfEvent event; -}; - -void painter_init_window(); -void painter_destroy_window(); - -unsigned long painter_register_field(); -void painter_update_field(unsigned long id, struct field *fld); -void painter_destroy_field(unsigned long id); -void painter_destroy_fields(); - -void painter_draw(); - -void painter_destroy_drawables(); -void painter_destroy_all(); |