summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2017-12-01 07:25:32 +0300
committerOxore <oxore@protonmail.com>2017-12-01 07:25:32 +0300
commitcd92a5171dd67b795a6fed4c2e635aed8262a876 (patch)
treebee6d7275ab7a1d927e4e08052b0f59d7af5e9fc /include
parentcd02c513c69bd25d1dc214b60048ef85c9bd6917 (diff)
More structure wrapping, more refactoring
Diffstat (limited to 'include')
-rw-r--r--include/common.h6
-rw-r--r--include/functions.h9
-rw-r--r--include/tet_conf.h1
3 files changed, 11 insertions, 5 deletions
diff --git a/include/common.h b/include/common.h
index 8108e11..5f64a2b 100644
--- a/include/common.h
+++ b/include/common.h
@@ -55,6 +55,12 @@ typedef struct Window {
sfEvent event;
} Window;
+typedef struct Game {
+ int isStarted;
+ int scoreCurrent;
+ int level;
+} Game;
+
typedef struct Text {
sfFont *font;
sfText *text;
diff --git a/include/functions.h b/include/functions.h
index 8f7618e..0ed6f1d 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -17,14 +17,13 @@ void rotateShape();
int linesRmScore();
void scoreDisplay(int s, Text *textScore);
void colorizeFld();
-void colorizeActiSh();
+void colorizeActive();
void drawFld(sfRenderWindow *window);
-void menuTick();
-void colorizeRandom();
-void gameover();
+void colorizeRandom(Field *fld);
+void gameover(Game *game);
void genNextShape();
void copyShape(Shape *localSh);
void drawNextShape();
-void cleanupFld();
+void freeFld();
#endif
diff --git a/include/tet_conf.h b/include/tet_conf.h
index 50b17ff..a5f4957 100644
--- a/include/tet_conf.h
+++ b/include/tet_conf.h
@@ -13,6 +13,7 @@
// first repeat move when long push
#define moveRepeatLatency2 30000 // microseconds, for Left, Right and Down
// arrows, the rest repeat move when long push
+#define basicLatency 500000
/*