summaryrefslogtreecommitdiff
path: root/src/shape_maps.c
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2017-06-20 21:01:53 +0700
committerOxore <oxore@protonmail.com>2017-06-20 21:01:53 +0700
commitcd2650182ce710ae7fdfae2c68b91c417d54bc60 (patch)
treea6e008ccac1c9b2e85925c6aea51d78ab3ef7e6a /src/shape_maps.c
parent2af11c35bb687c89fdb35e8d6f45327fc8a842b9 (diff)
Major refactoring!
Diffstat (limited to 'src/shape_maps.c')
-rw-r--r--src/shape_maps.c148
1 files changed, 16 insertions, 132 deletions
diff --git a/src/shape_maps.c b/src/shape_maps.c
index e96ea8f..c89420d 100644
--- a/src/shape_maps.c
+++ b/src/shape_maps.c
@@ -1,4 +1,10 @@
-/* Shapes maps */
+#include "include/common.h"
+/*
+ * Shapes maps
+ *
+ * Arrays are mirrored upside-down
+ *
+ */
/*
* L #1 tYellow
@@ -7,29 +13,11 @@
* .... .##. #... .#..
* .... .... .... ....
*/
-short arrShapeL_a1[4][4] = {
+uint8_t arrShapeL_a1[4][4] = {
{0, 0, 0, 0},
{0, 0, 0, 0},
{1, 1, 1, 0},
{0, 0, 1, 0}};
-
-short arrShapeL_a2[4][4] = {
- {0, 0, 0, 0},
- {0, 1, 1, 0},
- {0, 1, 0, 0},
- {0, 1, 0, 0}};
-
-short arrShapeL_a3[4][4] = {
- {0, 0, 0, 0},
- {1, 0, 0, 0},
- {1, 1, 1, 0},
- {0, 0, 0, 0}};
-
-short arrShapeL_a4[4][4] = {
- {0, 0, 0, 0},
- {0, 1, 0, 0},
- {0, 1, 0, 0},
- {1, 1, 0, 0}};
/*
* RL #2 tBlue
@@ -39,29 +27,11 @@ short arrShapeL_a4[4][4] = {
* .... .... .... ....
*/
-short arrShapeRL_a1[4][4] = {
+uint8_t arrShapeRL_a1[4][4] = {
{0, 0, 0, 0},
{0, 0, 0, 0},
{1, 1, 1, 0},
{1, 0, 0, 0}};
-
-short arrShapeRL_a2[4][4] = {
- {0, 0, 0, 0},
- {0, 1, 0, 0},
- {0, 1, 0, 0},
- {0, 1, 1, 0}};
-
-short arrShapeRL_a3[4][4] = {
- {0, 0, 0, 0},
- {0, 0, 1, 0},
- {1, 1, 1, 0},
- {0, 0, 0, 0}};
-
-short arrShapeRL_a4[4][4] = {
- {0, 0, 0, 0},
- {1, 1, 0, 0},
- {0, 1, 0, 0},
- {0, 1, 0, 0}};
/*
* Z #3
@@ -70,29 +40,11 @@ short arrShapeRL_a4[4][4] = {
* .... .#.. .##. #...
* .... .... .... ....
*/
-short arrShapeZ_a1[4][4] = {
+uint8_t arrShapeZ_a1[4][4] = {
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 1, 1, 0},
{1, 1, 0, 0}};
-
-short arrShapeZ_a2[4][4] = {
- {0, 0, 0, 0},
- {0, 1, 0, 0},
- {0, 1, 1, 0},
- {0, 0, 1, 0}};
-
-short arrShapeZ_a3[4][4] = {
- {0, 0, 0, 0},
- {0, 1, 1, 0},
- {1, 1, 0, 0},
- {0, 0, 0, 0}};
-
-short arrShapeZ_a4[4][4] = {
- {0, 0, 0, 0},
- {1, 0, 0, 0},
- {1, 1, 0, 0},
- {0, 1, 0, 0}};
/*
* S #4
@@ -101,60 +53,26 @@ short arrShapeZ_a4[4][4] = {
* .... ..#. ##.. .#..
* .... .... .... ....
*/
-short arrShapeS_a1[4][4] = {
+uint8_t arrShapeS_a1[4][4] = {
{0, 0, 0, 0},
{0, 0, 0, 0},
{1, 1, 0, 0},
{0, 1, 1, 0}};
-short arrShapeS_a2[4][4] = {
- {0, 0, 0, 0},
- {0, 0, 1, 0},
- {0, 1, 1, 0},
- {0, 1, 0, 0}};
-
-short arrShapeS_a3[4][4] = {
- {0, 0, 0, 0},
- {1, 1, 0, 0},
- {0, 1, 1, 0},
- {0, 0, 0, 0}};
-
-short arrShapeS_a4[4][4] = {
- {0, 0, 0, 0},
- {0, 1, 0, 0},
- {1, 1, 0, 0},
- {1, 0, 0, 0}};
/*
* B #5
- * ##.. ##.. ##.. ##..
- * ##.. ##.. ##.. ##..
+ * .##. .##. .##. .##.
+ * .##. .##. .##. .##.
* .... .... .... ....
* .... .... .... ....
*/
-short arrShapeB_a1[4][4] = {
+uint8_t arrShapeB_a1[4][4] = {
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 1, 1, 0},
{0, 1, 1, 0}};
-short arrShapeB_a2[4][4] = {
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- {0, 1, 1, 0},
- {0, 1, 1, 0}};
-
-short arrShapeB_a3[4][4] = {
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- {0, 1, 1, 0},
- {0, 1, 1, 0}};
-
-short arrShapeB_a4[4][4] = {
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- {0, 1, 1, 0},
- {0, 1, 1, 0}};
/*
* I #6
@@ -163,29 +81,12 @@ short arrShapeB_a4[4][4] = {
* .#.. .... .#.. ....
* .#.. .... .#.. ....
*/
-short arrShapeI_a1[4][4] = {
+uint8_t arrShapeI_a1[4][4] = {
{0, 0, 0, 0},
{0, 0, 0, 0},
{1, 1, 1, 1},
{0, 0, 0, 0}};
-short arrShapeI_a2[4][4] = {
- {0, 1, 0, 0},
- {0, 1, 0, 0},
- {0, 1, 0, 0},
- {0, 1, 0, 0}};
-
-short arrShapeI_a3[4][4] = {
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- {1, 1, 1, 1},
- {0, 0, 0, 0}};
-
-short arrShapeI_a4[4][4] = {
- {0, 1, 0, 0},
- {0, 1, 0, 0},
- {0, 1, 0, 0},
- {0, 1, 0, 0}};
/*
* T #7
@@ -194,26 +95,9 @@ short arrShapeI_a4[4][4] = {
* .... .#.. .#.. .#..
* .... .... .... ....
*/
-short arrShapeT_a1[4][4] = {
+uint8_t arrShapeT_a1[4][4] = {
{0, 0, 0, 0},
{0, 0, 0, 0},
{1, 1, 1, 0},
{0, 1, 0, 0}};
-short arrShapeT_a2[4][4] = {
- {0, 0, 0, 0},
- {0, 1, 0, 0},
- {0, 1, 1, 0},
- {0, 1, 0, 0}};
-
-short arrShapeT_a3[4][4] = {
- {0, 0, 0, 0},
- {0, 1, 0, 0},
- {1, 1, 1, 0},
- {0, 0, 0, 0}};
-
-short arrShapeT_a4[4][4] = {
- {0, 0, 0, 0},
- {0, 1, 0, 0},
- {1, 1, 0, 0},
- {0, 1, 0, 0}}; \ No newline at end of file