From: Eric S. Raymond Date: Tue, 29 Nov 1994 03:29:23 +0000 (+0000) Subject: Initial revision X-Git-Tag: 2.1~8 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=3c35e1d8b8489db1d7d7e2c01bba396f2b600e9c;p=tetrix.git Initial revision --- diff --git a/tet.h b/tet.h new file mode 100644 index 0000000..b65f64a --- /dev/null +++ b/tet.h @@ -0,0 +1,57 @@ +#define NO_TYPE 0 +#define NO_CHAR ' ' +#define BRITE_CHAR '$' + +/* type numbers 1-3, 4-7, 9-11 etc represent the white, red, blue etc */ +/* pieces at different rotations */ +#define G_TYPE 4 /* Green pieces */ +#define G_CHAR 'G' +#define R_TYPE 8 /* Red pieces */ +#define R_CHAR 'R' +#define T_TYPE 12 /* Tan pieces */ +#define T_CHAR 'O' +#define W_TYPE 16 /* White pieces */ +#define W_CHAR 'W' +#define V_TYPE 20 /* Violet pieces */ +#define V_CHAR 'V' +#define B_TYPE 24 /* Blue pieces */ +#define B_CHAR 'B' +#define Y_TYPE 28 /* Yellow pieces */ +#define Y_CHAR 'Y' + +#define MINX 15 /* defines corner screen position */ +#define MINY 1 + +#define BOARD_WIDE 10 +#define BOARD_HIGH 20 + +#define MAXX BOARD_WIDE+MINX +#define MAXY BOARD_HIGH+MINY + +#define INBOARD(x, y) ((y)>=MINY && (x)>=MINX && (x)