From cd2650182ce710ae7fdfae2c68b91c417d54bc60 Mon Sep 17 00:00:00 2001 From: Oxore Date: Tue, 20 Jun 2017 21:01:53 +0700 Subject: Major refactoring! --- src/include/common.h | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) (limited to 'src/include/common.h') diff --git a/src/include/common.h b/src/include/common.h index e7624c7..c606560 100644 --- a/src/include/common.h +++ b/src/include/common.h @@ -6,20 +6,40 @@ #include #include #include -#include #include +#include +#include +#include #include "functions.h" #include "tet_conf.h" -//#define EXIT_FAILURE -1 -//#define EXIT_SUCCESS 0 - struct tCell { - short a; // active/empty state of cell - sfColor fColor, oColor; // fill and outline color of cell + uint8_t a; // active/empty state of cell + sfColor fColor; // fill color +}; +struct tCell fldCAtt[20][10];// fld cells attributes + + +/* + * shape coords + * y + * ^. . . . + * |. . . . + * |. . . . + * |. . . . + * 0------->x + * + */ + +struct activeShape { + int x; // x coord of shape's left side + int y; // y coord of shape's bottom + int r; // rotate state, one of four + int t; // shape type + sfColor fColor; // shape color + uint8_t c[4][4]; // array of shape cells }; -struct tCell activeShape[4][4]; // 4x4 block of active crawling shape -struct tCell fld_rAttr[20][10];// fld cells attributes +struct activeShape actiSh; #endif -- cgit v1.2.3