From a9574591d86e9ac727da4ad6f6295725f3b2a3a2 Mon Sep 17 00:00:00 2001 From: Oxore Date: Sat, 9 Dec 2017 12:31:13 +0300 Subject: Implement NES Tetris scoring system --- src/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index af6f6ba..8c1d7a1 100644 --- a/src/main.c +++ b/src/main.c @@ -13,7 +13,13 @@ #include "tet_conf.h" Window w = {.mode = {450, 570, 32}}; -Game game = {.isStarted = 0, .scoreCurrent = 0, .level = 1, .lines = 0}; +Game game = { + .isStarted = 0, + .scoreCurrent = 0, + .level = 0, + .moveLatency = L00LATENCY, + .lines = 0 +}; List *texts; sfFont *fontScore; Shape active, next; @@ -90,7 +96,7 @@ void gameLoop() { void menuTick() { - if(sfClock_getElapsedTime(mTick).microseconds >= basicLatency/game.level) { + if(sfClock_getElapsedTime(mTick).microseconds >= basicLatency) { sfClock_restart(mTick); colorizeRandom(&fld); } -- cgit v1.2.3