From 14f2aadae65713192f1ef722050353c4d781f17e Mon Sep 17 00:00:00 2001 From: Oxore Date: Thu, 6 Dec 2018 11:09:44 +0300 Subject: Implement "game over" state (scene) Also rename arrKeys variable to keys. --- include/common.h | 3 +++ include/tet_conf.h | 1 + 2 files changed, 4 insertions(+) (limited to 'include') 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 -- cgit v1.2.3