diff options
Diffstat (limited to 'src/core/transform.h')
| -rw-r--r-- | src/core/transform.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/transform.h b/src/core/transform.h index 28b8d93..763a4ae 100644 --- a/src/core/transform.h +++ b/src/core/transform.h | |||
| @@ -23,7 +23,7 @@ STATIC void writetrans(uint8_t, char [static NISSY_SIZE_TRANSFORMATION]); | |||
| 23 | STATIC cube_t transform_edges(cube_t, uint8_t); | 23 | STATIC cube_t transform_edges(cube_t, uint8_t); |
| 24 | STATIC cube_t transform_corners(cube_t, uint8_t); | 24 | STATIC cube_t transform_corners(cube_t, uint8_t); |
| 25 | STATIC cube_t transform(cube_t, uint8_t); | 25 | STATIC cube_t transform(cube_t, uint8_t); |
| 26 | STATIC cube_t applytrans(cube_t, const char *); | 26 | STATIC oriented_cube_t applytrans(oriented_cube_t, const char *); |
| 27 | STATIC_INLINE uint8_t inverse_trans(uint8_t); | 27 | STATIC_INLINE uint8_t inverse_trans(uint8_t); |
| 28 | STATIC uint8_t transform_move(uint8_t, uint8_t); | 28 | STATIC uint8_t transform_move(uint8_t, uint8_t); |
| 29 | STATIC uint64_t symmetry_mask(cube_t); | 29 | STATIC uint64_t symmetry_mask(cube_t); |
| @@ -367,12 +367,12 @@ transform(cube_t c, uint8_t t) | |||
| 367 | } | 367 | } |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | STATIC cube_t | 370 | STATIC oriented_cube_t |
| 371 | applytrans(cube_t cube, const char *buf) | 371 | applytrans(oriented_cube_t cube, const char *buf) |
| 372 | { | 372 | { |
| 373 | uint8_t t; | 373 | uint8_t t; |
| 374 | 374 | ||
| 375 | DBG_ASSERT(isconsistent(cube), ZERO_CUBE, | 375 | DBG_ASSERT(isconsistent(cube), ZERO_ORIENTED_CUBE, |
| 376 | "transformation error: inconsistent cube\n"); | 376 | "transformation error: inconsistent cube\n"); |
| 377 | 377 | ||
| 378 | t = readtrans(buf); | 378 | t = readtrans(buf); |
| @@ -380,7 +380,10 @@ applytrans(cube_t cube, const char *buf) | |||
| 380 | if (t == UINT8_ERROR) | 380 | if (t == UINT8_ERROR) |
| 381 | LOG("Unknown transformation: %s\n", buf); | 381 | LOG("Unknown transformation: %s\n", buf); |
| 382 | 382 | ||
| 383 | return transform(cube, t); | 383 | return (oriented_cube_t){ |
| 384 | .cube = transform(cube.cube, t), | ||
| 385 | .orientation = cube.orientation | ||
| 386 | }; | ||
| 384 | } | 387 | } |
| 385 | 388 | ||
| 386 | STATIC_INLINE uint8_t | 389 | STATIC_INLINE uint8_t |
