#define PIECES_H_
#define BLK(x, y) ((x) | ((y) << 4))
+#define BLKX(c) ((unsigned char)(c) & 0xf)
+#define BLKY(c) ((unsigned char)(c) >> 4)
-unsigned char pieces[][4][4] = {
+#define NUM_PIECES 7
+
+static unsigned char pieces[NUM_PIECES][4][4] = {
/* straight piece */
{
{BLK(0, 2), BLK(1, 2), BLK(2, 2), BLK(3, 2)},
}
};
+static int piece_spawnpos[NUM_PIECES][2] = {
+ {-1, -2}, {-1, -3}, {-1, -2}, {-1, -2}, {-1, -2}, {-1, -2}, {-1, -2}
+};
+
#endif /* PIECES_H_ */