summaryrefslogtreecommitdiff
path: root/src/include/common.h
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2017-11-30 15:45:43 +0300
committerOxore <oxore@protonmail.com>2017-11-30 15:45:43 +0300
commit75d123b79dc894f2c2de43f25009b5fa84a00eec (patch)
tree9c4b5a7aa8e2d20d2e2ca9603de3ead03bb75612 /src/include/common.h
parent66783797c33d457e9d4d7ca669a6ad1fa3cf554c (diff)
Redefine structures with typedef; A bit of code movement
Diffstat (limited to 'src/include/common.h')
-rw-r--r--src/include/common.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/include/common.h b/src/include/common.h
index bc3911a..5a3d63e 100644
--- a/src/include/common.h
+++ b/src/include/common.h
@@ -12,11 +12,11 @@
#include <time.h>
#include "tet_conf.h"
-struct tCell {
+typedef struct tCell {
uint8_t a; // active/empty state of cell
sfColor fColor; // fill color
-};
-struct tCell fldCAtt[25][10];// fld cells attributes
+} tCell;
+tCell fldCAtt[25][10];// fld cells attributes
/*
@@ -30,15 +30,13 @@ struct tCell fldCAtt[25][10];// fld cells attributes
*
*/
-struct shapeSt {
+typedef struct shapeSt {
int x; // x coord of shape's left side
int y; // y coord of shape's bottom
int t; // shape type
sfColor fColor; // shape color
uint8_t c[4][4]; // array of shape cells
-};
-
-struct shapeSt actiSh;
-struct shapeSt nxtShape;
+} shapeSt;
+shapeSt actiSh, nxtShape;
#endif