From c9e2d6466e42d6b779ac9ffa7c5ee9a9c7558df8 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 3 Sep 2024 21:52:16 +0200 Subject: Moved stuff around --- src/core/transform_with_switch.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/core/transform_with_switch.h') 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 @@ invertco(compose(compose(_trans_cube_ ## T, c), \ _trans_cube_ ## T ## _inverse)) +_static cube_t transform_edges(cube_t, uint8_t); +_static cube_t transform_corners(cube_t, uint8_t); +_static cube_t transform(cube_t, uint8_t); +_static cube_t applytrans(cube_t, const char *); + _static cube_t transform_edges(cube_t c, uint8_t t) { @@ -334,3 +339,16 @@ transform(cube_t c, uint8_t t) return zero; } } + +_static cube_t +applytrans(cube_t cube, const char *buf) +{ + uint8_t t; + + DBG_ASSERT(isconsistent(cube), zero, + "transformation error: inconsistent cube\n"); + + t = readtrans(buf); + + return transform(cube, t); +} -- cgit v1.3