diff options
author | Oxore <oxore@protonmail.com> | 2017-12-09 12:31:13 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2017-12-09 12:31:13 +0300 |
commit | a9574591d86e9ac727da4ad6f6295725f3b2a3a2 (patch) | |
tree | 5c188d29fcf7a1a0e6d738ab21a1a761a550ec61 /src/main.c | |
parent | 6ee4bf59b927c31cf9ba7b340d1b03d598b2a527 (diff) |
Implement NES Tetris scoring system
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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); } |