1 /* Tetrinet for Linux, by Andrew Church <achurch@achurch.org>
2 * This program is public domain.
4 * Tetris constants and routine declarations.
10 /*************************************************************************/
12 #define PIECE_BAR 0 /* Straight bar */
13 #define PIECE_SQUARE 1 /* Square block */
14 #define PIECE_L_REVERSE 2 /* Reversed L block */
15 #define PIECE_L 3 /* L block */
16 #define PIECE_Z 4 /* Z block */
17 #define PIECE_S 5 /* S block */
18 #define PIECE_T 6 /* T block */
20 #define SPECIAL_A 0 /* Add line */
21 #define SPECIAL_C 1 /* Clear line */
22 #define SPECIAL_N 2 /* Nuke field */
23 #define SPECIAL_R 3 /* Clear random blocks */
24 #define SPECIAL_S 4 /* Switch fields */
25 #define SPECIAL_B 5 /* Clear special blocks */
26 #define SPECIAL_G 6 /* Block gravity */
27 #define SPECIAL_Q 7 /* Blockquake */
28 #define SPECIAL_O 8 /* Block bomb */
30 /*************************************************************************/
32 #define MAX_SPECIALS 64
34 extern int piecefreq
[7], specialfreq
[9];
36 extern int initial_level
, lines_per_level
, level_inc
, level_average
;
37 extern int special_lines
, special_count
, special_capacity
;
38 extern Field fields
[6];
41 extern char specials
[MAX_SPECIALS
];
42 extern int next_piece
;
44 extern void init_shapes(void);
45 extern int get_shape(int piece
, int rotation
, char buf
[4][4]);
47 extern void new_piece(void);
48 extern void step_down(void);
49 extern void do_special(const char *type
, int from
, int to
);
51 extern int tetris_timeout(void);
52 extern void tetris_timeout_action(void);
53 extern void tetris_input(int c
);
55 /*************************************************************************/