summaryrefslogtreecommitdiff
path: root/include/tet_conf.h
blob: 14a8c2a570247589224e40b723534b5acbf7b0bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#define windowName_conf   "Tetris CSFML" // Window name
#define OUT_THICK         1
#define UITRANSPARENT     {0,   0,   0,   0  } // Field background
#define UIBGCOLOR         {26,  26,  26,  255} // Field background
#define UIFGINACTIVECOLOR {55,  59,  65,  255} // Field inactive cell outline
#define UIFGACTIVECOLOR   {40,  42,  46,  255} // Field active cell outline
#define LCOLOR            {222, 147, 95,  255} // Orange color of L shape
#define RLCOLOR           {95,  129, 157, 255}
#define ZCOLOR            {165, 66,  66,  255}
#define SCOLOR            {140, 148, 64,  255}
#define BCOLOR            {197, 200, 198, 255}
#define ICOLOR            {94,  141, 135, 255}
#define TCOLOR            {133, 103, 143, 255}

#define moveRepeatLatency1 150000 // microseconds, only for left-right arrows,
                                  // first repeat move when long push
#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_1LINES_SCORE 40
#define RM_2LINES_SCORE 100
#define RM_3LINES_SCORE 300
#define RM_4LINES_SCORE 1200
#define LEVELUP_LINES 10

#define FLD_SIZE_Y  22
#define FLD_SIZE_X  10
#define FLD_BOUND_Y FLD_SIZE_Y + 4
#define FLD_BOUND_X FLD_SIZE_X
#define FLD_POS     (struct vector2i){.x = 10, .y = 10+550-24}
#define CELL_SIZE   (sfVector2f){.x = 23, .y = 23}

#define NXT_SIZE_Y  8
#define NXT_SIZE_X  4
#define NXT_POS     (struct vector2i){.x = 250 + 10 + 30, .y = 300}
#define NXT_SIZE    (struct vector2ui){.x = NXT_SIZE_X, .y = NXT_SIZE_Y}

/*
 * 22..........
 * 21..........
 * 20..........
 * 19..........
 * 18..........
 * 17..........
 * 16..........
 * 15..........
 * 14..........
 * 13..........
 * 12..........
 * 11..........
 * 10..........
 *  9..........
 *  8..........
 *  7..........
 *  6..........
 *  5.......#..
 *  4......##..
 *  3......#...
 *  2.#.##.....
 *  1.##.#..#..
 *  0..#.#.###.
 *   0123456789
 *
 *  L
 *  ..#. .#.. .... ##..
 *  ###. .#.. ###. .#..
 *  .... .##. #... .#..
 *  .... .... .... ....
 *
 *  RL
 *  #... .##. .... .#..
 *  ###. .#.. ###. .#..
 *  .... .#.. ..#. ##..
 *  .... .... .... ....
 *
 *  Z
 *  ##.. ..#. .... .#..
 *  .##. .##. ##.. ##..
 *  .... .#.. .##. #...
 *  .... .... .... ....
 *
 *  S
 *  .##. .#.. .... #...
 *  ##.. .##. .##. ##..
 *  .... ..#. ##.. .#..
 *  .... .... .... ....
 *
 *  Brick
 *  ##.. ##.. ##.. ##..
 *  ##.. ##.. ##.. ##..
 *  .... .... .... ....
 *  .... .... .... ....
 *
 *  I
 *  .#.. .... .#.. ....
 *  .#.. #### .#.. ####
 *  .#.. .... .#.. ....
 *  .#.. .... .#.. ....
 *
 *  T
 *  .#.. .#.. .... .#..
 *  ###. .##. ###. ##..
 *  .... .#.. .#.. .#..
 *  .... .... .... ....
 */