aboutsummaryrefslogtreecommitdiff
path: root/src/_trans_arr.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-11-01 19:26:09 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-11-01 19:26:09 +0100
commit08efbd62ef956327924aaea1fcfa97fde4dc1678 (patch)
tree656d9f6ab50eee73a6e7fd79098e0dcfa1fc9034 /src/_trans_arr.c
parentd65ce8e86b517ef3f7d48cf5ded1101444e05b2b (diff)
downloadnissy-core-08efbd62ef956327924aaea1fcfa97fde4dc1678.tar.gz
nissy-core-08efbd62ef956327924aaea1fcfa97fde4dc1678.zip
Reworked moves and transformations, moved some stuff
Diffstat (limited to 'src/_trans_arr.c')
-rw-r--r--src/_trans_arr.c952
1 files changed, 952 insertions, 0 deletions
diff --git a/src/_trans_arr.c b/src/_trans_arr.c
new file mode 100644
index 0000000..3a7c843
--- /dev/null
+++ b/src/_trans_arr.c
@@ -0,0 +1,952 @@
1static inline cube_t
2flipallcorners(cube_t c)
3{
4 uint8_t i, piece, orien;
5 cube_t ret;
6
7 ret = c;
8 for (i = 0; i < 8; i++) {
9 piece = get_corner(c, i);
10 orien = ((piece << 1) | (piece >> 1)) & _cobits2;
11 set_corner(ret, i, (piece & _pbits) | orien);
12 }
13
14 return ret;
15}
16
17static inline cube_t
18inline_trans_UFr(cube_t c)
19{
20 cube_t ret;
21 cube_t tn = {
22 .c = {0, 1, 2, 3, 4, 5, 6, 7},
23 .e = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
24 };
25 cube_t ti = {
26 .c = {0, 1, 2, 3, 4, 5, 6, 7},
27 .e = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
28 };
29
30 ret = compose(tn, c);
31 ret = compose(ret, ti);
32
33 return ret;
34}
35
36static inline cube_t
37inline_trans_ULr(cube_t c)
38{
39 cube_t ret;
40 cube_t tn = {
41 .c = {4, 5, 7, 6, 1, 0, 2, 3},
42 .e = {5, 4, 7, 6, 0, 1, 2, 3, 25, 26, 27, 24}
43 };
44 cube_t ti = {
45 .c = {5, 4, 6, 7, 0, 1, 3, 2},
46 .e = {4, 5, 6, 7, 1, 0, 3, 2, 27, 24, 25, 26}
47 };
48
49 ret = compose(tn, c);
50 ret = compose(ret, ti);
51
52 return ret;
53}
54
55static inline cube_t
56inline_trans_UBr(cube_t c)
57{
58 cube_t ret;
59 cube_t tn = {
60 .c = {1, 0, 3, 2, 5, 4, 7, 6},
61 .e = {1, 0, 3, 2, 5, 4, 7, 6, 10, 11, 8, 9}
62 };
63 cube_t ti = {
64 .c = {1, 0, 3, 2, 5, 4, 7, 6},
65 .e = {1, 0, 3, 2, 5, 4, 7, 6, 10, 11, 8, 9}
66 };
67
68 ret = compose(tn, c);
69 ret = compose(ret, ti);
70
71 return ret;
72}
73
74static inline cube_t
75inline_trans_URr(cube_t c)
76{
77 cube_t ret;
78 cube_t tn = {
79 .c = {5, 4, 6, 7, 0, 1, 3, 2},
80 .e = {4, 5, 6, 7, 1, 0, 3, 2, 27, 24, 25, 26}
81 };
82 cube_t ti = {
83 .c = {4, 5, 7, 6, 1, 0, 2, 3},
84 .e = {5, 4, 7, 6, 0, 1, 2, 3, 25, 26, 27, 24}
85 };
86
87 ret = compose(tn, c);
88 ret = compose(ret, ti);
89
90 return ret;
91}
92
93static inline cube_t
94inline_trans_DFr(cube_t c)
95{
96 cube_t ret;
97 cube_t tn = {
98 .c = {2, 3, 0, 1, 6, 7, 4, 5},
99 .e = {3, 2, 1, 0, 6, 7, 4, 5, 9, 8, 11, 10}
100 };
101 cube_t ti = {
102 .c = {2, 3, 0, 1, 6, 7, 4, 5},
103 .e = {3, 2, 1, 0, 6, 7, 4, 5, 9, 8, 11, 10}
104 };
105
106 ret = compose(tn, c);
107 ret = compose(ret, ti);
108
109 return ret;
110}
111
112static inline cube_t
113inline_trans_DLr(cube_t c)
114{
115 cube_t ret;
116 cube_t tn = {
117 .c = {7, 6, 4, 5, 2, 3, 1, 0},
118 .e = {6, 7, 4, 5, 2, 3, 0, 1, 26, 25, 24, 27}
119 };
120 cube_t ti = {
121 .c = {7, 6, 4, 5, 2, 3, 1, 0},
122 .e = {6, 7, 4, 5, 2, 3, 0, 1, 26, 25, 24, 27}
123 };
124
125 ret = compose(tn, c);
126 ret = compose(ret, ti);
127
128 return ret;
129}
130
131static inline cube_t
132inline_trans_DBr(cube_t c)
133{
134 cube_t ret;
135 cube_t tn = {
136 .c = {3, 2, 1, 0, 7, 6, 5, 4},
137 .e = {2, 3, 0, 1, 7, 6, 5, 4, 11, 10, 9, 8}
138 };
139 cube_t ti = {
140 .c = {3, 2, 1, 0, 7, 6, 5, 4},
141 .e = {2, 3, 0, 1, 7, 6, 5, 4, 11, 10, 9, 8}
142 };
143
144 ret = compose(tn, c);
145 ret = compose(ret, ti);
146
147 return ret;
148}
149
150static inline cube_t
151inline_trans_DRr(cube_t c)
152{
153 cube_t ret;
154 cube_t tn = {
155 .c = {6, 7, 5, 4, 3, 2, 0, 1},
156 .e = {7, 6, 5, 4, 3, 2, 1, 0, 24, 27, 26, 25}
157 };
158 cube_t ti = {
159 .c = {6, 7, 5, 4, 3, 2, 0, 1},
160 .e = {7, 6, 5, 4, 3, 2, 1, 0, 24, 27, 26, 25}
161 };
162
163 ret = compose(tn, c);
164 ret = compose(ret, ti);
165
166 return ret;
167}
168
169static inline cube_t
170inline_trans_RUr(cube_t c)
171{
172 cube_t ret;
173 cube_t tn = {
174 .c = {64, 67, 65, 66, 37, 38, 36, 39},
175 .e = {20, 23, 22, 21, 24, 27, 26, 25, 0, 1, 2, 3}
176 };
177 cube_t ti = {
178 .c = {32, 34, 35, 33, 70, 68, 69, 71},
179 .e = {8, 9, 10, 11, 16, 19, 18, 17, 20, 23, 22, 21}
180 };
181
182 ret = compose(tn, c);
183 ret = compose(ret, ti);
184
185 return ret;
186}
187
188static inline cube_t
189inline_trans_RFr(cube_t c)
190{
191 cube_t ret;
192 cube_t tn = {
193 .c = {38, 37, 36, 39, 64, 67, 66, 65},
194 .e = {24, 27, 26, 25, 23, 20, 21, 22, 19, 16, 17, 18}
195 };
196 cube_t ti = {
197 .c = {36, 39, 38, 37, 66, 65, 64, 67},
198 .e = {25, 26, 27, 24, 21, 22, 23, 20, 16, 19, 18, 17}
199 };
200
201 ret = compose(tn, c);
202 ret = compose(ret, ti);
203
204 return ret;
205}
206
207static inline cube_t
208inline_trans_RDr(cube_t c)
209{
210 cube_t ret;
211 cube_t tn = {
212 .c = {67, 64, 66, 65, 38, 37, 39, 36},
213 .e = {23, 20, 21, 22, 27, 24, 25, 26, 2, 3, 0, 1}
214 };
215 cube_t ti = {
216 .c = {33, 35, 34, 32, 71, 69, 68, 70},
217 .e = {10, 11, 8, 9, 17, 18, 19, 16, 21, 22, 23, 20}
218 };
219
220 ret = compose(tn, c);
221 ret = compose(ret, ti);
222
223 return ret;
224}
225
226static inline cube_t
227inline_trans_RBr(cube_t c)
228{
229 cube_t ret;
230 cube_t tn = {
231 .c = {37, 38, 39, 36, 67, 64, 65, 66},
232 .e = {27, 24, 25, 26, 20, 23, 22, 21, 17, 18, 19, 16}
233 };
234 cube_t ti = {
235 .c = {37, 38, 39, 36, 67, 64, 65, 66},
236 .e = {27, 24, 25, 26, 20, 23, 22, 21, 17, 18, 19, 16}
237 };
238
239 ret = compose(tn, c);
240 ret = compose(ret, ti);
241
242 return ret;
243}
244
245static inline cube_t
246inline_trans_LUr(cube_t c)
247{
248 cube_t ret;
249 cube_t tn = {
250 .c = {65, 66, 64, 67, 36, 39, 37, 38},
251 .e = {21, 22, 23, 20, 26, 25, 24, 27, 1, 0, 3, 2}
252 };
253 cube_t ti = {
254 .c = {34, 32, 33, 35, 68, 70, 71, 69},
255 .e = {9, 8, 11, 10, 19, 16, 17, 18, 22, 21, 20, 23}
256 };
257
258 ret = compose(tn, c);
259 ret = compose(ret, ti);
260
261 return ret;
262}
263
264static inline cube_t
265inline_trans_LFr(cube_t c)
266{
267 cube_t ret;
268 cube_t tn = {
269 .c = {36, 39, 38, 37, 66, 65, 64, 67},
270 .e = {25, 26, 27, 24, 21, 22, 23, 20, 16, 19, 18, 17}
271 };
272 cube_t ti = {
273 .c = {38, 37, 36, 39, 64, 67, 66, 65},
274 .e = {24, 27, 26, 25, 23, 20, 21, 22, 19, 16, 17, 18}
275 };
276
277 ret = compose(tn, c);
278 ret = compose(ret, ti);
279
280 return ret;
281}
282
283static inline cube_t
284inline_trans_LDr(cube_t c)
285{
286 cube_t ret;
287 cube_t tn = {
288 .c = {66, 65, 67, 64, 39, 36, 38, 37},
289 .e = {22, 21, 20, 23, 25, 26, 27, 24, 3, 2, 1, 0}
290 };
291 cube_t ti = {
292 .c = {35, 33, 32, 34, 69, 71, 70, 68},
293 .e = {11, 10, 9, 8, 18, 17, 16, 19, 23, 20, 21, 22}
294 };
295
296 ret = compose(tn, c);
297 ret = compose(ret, ti);
298
299 return ret;
300}
301
302static inline cube_t
303inline_trans_LBr(cube_t c)
304{
305 cube_t ret;
306 cube_t tn = {
307 .c = {39, 36, 37, 38, 65, 66, 67, 64},
308 .e = {26, 25, 24, 27, 22, 21, 20, 23, 18, 17, 16, 19}
309 };
310 cube_t ti = {
311 .c = {39, 36, 37, 38, 65, 66, 67, 64},
312 .e = {26, 25, 24, 27, 22, 21, 20, 23, 18, 17, 16, 19}
313 };
314
315 ret = compose(tn, c);
316 ret = compose(ret, ti);
317
318 return ret;
319}
320
321static inline cube_t
322inline_trans_FUr(cube_t c)
323{
324 cube_t ret;
325 cube_t tn = {
326 .c = {68, 70, 69, 71, 32, 34, 33, 35},
327 .e = {16, 19, 18, 17, 9, 8, 11, 10, 5, 4, 7, 6}
328 };
329 cube_t ti = {
330 .c = {68, 70, 69, 71, 32, 34, 33, 35},
331 .e = {16, 19, 18, 17, 9, 8, 11, 10, 5, 4, 7, 6}
332 };
333
334 ret = compose(tn, c);
335 ret = compose(ret, ti);
336
337 return ret;
338}
339
340static inline cube_t
341inline_trans_FRr(cube_t c)
342{
343 cube_t ret;
344 cube_t tn = {
345 .c = {32, 34, 35, 33, 70, 68, 69, 71},
346 .e = {8, 9, 10, 11, 16, 19, 18, 17, 20, 23, 22, 21}
347 };
348 cube_t ti = {
349 .c = {64, 67, 65, 66, 37, 38, 36, 39},
350 .e = {20, 23, 22, 21, 24, 27, 26, 25, 0, 1, 2, 3}
351 };
352
353 ret = compose(tn, c);
354 ret = compose(ret, ti);
355
356 return ret;
357}
358
359static inline cube_t
360inline_trans_FDr(cube_t c)
361{
362 cube_t ret;
363 cube_t tn = {
364 .c = {70, 68, 71, 69, 34, 32, 35, 33},
365 .e = {19, 16, 17, 18, 8, 9, 10, 11, 7, 6, 5, 4}
366 };
367 cube_t ti = {
368 .c = {69, 71, 68, 70, 33, 35, 32, 34},
369 .e = {17, 18, 19, 16, 11, 10, 9, 8, 4, 5, 6, 7}
370 };
371
372 ret = compose(tn, c);
373 ret = compose(ret, ti);
374
375 return ret;
376}
377
378static inline cube_t
379inline_trans_FLr(cube_t c)
380{
381 cube_t ret;
382 cube_t tn = {
383 .c = {34, 32, 33, 35, 68, 70, 71, 69},
384 .e = {9, 8, 11, 10, 19, 16, 17, 18, 22, 21, 20, 23}
385 };
386 cube_t ti = {
387 .c = {65, 66, 64, 67, 36, 39, 37, 38},
388 .e = {21, 22, 23, 20, 26, 25, 24, 27, 1, 0, 3, 2}
389 };
390
391 ret = compose(tn, c);
392 ret = compose(ret, ti);
393
394 return ret;
395}
396
397static inline cube_t
398inline_trans_BUr(cube_t c)
399{
400 cube_t ret;
401 cube_t tn = {
402 .c = {69, 71, 68, 70, 33, 35, 32, 34},
403 .e = {17, 18, 19, 16, 11, 10, 9, 8, 4, 5, 6, 7}
404 };
405 cube_t ti = {
406 .c = {70, 68, 71, 69, 34, 32, 35, 33},
407 .e = {19, 16, 17, 18, 8, 9, 10, 11, 7, 6, 5, 4}
408 };
409
410 ret = compose(tn, c);
411 ret = compose(ret, ti);
412
413 return ret;
414}
415
416static inline cube_t
417inline_trans_BRr(cube_t c)
418{
419 cube_t ret;
420 cube_t tn = {
421 .c = {35, 33, 32, 34, 69, 71, 70, 68},
422 .e = {11, 10, 9, 8, 18, 17, 16, 19, 23, 20, 21, 22}
423 };
424 cube_t ti = {
425 .c = {66, 65, 67, 64, 39, 36, 38, 37},
426 .e = {22, 21, 20, 23, 25, 26, 27, 24, 3, 2, 1, 0}
427 };
428
429 ret = compose(tn, c);
430 ret = compose(ret, ti);
431
432 return ret;
433}
434
435static inline cube_t
436inline_trans_BDr(cube_t c)
437{
438 cube_t ret;
439 cube_t tn = {
440 .c = {71, 69, 70, 68, 35, 33, 34, 32},
441 .e = {18, 17, 16, 19, 10, 11, 8, 9, 6, 7, 4, 5}
442 };
443 cube_t ti = {
444 .c = {71, 69, 70, 68, 35, 33, 34, 32},
445 .e = {18, 17, 16, 19, 10, 11, 8, 9, 6, 7, 4, 5}
446 };
447
448 ret = compose(tn, c);
449 ret = compose(ret, ti);
450
451 return ret;
452}
453
454static inline cube_t
455inline_trans_BLr(cube_t c)
456{
457 cube_t ret;
458 cube_t tn = {
459 .c = {33, 35, 34, 32, 71, 69, 68, 70},
460 .e = {10, 11, 8, 9, 17, 18, 19, 16, 21, 22, 23, 20}
461 };
462 cube_t ti = {
463 .c = {67, 64, 66, 65, 38, 37, 39, 36},
464 .e = {23, 20, 21, 22, 27, 24, 25, 26, 2, 3, 0, 1}
465 };
466
467 ret = compose(tn, c);
468 ret = compose(ret, ti);
469
470 return ret;
471}
472
473static inline cube_t
474inline_trans_UFm(cube_t c)
475{
476 cube_t ret;
477 cube_t tn = {
478 .c = {4, 5, 6, 7, 0, 1, 2, 3},
479 .e = {0, 1, 2, 3, 5, 4, 7, 6, 9, 8, 11, 10}
480 };
481 cube_t ti = {
482 .c = {4, 5, 6, 7, 0, 1, 2, 3},
483 .e = {0, 1, 2, 3, 5, 4, 7, 6, 9, 8, 11, 10}
484 };
485
486 ret = compose(tn, c);
487 ret = compose(ret, ti);
488 ret = flipallcorners(ret);
489
490 return ret;
491}
492
493static inline cube_t
494inline_trans_ULm(cube_t c)
495{
496 cube_t ret;
497 cube_t tn = {
498 .c = {0, 1, 3, 2, 5, 4, 6, 7},
499 .e = {4, 5, 6, 7, 0, 1, 2, 3, 24, 27, 26, 25}
500 };
501 cube_t ti = {
502 .c = {0, 1, 3, 2, 5, 4, 6, 7},
503 .e = {4, 5, 6, 7, 0, 1, 2, 3, 24, 27, 26, 25}
504 };
505
506 ret = compose(tn, c);
507 ret = compose(ret, ti);
508 ret = flipallcorners(ret);
509
510 return ret;
511}
512
513static inline cube_t
514inline_trans_UBm(cube_t c)
515{
516 cube_t ret;
517 cube_t tn = {
518 .c = {5, 4, 7, 6, 1, 0, 3, 2},
519 .e = {1, 0, 3, 2, 4, 5, 6, 7, 11, 10, 9, 8}
520 };
521 cube_t ti = {
522 .c = {5, 4, 7, 6, 1, 0, 3, 2},
523 .e = {1, 0, 3, 2, 4, 5, 6, 7, 11, 10, 9, 8}
524 };
525
526 ret = compose(tn, c);
527 ret = compose(ret, ti);
528 ret = flipallcorners(ret);
529
530 return ret;
531}
532
533static inline cube_t
534inline_trans_URm(cube_t c)
535{
536 cube_t ret;
537 cube_t tn = {
538 .c = {1, 0, 2, 3, 4, 5, 7, 6},
539 .e = {5, 4, 7, 6, 1, 0, 3, 2, 26, 25, 24, 27}
540 };
541 cube_t ti = {
542 .c = {1, 0, 2, 3, 4, 5, 7, 6},
543 .e = {5, 4, 7, 6, 1, 0, 3, 2, 26, 25, 24, 27}
544 };
545
546 ret = compose(tn, c);
547 ret = compose(ret, ti);
548 ret = flipallcorners(ret);
549
550 return ret;
551}
552
553static inline cube_t
554inline_trans_DFm(cube_t c)
555{
556 cube_t ret;
557 cube_t tn = {
558 .c = {6, 7, 4, 5, 2, 3, 0, 1},
559 .e = {3, 2, 1, 0, 7, 6, 5, 4, 8, 9, 10, 11}
560 };
561 cube_t ti = {
562 .c = {6, 7, 4, 5, 2, 3, 0, 1},
563 .e = {3, 2, 1, 0, 7, 6, 5, 4, 8, 9, 10, 11}
564 };
565
566 ret = compose(tn, c);
567 ret = compose(ret, ti);
568 ret = flipallcorners(ret);
569
570 return ret;
571}
572
573static inline cube_t
574inline_trans_DLm(cube_t c)
575{
576 cube_t ret;
577 cube_t tn = {
578 .c = {3, 2, 0, 1, 6, 7, 5, 4},
579 .e = {7, 6, 5, 4, 2, 3, 0, 1, 27, 24, 25, 26}
580 };
581 cube_t ti = {
582 .c = {2, 3, 1, 0, 7, 6, 4, 5},
583 .e = {6, 7, 4, 5, 3, 2, 1, 0, 25, 26, 27, 24}
584 };
585
586 ret = compose(tn, c);
587 ret = compose(ret, ti);
588 ret = flipallcorners(ret);
589
590 return ret;
591}
592
593static inline cube_t
594inline_trans_DBm(cube_t c)
595{
596 cube_t ret;
597 cube_t tn = {
598 .c = {7, 6, 5, 4, 3, 2, 1, 0},
599 .e = {2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9}
600 };
601 cube_t ti = {
602 .c = {7, 6, 5, 4, 3, 2, 1, 0},
603 .e = {2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9}
604 };
605
606 ret = compose(tn, c);
607 ret = compose(ret, ti);
608 ret = flipallcorners(ret);
609
610 return ret;
611}
612
613static inline cube_t
614inline_trans_DRm(cube_t c)
615{
616 cube_t ret;
617 cube_t tn = {
618 .c = {2, 3, 1, 0, 7, 6, 4, 5},
619 .e = {6, 7, 4, 5, 3, 2, 1, 0, 25, 26, 27, 24}
620 };
621 cube_t ti = {
622 .c = {3, 2, 0, 1, 6, 7, 5, 4},
623 .e = {7, 6, 5, 4, 2, 3, 0, 1, 27, 24, 25, 26}
624 };
625
626 ret = compose(tn, c);
627 ret = compose(ret, ti);
628 ret = flipallcorners(ret);
629
630 return ret;
631}
632
633static inline cube_t
634inline_trans_RUm(cube_t c)
635{
636 cube_t ret;
637 cube_t tn = {
638 .c = {68, 71, 69, 70, 33, 34, 32, 35},
639 .e = {21, 22, 23, 20, 25, 26, 27, 24, 0, 1, 2, 3}
640 };
641 cube_t ti = {
642 .c = {70, 68, 69, 71, 32, 34, 35, 33},
643 .e = {8, 9, 10, 11, 19, 16, 17, 18, 23, 20, 21, 22}
644 };
645
646 ret = compose(tn, c);
647 ret = compose(ret, ti);
648 ret = flipallcorners(ret);
649
650 return ret;
651}
652
653static inline cube_t
654inline_trans_RFm(cube_t c)
655{
656 cube_t ret;
657 cube_t tn = {
658 .c = {34, 33, 32, 35, 68, 71, 70, 69},
659 .e = {25, 26, 27, 24, 22, 21, 20, 23, 19, 16, 17, 18}
660 };
661 cube_t ti = {
662 .c = {66, 65, 64, 67, 36, 39, 38, 37},
663 .e = {25, 26, 27, 24, 22, 21, 20, 23, 19, 16, 17, 18}
664 };
665
666 ret = compose(tn, c);
667 ret = compose(ret, ti);
668 ret = flipallcorners(ret);
669
670 return ret;
671}
672
673static inline cube_t
674inline_trans_RDm(cube_t c)
675{
676 cube_t ret;
677 cube_t tn = {
678 .c = {71, 68, 70, 69, 34, 33, 35, 32},
679 .e = {22, 21, 20, 23, 26, 25, 24, 27, 2, 3, 0, 1}
680 };
681 cube_t ti = {
682 .c = {71, 69, 68, 70, 33, 35, 34, 32},
683 .e = {10, 11, 8, 9, 18, 17, 16, 19, 22, 21, 20, 23}
684 };
685
686 ret = compose(tn, c);
687 ret = compose(ret, ti);
688 ret = flipallcorners(ret);
689
690 return ret;
691}
692
693static inline cube_t
694inline_trans_RBm(cube_t c)
695{
696 cube_t ret;
697 cube_t tn = {
698 .c = {33, 34, 35, 32, 71, 68, 69, 70},
699 .e = {26, 25, 24, 27, 21, 22, 23, 20, 17, 18, 19, 16}
700 };
701 cube_t ti = {
702 .c = {67, 64, 65, 66, 37, 38, 39, 36},
703 .e = {27, 24, 25, 26, 23, 20, 21, 22, 18, 17, 16, 19}
704 };
705
706 ret = compose(tn, c);
707 ret = compose(ret, ti);
708 ret = flipallcorners(ret);
709
710 return ret;
711}
712
713static inline cube_t
714inline_trans_LUm(cube_t c)
715{
716 cube_t ret;
717 cube_t tn = {
718 .c = {69, 70, 68, 71, 32, 35, 33, 34},
719 .e = {20, 23, 22, 21, 27, 24, 25, 26, 1, 0, 3, 2}
720 };
721 cube_t ti = {
722 .c = {68, 70, 71, 69, 34, 32, 33, 35},
723 .e = {9, 8, 11, 10, 16, 19, 18, 17, 21, 22, 23, 20}
724 };
725
726 ret = compose(tn, c);
727 ret = compose(ret, ti);
728 ret = flipallcorners(ret);
729
730 return ret;
731}
732
733static inline cube_t
734inline_trans_LFm(cube_t c)
735{
736 cube_t ret;
737 cube_t tn = {
738 .c = {32, 35, 34, 33, 70, 69, 68, 71},
739 .e = {24, 27, 26, 25, 20, 23, 22, 21, 16, 19, 18, 17}
740 };
741 cube_t ti = {
742 .c = {64, 67, 66, 65, 38, 37, 36, 39},
743 .e = {24, 27, 26, 25, 20, 23, 22, 21, 16, 19, 18, 17}
744 };
745
746 ret = compose(tn, c);
747 ret = compose(ret, ti);
748 ret = flipallcorners(ret);
749
750 return ret;
751}
752
753static inline cube_t
754inline_trans_LDm(cube_t c)
755{
756 cube_t ret;
757 cube_t tn = {
758 .c = {70, 69, 71, 68, 35, 32, 34, 33},
759 .e = {23, 20, 21, 22, 24, 27, 26, 25, 3, 2, 1, 0}
760 };
761 cube_t ti = {
762 .c = {69, 71, 70, 68, 35, 33, 32, 34},
763 .e = {11, 10, 9, 8, 17, 18, 19, 16, 20, 23, 22, 21}
764 };
765
766 ret = compose(tn, c);
767 ret = compose(ret, ti);
768 ret = flipallcorners(ret);
769
770 return ret;
771}
772
773static inline cube_t
774inline_trans_LBm(cube_t c)
775{
776 cube_t ret;
777 cube_t tn = {
778 .c = {35, 32, 33, 34, 69, 70, 71, 68},
779 .e = {27, 24, 25, 26, 23, 20, 21, 22, 18, 17, 16, 19}
780 };
781 cube_t ti = {
782 .c = {65, 66, 67, 64, 39, 36, 37, 38},
783 .e = {26, 25, 24, 27, 21, 22, 23, 20, 17, 18, 19, 16}
784 };
785
786 ret = compose(tn, c);
787 ret = compose(ret, ti);
788 ret = flipallcorners(ret);
789
790 return ret;
791}
792
793static inline cube_t
794inline_trans_FUm(cube_t c)
795{
796 cube_t ret;
797 cube_t tn = {
798 .c = {64, 66, 65, 67, 36, 38, 37, 39},
799 .e = {16, 19, 18, 17, 8, 9, 10, 11, 4, 5, 6, 7}
800 };
801 cube_t ti = {
802 .c = {32, 34, 33, 35, 68, 70, 69, 71},
803 .e = {16, 19, 18, 17, 8, 9, 10, 11, 4, 5, 6, 7}
804 };
805
806 ret = compose(tn, c);
807 ret = compose(ret, ti);
808 ret = flipallcorners(ret);
809
810 return ret;
811}
812
813static inline cube_t
814inline_trans_FRm(cube_t c)
815{
816 cube_t ret;
817 cube_t tn = {
818 .c = {36, 38, 39, 37, 66, 64, 65, 67},
819 .e = {9, 8, 11, 10, 16, 19, 18, 17, 21, 22, 23, 20}
820 };
821 cube_t ti = {
822 .c = {37, 38, 36, 39, 64, 67, 65, 66},
823 .e = {20, 23, 22, 21, 27, 24, 25, 26, 1, 0, 3, 2}
824 };
825
826 ret = compose(tn, c);
827 ret = compose(ret, ti);
828 ret = flipallcorners(ret);
829
830 return ret;
831}
832
833static inline cube_t
834inline_trans_FDm(cube_t c)
835{
836 cube_t ret;
837 cube_t tn = {
838 .c = {66, 64, 67, 65, 38, 36, 39, 37},
839 .e = {19, 16, 17, 18, 9, 8, 11, 10, 6, 7, 4, 5}
840 };
841 cube_t ti = {
842 .c = {33, 35, 32, 34, 69, 71, 68, 70},
843 .e = {17, 18, 19, 16, 10, 11, 8, 9, 5, 4, 7, 6}
844 };
845
846 ret = compose(tn, c);
847 ret = compose(ret, ti);
848 ret = flipallcorners(ret);
849
850 return ret;
851}
852
853static inline cube_t
854inline_trans_FLm(cube_t c)
855{
856 cube_t ret;
857 cube_t tn = {
858 .c = {38, 36, 37, 39, 64, 66, 67, 65},
859 .e = {8, 9, 10, 11, 19, 16, 17, 18, 23, 20, 21, 22}
860 };
861 cube_t ti = {
862 .c = {36, 39, 37, 38, 65, 66, 64, 67},
863 .e = {21, 22, 23, 20, 25, 26, 27, 24, 0, 1, 2, 3}
864 };
865
866 ret = compose(tn, c);
867 ret = compose(ret, ti);
868 ret = flipallcorners(ret);
869
870 return ret;
871}
872
873static inline cube_t
874inline_trans_BUm(cube_t c)
875{
876 cube_t ret;
877 cube_t tn = {
878 .c = {65, 67, 64, 66, 37, 39, 36, 38},
879 .e = {17, 18, 19, 16, 10, 11, 8, 9, 5, 4, 7, 6}
880 };
881 cube_t ti = {
882 .c = {34, 32, 35, 33, 70, 68, 71, 69},
883 .e = {19, 16, 17, 18, 9, 8, 11, 10, 6, 7, 4, 5}
884 };
885
886 ret = compose(tn, c);
887 ret = compose(ret, ti);
888 ret = flipallcorners(ret);
889
890 return ret;
891}
892
893static inline cube_t
894inline_trans_BRm(cube_t c)
895{
896 cube_t ret;
897 cube_t tn = {
898 .c = {39, 37, 36, 38, 65, 67, 66, 64},
899 .e = {10, 11, 8, 9, 18, 17, 16, 19, 22, 21, 20, 23}
900 };
901 cube_t ti = {
902 .c = {39, 36, 38, 37, 66, 65, 67, 64},
903 .e = {22, 21, 20, 23, 26, 25, 24, 27, 2, 3, 0, 1}
904 };
905
906 ret = compose(tn, c);
907 ret = compose(ret, ti);
908 ret = flipallcorners(ret);
909
910 return ret;
911}
912
913static inline cube_t
914inline_trans_BDm(cube_t c)
915{
916 cube_t ret;
917 cube_t tn = {
918 .c = {67, 65, 66, 64, 39, 37, 38, 36},
919 .e = {18, 17, 16, 19, 11, 10, 9, 8, 7, 6, 5, 4}
920 };
921 cube_t ti = {
922 .c = {35, 33, 34, 32, 71, 69, 70, 68},
923 .e = {18, 17, 16, 19, 11, 10, 9, 8, 7, 6, 5, 4}
924 };
925
926 ret = compose(tn, c);
927 ret = compose(ret, ti);
928 ret = flipallcorners(ret);
929
930 return ret;
931}
932
933static inline cube_t
934inline_trans_BLm(cube_t c)
935{
936 cube_t ret;
937 cube_t tn = {
938 .c = {37, 39, 38, 36, 67, 65, 64, 66},
939 .e = {11, 10, 9, 8, 17, 18, 19, 16, 20, 23, 22, 21}
940 };
941 cube_t ti = {
942 .c = {38, 37, 39, 36, 67, 64, 66, 65},
943 .e = {23, 20, 21, 22, 24, 27, 26, 25, 3, 2, 1, 0}
944 };
945
946 ret = compose(tn, c);
947 ret = compose(ret, ti);
948 ret = flipallcorners(ret);
949
950 return ret;
951}
952

Generated with cgit - Back to sebastiano.tronto.net