aboutsummaryrefslogtreecommitdiff
path: root/src/arch/portable.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/portable.h')
-rw-r--r--src/arch/portable.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/arch/portable.h b/src/arch/portable.h
index fdadb02..e9a8dd0 100644
--- a/src/arch/portable.h
+++ b/src/arch/portable.h
@@ -1,12 +1,12 @@
1#define static_cube(c_ufr, c_ubl, c_dfl, c_dbr, c_ufl, c_ubr, c_dfr, c_dbl, \ 1#define STATIC_CUBE(c_ufr, c_ubl, c_dfl, c_dbr, c_ufl, c_ubr, c_dfr, c_dbl, \
2 e_uf, e_ub, e_db, e_df, e_ur, e_ul, e_dl, e_dr, e_fr, e_fl, e_bl, e_br) \ 2 e_uf, e_ub, e_db, e_df, e_ur, e_ul, e_dl, e_dr, e_fr, e_fl, e_bl, e_br) \
3 ((cube_t) { \ 3 ((cube_t) { \
4 .corner = { c_ufr, c_ubl, c_dfl, c_dbr, c_ufl, c_ubr, c_dfr, c_dbl }, \ 4 .corner = { c_ufr, c_ubl, c_dfl, c_dbr, c_ufl, c_ubr, c_dfr, c_dbl }, \
5 .edge = { e_uf, e_ub, e_db, e_df, e_ur, e_ul, \ 5 .edge = { e_uf, e_ub, e_db, e_df, e_ur, e_ul, \
6 e_dl, e_dr, e_fr, e_fl, e_bl, e_br } }) 6 e_dl, e_dr, e_fr, e_fl, e_bl, e_br } })
7#define zero static_cube( \ 7#define ZERO_CUBE STATIC_CUBE( \
8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
9#define solved static_cube( \ 9#define SOLVED_CUBE STATIC_CUBE( \
10 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) 10 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
11 11
12STATIC void 12STATIC void
@@ -80,7 +80,7 @@ compose_corners_inplace(cube_t c1, cube_t c2, cube_t *ret)
80STATIC_INLINE cube_t 80STATIC_INLINE cube_t
81compose_edges(cube_t c1, cube_t c2) 81compose_edges(cube_t c1, cube_t c2)
82{ 82{
83 cube_t ret = zero; 83 cube_t ret = ZERO_CUBE;
84 84
85 compose_edges_inplace(c1, c2, &ret); 85 compose_edges_inplace(c1, c2, &ret);
86 86
@@ -90,7 +90,7 @@ compose_edges(cube_t c1, cube_t c2)
90STATIC_INLINE cube_t 90STATIC_INLINE cube_t
91compose_corners(cube_t c1, cube_t c2) 91compose_corners(cube_t c1, cube_t c2)
92{ 92{
93 cube_t ret = zero; 93 cube_t ret = ZERO_CUBE;
94 94
95 compose_corners_inplace(c1, c2, &ret); 95 compose_corners_inplace(c1, c2, &ret);
96 96
@@ -100,7 +100,7 @@ compose_corners(cube_t c1, cube_t c2)
100STATIC_INLINE cube_t 100STATIC_INLINE cube_t
101compose(cube_t c1, cube_t c2) 101compose(cube_t c1, cube_t c2)
102{ 102{
103 cube_t ret = zero; 103 cube_t ret = ZERO_CUBE;
104 104
105 compose_edges_inplace(c1, c2, &ret); 105 compose_edges_inplace(c1, c2, &ret);
106 compose_corners_inplace(c1, c2, &ret); 106 compose_corners_inplace(c1, c2, &ret);
@@ -244,7 +244,7 @@ invcoord_esep(int64_t esep)
244{ 244{
245 cube_t ret; 245 cube_t ret;
246 246
247 ret = solved; 247 ret = SOLVED_CUBE;
248 invcoord_esep_array(esep % 70, esep / 70, ret.edge); 248 invcoord_esep_array(esep % 70, esep / 70, ret.edge);
249 249
250 return ret; 250 return ret;

Generated with cgit - Back to sebastiano.tronto.net