diff options
author | Oxore <oxore@protonmail.com> | 2018-07-03 15:11:54 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2018-07-03 15:11:54 +0300 |
commit | ed8127a72e1a2d2703372d5b5dfa8d96703ec3bb (patch) | |
tree | 80f340c64861913f2dc648c2c7280c144b988881 /include/common.h | |
parent | 21a0a44853451f3d791bafc80c01deab0ff4c79e (diff) |
Refactor field, refactor next shape drawing
Refactor field functions names. Transfer next shape drawing to painter.
Introduce idlist struct with foreach function. Refactor config.
Introduce color map array instead of "switch case" statement bloating
while coloring rectangles. Decouple field and shape structs from SFML
sfVector2 structs by introducing own vector2i and vector2ui structs.
Also remove sfRectangleShape members form field an shape structs.
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/common.h b/include/common.h index 7a85dbc..098ea9e 100644 --- a/include/common.h +++ b/include/common.h @@ -1,13 +1,13 @@ struct game { - int isStarted; - int scoreCurrent; - int level; - int moveLatency; - int lines; - sfClock *gameTick; - sfClock *putTick; - sfClock *mTick; - sfClock *repPushDown; // Clock for repeat latency when Down arrow long push - sfClock *repKeyLeft; // Clock for repeat latency when Left arrow long push - sfClock *repKeyRight; // Clock for repeat latency when Left arrow long push + unsigned int level; + int isStarted; + int scoreCurrent; + int moveLatency; + int lines; + sfClock *gameTick; + sfClock *putTick; + sfClock *mTick; + sfClock *repPushDown; // repeat latency when hold Down arrow + sfClock *repKeyLeft; // repeat latency when hold Left arrow + sfClock *repKeyRight; // repeat latency when hold Left arrow }; |