diff options
author | Oxore <oxore@protonmail.com> | 2017-12-09 11:18:57 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2017-12-09 11:18:57 +0300 |
commit | 0f23a894e51fe11cecb6fd762a6360224717912c (patch) | |
tree | 5b57e64d4bfb773ea3c82e1535eba3174163d881 /include | |
parent | 9e7ca39812cf43df65044c2329ec747060a3d372 (diff) |
Extend playfield to 22, change game over condition, shrink fld from 25 to 22
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 4 | ||||
-rw-r--r-- | include/functions.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/common.h b/include/common.h index 4452bf0..49c15d3 100644 --- a/include/common.h +++ b/include/common.h @@ -28,7 +28,7 @@ typedef struct Shape { char c[4][4]; // array of logic shape cells sfRectangleShape *p[4][4]; // array of physical shape cells sfVector2f cSize; // shape rectangles size variable x/y -} Shape; +} Shape; typedef struct Field { sfVector2i pos; @@ -38,7 +38,7 @@ typedef struct Field { int cOutThick; // Field rectangles outline thickness sfVector2f cSize; // shape rectangles size variable x/y sfVector2i size; -} Field; +} Field; typedef struct Window { sfVideoMode mode; diff --git a/include/functions.h b/include/functions.h index 4f35bab..0e6e26a 100644 --- a/include/functions.h +++ b/include/functions.h @@ -8,9 +8,11 @@ void tKeyCtrl(); void initFld(); void tTick(); -void resetActiveShape(); +void resetActiveShape(Shape *active); void putShape(); +int outOfFieldCheck(Field *fld, Shape *active); void checkLevelUp(Game *game); +int cellCollisionCheckHere(Field *fld, Shape *active); int cellCollisionCheck(int dir); int wallCollisionCheck(); int cellRotCollisionCheck(); |