diff options
Diffstat (limited to 'src/core/transform_with_switch.h')
| -rw-r--r-- | src/core/transform_with_switch.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/transform_with_switch.h b/src/core/transform_with_switch.h index d3a108c..429e656 100644 --- a/src/core/transform_with_switch.h +++ b/src/core/transform_with_switch.h | |||
| @@ -17,6 +17,11 @@ | |||
| 17 | invertco(compose(compose(_trans_cube_ ## T, c), \ | 17 | invertco(compose(compose(_trans_cube_ ## T, c), \ |
| 18 | _trans_cube_ ## T ## _inverse)) | 18 | _trans_cube_ ## T ## _inverse)) |
| 19 | 19 | ||
| 20 | _static cube_t transform_edges(cube_t, uint8_t); | ||
| 21 | _static cube_t transform_corners(cube_t, uint8_t); | ||
| 22 | _static cube_t transform(cube_t, uint8_t); | ||
| 23 | _static cube_t applytrans(cube_t, const char *); | ||
| 24 | |||
| 20 | _static cube_t | 25 | _static cube_t |
| 21 | transform_edges(cube_t c, uint8_t t) | 26 | transform_edges(cube_t c, uint8_t t) |
| 22 | { | 27 | { |
| @@ -334,3 +339,16 @@ transform(cube_t c, uint8_t t) | |||
| 334 | return zero; | 339 | return zero; |
| 335 | } | 340 | } |
| 336 | } | 341 | } |
| 342 | |||
| 343 | _static cube_t | ||
| 344 | applytrans(cube_t cube, const char *buf) | ||
| 345 | { | ||
| 346 | uint8_t t; | ||
| 347 | |||
| 348 | DBG_ASSERT(isconsistent(cube), zero, | ||
| 349 | "transformation error: inconsistent cube\n"); | ||
| 350 | |||
| 351 | t = readtrans(buf); | ||
| 352 | |||
| 353 | return transform(cube, t); | ||
| 354 | } | ||
