summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2018-12-06 11:09:44 +0300
committerOxore <oxore@protonmail.com>2018-12-06 11:15:59 +0300
commit14f2aadae65713192f1ef722050353c4d781f17e (patch)
treed37920436c0d07fe37601eee8965b14da9e3b519 /include
parent80ff7b315a6b5a9f9c62de5c6b03f52ddf099837 (diff)
Implement "game over" state (scene)
Also rename arrKeys variable to keys.
Diffstat (limited to 'include')
-rw-r--r--include/common.h3
-rw-r--r--include/tet_conf.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 76293c5..2273e4d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -2,10 +2,13 @@ struct game {
size_t level;
int started;
int paused;
+ int over_wait;
+ int over;
int scoreCurrent;
int moveLatency;
int lines;
sfClock *gameTick;
+ sfClock *over_wait_tick;
sfClock *putTick;
sfClock *mTick;
sfClock *repPushDown; // repeat latency when hold Down arrow
diff --git a/include/tet_conf.h b/include/tet_conf.h
index 33a637f..08f8079 100644
--- a/include/tet_conf.h
+++ b/include/tet_conf.h
@@ -12,6 +12,7 @@
#define ICOLOR {94, 141, 135, 255}
#define TCOLOR {133, 103, 143, 255}
+#define GAMEOVERWAIT 700000 // 0.7 second
#define moveRepeatLatency1 150000 // microseconds, only for left-right arrows,
// first repeat move when long push
#define moveRepeatLatency2 30000 // microseconds, for Left, Right and Down