summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2017-12-09 12:31:13 +0300
committerOxore <oxore@protonmail.com>2017-12-09 12:31:13 +0300
commita9574591d86e9ac727da4ad6f6295725f3b2a3a2 (patch)
tree5c188d29fcf7a1a0e6d738ab21a1a761a550ec61 /src/main.c
parent6ee4bf59b927c31cf9ba7b340d1b03d598b2a527 (diff)
Implement NES Tetris scoring system
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
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);
}