From 21a0a44853451f3d791bafc80c01deab0ff4c79e Mon Sep 17 00:00:00 2001 From: Oxore Date: Mon, 2 Jul 2018 23:11:26 +0300 Subject: Introduce draw manager, refactor main Move timers to struct game. Partially move field painting to draw manager. --- include/common.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index 275547a..7a85dbc 100644 --- a/include/common.h +++ b/include/common.h @@ -1,13 +1,13 @@ -struct window { - sfVideoMode mode; - sfRenderWindow *window; - sfEvent event; -}; - struct game { - int isStarted; - int scoreCurrent; - int level; - int moveLatency; - int lines; + 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 }; -- cgit v1.2.3