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 /include | |
parent | 6ee4bf59b927c31cf9ba7b340d1b03d598b2a527 (diff) |
Implement NES Tetris scoring system
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 1 | ||||
-rw-r--r-- | include/functions.h | 1 | ||||
-rw-r--r-- | include/tet_conf.h | 20 |
3 files changed, 21 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h index 9e1a847..773cb3f 100644 --- a/include/common.h +++ b/include/common.h @@ -50,6 +50,7 @@ typedef struct Game { int isStarted; int scoreCurrent; int level; + int moveLatency; int lines; } Game; diff --git a/include/functions.h b/include/functions.h index b307a31..f47f816 100644 --- a/include/functions.h +++ b/include/functions.h @@ -12,6 +12,7 @@ void resetActiveShape(Shape *active); void putShape(); int outOfFieldCheck(Field *fld, Shape *active); void checkLevelUp(Game *game); +int getMoveLatencyOfLevel(int level); int cellCollisionCheckHere(Field *fld, Shape *active); int cellCollisionCheck(int dir); int wallCollisionCheck(); diff --git a/include/tet_conf.h b/include/tet_conf.h index 55a4011..44da289 100644 --- a/include/tet_conf.h +++ b/include/tet_conf.h @@ -14,8 +14,26 @@ #define moveRepeatLatency2 30000 // microseconds, for Left, Right and Down // arrows, the rest repeat move when long push #define basicLatency 500000 +#define L00LATENCY 800000 +#define L01LATENCY 716667 +#define L02LATENCY 633334 +#define L03LATENCY 550000 +#define L04LATENCY 466667 +#define L05LATENCY 383334 +#define L06LATENCY 300000 +#define L07LATENCY 216667 +#define L08LATENCY 133334 +#define L09LATENCY 100000 +#define L10LATENCY 83334 +#define L13LATENCY 66667 +#define L16LATENCY 50000 +#define L19LATENCY 33334 +#define L29LATENCY 16667 #define PUT_LATENCY 300000 -#define RM_LINE_SCORE 100 +#define RM_1LINES_SCORE 40 +#define RM_2LINES_SCORE 100 +#define RM_3LINES_SCORE 300 +#define RM_4LINES_SCORE 1200 #define LEVELUP_LINES 10 |